%% Process constants for RunCSTRmod.m

global c i

% Gamma - process "constants"
c.T_R =   43;    % C Reservoir NPK temperature
c.T_cin = 15;    % C Temperature coolingwater in
c.T_cout= 30;    % C Temperature coolingwater out
c.T_cmid = (c.T_cout-c.T_cin)/2; % C Mean cooling water temperature

%Number of interior stages
i.n = 10;    %Must be dividable by 2

% Solid section mass hold up calculation
i.N_i_s = ((6.31-3.580+3.23-0.4)/i.n)*1.834*1.516*950*0.63; %kg
i.N_i_l = 0.001*996.12;                       %kg
i.N_1_s = 1*1.834*1.516*950*0.63;             %kg
i.N_7_s = (3.580-3.230)*1.834*1.516*950*0.63;%kg

% Initial values
i.T_1  = 43;                % Celsius
i.n_R_BC= 210000/(60*60);   % kg/s
i.n_BC_S= 210000/(60*60);   % kg/s
i.n_WR_W= 50*996.12/(60*60);% kg/s ref 201 prod

% Steps on inputs
time_n_R_BC = 20;        % Steptime [min]
step_n_R_BC = 0;         % Stepfac from init value
time_n_BC_S = 20;        % Steptime [min]
step_n_BC_S = 0;         % Stepfac from init value
time_n_WR_W = 20;        % Steptime [min]
step_n_WR_W = 0;         % Stepfac from init value

% Testing:
% i.n_BC_S= 209.9*(1000/(60*60));   % kg/s
% i.n_WR_W = 58.6*(996.12/(60*60));
% c.T_R =   42.5;    % C Reservoir NPK temperature
% c.T_cin = 18.8;    % C Temperature coolingwater in
% c.T_cout= 32.3;    % C Temperature coolingwater out
% c.T_cmid = (c.T_cout-c.T_cin)/2; % C Mean cooling water temperature
