#*---------------------------------------------------------------------
* This file is property of the author and cannot be used, copyed
* or modified without permission.
*
* Copyright (C) 2004 the author
*----------------------------------------------------------------------
* Author: Paula B. Staudt
* $Id: cstr.mso 1 2006-06-20 17:33:53Z rafael $
*--------------------------------------------------------------------*#
using "streams";
Model cstr_basic
PARAMETERS
ext NComp as Integer;
NReac as Integer;
stoic(NComp, NReac) as Real (Brief = "Stoichiometric Matrix");
VARIABLES
in Inlet as stream;
out Outlet as stream_therm;
q as heat_rate;
Vr as volume (Brief="Reacting Volume");
M as mol (Brief = "Molar total amount");
C(NComp) as conc_mol(Brief="Components concentration");
EQUATIONS
"Molar fraction"
Outlet.z * M = C * Vr;
"Vapourisation Fraction"
Outlet.v = Inlet.v;
end
Model cstr_yield as cstr_basic
PARAMETERS
yield(NReac) as fraction;
EQUATIONS
Outlet.z*Outlet.F = Inlet.z*Inlet.F * sumt(stoic*(1-yield));
"Reactor Energy Balance"
diff(M*Outlet.h) = Inlet.F*Inlet.h - Outlet.F*Outlet.h - q;
end
Model cstr as cstr_basic
VARIABLES
r(NReac) as reaction_mol;
Hr(NReac) as heat_reaction;
EQUATIONS
"Component Molar Balance"
diff(Outlet.z*M) = (Inlet.F*Inlet.z - Outlet.F*Outlet.z) + sumt(stoic*r)*Vr;
"Reactor Energy Balance"
diff(M*Outlet.h) = Inlet.F*Inlet.h - Outlet.F*Outlet.h +
sum(Hr*sum(stoic*r))*Vr - q;
end