using "types";
FlowSheet cstr_ode
PARAMETERS
fi as Real;
beta as Real;
delta as Real;
q as Real;
alfa as Real;
S as Real;
csi as Real;
delta1 as Real;
delta2 as Real;
gama as Real;
x1f as Real;
x2f as Real;
x3f as Real;
x4f as Real;
qc as Real (Lower=-1,Upper=20);
VARIABLES
u1 as Real (Lower=0,Upper=1);
u2 as Real (Lower=0,Upper=1);
u3 as Real (Lower=0,Upper=20);
u4 as Real (Lower=0,Upper=20);
SET
fi = 0.133;
beta = 8;
delta = 1;
q = 1;
alfa = 1;
S = 0.01;
csi = 1;
delta1 = 10;
delta2 = 1;
gama = 1000;
x1f = 1;
x2f = 0;
x3f = 0;
x4f = -1;
qc = 0;
EQUATIONS
q*(x1f-u1)-u1*exp(u3/(1+(u3/gama)))*fi - diff(u1)*'s' = 0;
q*(x2f-u2)-u2*fi*S*exp(csi*u3/(1+(u3/gama)))+u1*fi*exp(u3/(1+(u3/gama))) - diff(u2)*'s' = 0;
q*(x3f-u3)+delta*(u4-u3)+beta*fi*(u1*exp(u3/(1+(u3/gama)))+alfa*u2*exp(csi*u3/(1+(u3/gama)))*S) - diff(u3)*'s' = 0;
delta1*(qc*(x4f-u4)+delta*delta2*(u3-u4)) - diff(u4)*'s' = 0;
GUESS
u1 = 0;
u2 = 0;
u3 = 16;
u4 = 16;
INITIAL
u1 = 0.6;
u2 = 0.3;
u3 = 3;
u4 = 3;
OPTIONS
TimeEnd = 10;
TimeStep = 0.2;
Dynamic = false;
end