Changeset 421 for trunk/eml/reactors/equil.mso
 Timestamp:
 Nov 29, 2007, 10:05:51 AM (15 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/eml/reactors/equil.mso
r415 r421 22 22 * 23 23 * Assumptions: 24 * * single and twophases involved 24 25 * * thermodynamic equilibrium 25 26 * * steadystate … … 47 48 Brief = "Model of a generic vapourphase equilibrium CSTR"; 48 49 Info = " 49 Requires the information of: 50 * number of reactions 51 * matrix of stoichiometric coefficients (components by reactions) 50 == Assumptions == 51 * only vapourphase 52 * thermodynamic equilibrium 53 * steadystate 54 55 == Specify == 56 * inlet stream 57 * stoichiometric matrix 58 * equilibrium temperature 52 59 "; 53 60 54 61 PARAMETERS 55 62 NReac as Integer (Brief="Number of reactions", Default=1); 56 stoic(NComp,NReac) as Real (Brief="Stoichiometric matrix" );63 stoic(NComp,NReac) as Real (Brief="Stoichiometric matrix", Symbol="\nu"); 57 64 Rg as Real (Brief="Universal gas constant", Unit='J/mol/K', Default=8.314); 58 65 fs(NComp) as pressure (Brief="Fugacity in standard state", Default=1, DisplayUnit='atm'); … … 60 67 61 68 VARIABLES 62 out Outlet as vapour_stream ; # Outlet stream69 out Outlet as vapour_stream(Brief="Outlet stream", PosX=1, PosY=1, Symbol="_{out}"); 63 70 64 71 G(NComp) as energy_mol (Brief="Gibbs freeenergy of formation"); 65 72 K(NReac) as Real (Brief="Equillibrium constant",Default=1.5); 66 activ(NComp)as Real (Brief="Activity", Default=0.2);73 activ(NComp)as Real (Brief="Activity", Symbol="\hat{a}", Default=0.2); 67 74 68 75 rate(NComp) as reaction_mol (Brief="Overall component rate of reaction"); 69 extent(NReac) as flow_mol (Brief="Extent of reaction" );70 conv(NComp) as Real (Brief="Fractional conversion of component", Default=0); # Lower=1e3, Upper=1e3);76 extent(NReac) as flow_mol (Brief="Extent of reaction", Symbol="\xi"); 77 conv(NComp) as Real (Brief="Fractional conversion of component", Symbol="X", Default=0); # Lower=1e3, Upper=1e3); 71 78 72 79 EQUATIONS 73 80 "Outlet stream" 74 Outlet.F*Outlet.z = Outletm.F*Outletm.z + rate*V ;81 Outlet.F*Outlet.z = Outletm.F*Outletm.z + rate*Vr; 75 82 76 83 "Mechanical equilibrium" … … 87 94 88 95 # "Gibbs freeenergy of formation without Cp correction" 89 # G = PP.IdealGasGibbsOfFormationAt25C()*Outlet.T/To+PP.IdealGasEnthalpyOfFormationAt25C()*(1Outlet.T/To); 96 # G = PP.IdealGasGibbsOfFormationAt25C()*Outlet.T/To 97 # + PP.IdealGasEnthalpyOfFormationAt25C()*(1  Outlet.T/To); 90 98 91 99 "Gibbs free energy of reaction" 92 #sumt(G*stoic) = Rg*Outlet.T*ln(K);93 K = exp(sumt(G*stoic)/(Rg*Outlet.T));100 sumt(G*stoic) = Rg*Outlet.T*ln(K); 101 # K = exp(sumt(G*stoic)/(Rg*Outlet.T)); 94 102 95 103 for j in [1:NReac] … … 131 139 Brief = "Model of a generic liquidphase equilibrium CSTR"; 132 140 Info = " 133 Requires the information of: 134 * number of reactions 135 * matrix of stoichiometric coefficients (components by reactions) 141 == Assumptions == 142 * only liquidphase 143 * thermodynamic equilibrium 144 * steadystate 145 146 == Specify == 147 * inlet stream 148 * stoichiometric matrix 149 * equilibrium temperature 136 150 "; 137 151 138 152 PARAMETERS 139 153 NReac as Integer (Brief="Number of reactions", Default=1); 140 stoic(NComp,NReac) as Real (Brief="Stoichiometric matrix" );154 stoic(NComp,NReac) as Real (Brief="Stoichiometric matrix", Symbol="\nu"); 141 155 Rg as Real (Brief="Universal gas constant", Unit='J/mol/K', Default=8.314); 142 156 Ps as pressure (Brief="Standard pressure", Default=1, DisplayUnit='bar'); … … 144 158 145 159 VARIABLES 146 out Outlet as liquid_stream ; # Outlet stream160 out Outlet as liquid_stream(Brief="Outlet stream", PosX=1, PosY=1, Symbol="_{out}"); 147 161 148 162 G(NReac) as enth_mol (Brief="Gibbs freeenergy of formation"); 149 163 K(NReac) as fraction (Brief="Equillibrium constant"); 150 activ(NComp)as Real (Brief="Activity" );164 activ(NComp)as Real (Brief="Activity", Symbol="\hat{a}"); 151 165 152 166 rate(NComp) as reaction_mol (Brief="Overall component rate of reaction"); 153 extent(NReac)as flow_mol (Brief="Extent of reaction" );154 conv(NComp) as Real (Brief="Fractional conversion of component", Default=0);167 extent(NReac)as flow_mol (Brief="Extent of reaction", Symbol="\xi"); 168 conv(NComp) as Real (Brief="Fractional conversion of component", Symbol="X", Default=0); 155 169 156 170 EQUATIONS 157 171 "Outlet stream" 158 Outlet.F*Outlet.z = Outletm.F*Outletm.z + rate*V ;172 Outlet.F*Outlet.z = Outletm.F*Outletm.z + rate*Vr; 159 173 160 174 "Mechanical equilibrium" … … 171 185 172 186 # "Gibbs freeenergy of formation without Cp correction" 173 # G = PP.IdealGasGibbsOfFormationAt25C()*Outlet.T/To+PP.IdealGasEnthalpyOfFormationAt25C()*(1Outlet.T/To); 187 # G = PP.IdealGasGibbsOfFormationAt25C()*Outlet.T/To 188 # + PP.IdealGasEnthalpyOfFormationAt25C()*(1  Outlet.T/To); 174 189 175 190 "Gibbs free energy of reaction" 176 #sumt(G*stoic) = Rg*Outlet.T*ln(K);177 K = exp(sumt(G*stoic)/(Rg*Outlet.T));191 sumt(G*stoic) = Rg*Outlet.T*ln(K); 192 # K = exp(sumt(G*stoic)/(Rg*Outlet.T)); 178 193 179 194 for j in [1:NReac]
Note: See TracChangeset
for help on using the changeset viewer.