# Changeset 171

Ignore:
Timestamp:
Mar 2, 2007, 10:06:53 AM (16 years ago)
Message:

some modifications in the models for the new language (reactors model)

Location:
branches/newlanguage
Files:
12 edited

Unmodified
Removed
• ## branches/newlanguage/eml/reactors/batch.mso

 r77 Model batch_basic PARAMETERS PARAMETERS ext     NComp as Integer; NReac as Integer; stoic(NComp, NReac) as Real (Brief = "Stoichiometric Matrix"); VARIABLES VARIABLES in      Inlet      as stream; C(NComp) as conc_mol(Brief="Components concentration");
• ## branches/newlanguage/sample/reactors/fogler/chap2/series_reactors.mso

 r82 Model stream PARAMETERS PARAMETERS NComp   as Integer      (Brief="Number of components", Default=1); VARIABLES F(NComp)as flow_mol     (Brief="Molar flow", Unit="mol/s"); X(NComp)as fraction     (Brief="Molar conversion"); end VARIABLES F(NComp)        as flow_mol     (Brief="Molar flow", Unit='mol/s'); X(NComp)        as fraction     (Brief="Molar conversion"); end #*--------------------------------------------------------------------- Model cstr VARIABLES in      Inlet   as stream; # Inlet stream out     Outlet  as stream; # Outlet stream r               as reaction_mol(Brief="Rate of reaction", Unit="mol/l/s"); V       as volume          (Brief="Volume", Unit="l", Upper=2e3); EQUATIONS "Component molar balance" VARIABLES in              Inlet           as stream       (Brief="Inlet stream"); out     Outlet  as stream       (Brief="Outlet stream"); r        as reaction_mol        (Brief="Rate of reaction", Unit='mol/l/s'); V   as volume                   (Brief="Volume", Unit='l', Upper=2e3); EQUATIONS "Component molar balance" Inlet.F - Outlet.F = (-r)*V; "Outlet molar flow" "Outlet molar flow" Outlet.F = Inlet.F*(1 - Outlet.X); end Model pfr VARIABLES in      Inlet   as stream; # Inlet stream out     Outlet  as stream; # Outlet stream V       as volume          (Brief="Volume", Unit="l", Upper=2e3); r               as reaction_mol(Brief="Rate of reaction", Unit="mol/l/s"); EQUATIONS "Molar balance" diff(V) = Inlet.F/(-r)*"1/s"; "Change time in X" Outlet.X = time*"1/s"; VARIABLES in              Inlet           as stream       (Brief="Inlet stream"); out     Outlet  as stream       (Brief="Outlet stream"); V  as volume                    (Brief="Volume", Unit='l', Upper=2e3); r       as reaction_mol (Brief="Rate of reaction", Unit='mol/l/s'); EQUATIONS "Molar balance" diff(V) = Inlet.F/(-r)*'1/s'; "Change time in X" Outlet.X = time*'1/s'; "Molar flow" in      Inlet   as stream; # Inlet stream out     Outlet  as stream; # Outlet stream V(N)    as volume           (Brief="Volume", Unit="l", Upper=2e3); V(N)    as volume           (Brief="Volume", Unit='l', Upper=2e3); X(N)    as fraction             (Brief="Molar conversion"); dx      as fraction     (Brief="Conversion increment"); r(N)    as reaction_mol (Brief="Rate of reaction", Unit="mol/l/s"); F(N)    as flow_mol             (Brief="Molar flow", Unit="mol/s"); r(N)    as reaction_mol (Brief="Rate of reaction", Unit='mol/l/s'); F(N)    as flow_mol             (Brief="Molar flow", Unit='mol/s'); EQUATIONS FlowSheet cstr_sample PARAMETERS R       as Real                 (Brief="Universal gas constant", Unit="atm*l/mol/K", Default=0.082); T       as temperature  (Brief="Temperatura in the reactor", Unit="K"); P       as pressure             (Brief="Pressure in the reactor", Unit="atm"); R       as Real                 (Brief="Universal gas constant", Unit='atm*l/mol/K', Default=0.082); T       as temperature  (Brief="Temperatura in the reactor", Unit='K'); P       as pressure             (Brief="Pressure in the reactor", Unit='atm'); zin     as fraction             (Brief="Inlet molar fraction"); v0  as flow_vol         (Brief="Volumetric flow"); VARIABLES Vt      as volume               (Brief="Total reactor volume", Unit="l"); Vt      as volume               (Brief="Total reactor volume", Unit='l'); DEVICES "Rate of reaction" (-R1.r) = (0.0092*R1.Outlet.X^3 - 0.0153*R1.Outlet.X^2 + 0.0013*R1.Outlet.X + 0.0053)*"mol/l/s"; (-R1.r) = (0.0092*R1.Outlet.X^3 - 0.0153*R1.Outlet.X^2 + 0.0013*R1.Outlet.X + 0.0053)*'mol/l/s'; "Total reactor volume" SET v0  = 6.0*"l/s"; T       = 422.2*"K"; P       = 10*"atm"; v0  = 6.0*'l/s'; T       = 422.2*'K'; P       = 10*'atm'; zin     = 0.5; OPTIONS mode = "steady"; Dynamic = false; end FlowSheet pfr_sample DEVICES Inlet   as stream; # Inlet stream DEVICES Inlet   as stream; R1              as pfr; CONNECTIONS CONNECTIONS Inlet   to R1.Inlet; EQUATIONS "Rate of reaction" (-R1.r) = (0.0092*R1.Outlet.X^3 - 0.0153*R1.Outlet.X^2 + 0.0013*R1.Outlet.X + 0.0053)*"mol/l/s"; SPECIFY "Inlet molar flow" Inlet.F = 0.866541*"mol/s"; "Inlet conversion" EQUATIONS "Rate of reaction" (-R1.r) = (0.0092*R1.Outlet.X^3 - 0.0153*R1.Outlet.X^2 + 0.0013*R1.Outlet.X + 0.0053)*'mol/l/s'; SPECIFY "Inlet molar flow" Inlet.F = 0.866541*'mol/s'; "Inlet conversion" Inlet.X = 0.0; INITIAL "Reactor volume" R1.V    = 0.0*"l"; OPTIONS time = [0:0.004:0.8]; INITIAL "Reactor volume" R1.V    = 0.0*'l'; OPTIONS Dynamic         = true; TimeStep        = 0.004; TimeEnd         = 0.8; TimeUnit        = 's'; end FlowSheet pfr_d_sample VARIABLES Vt              as volume       (Brief="Total reactor volume", Unit="l"); Vt              as volume       (Brief="Total reactor volume", Unit='l'); DEVICES EQUATIONS "Rate of reaction" (-R1.r) = (0.0092*R1.X^3 - 0.0153*R1.X^2 + 0.0013*R1.X + 0.0053)*"mol/l/s"; (-R1.r) = (0.0092*R1.X^3 - 0.0153*R1.X^2 + 0.0013*R1.X + 0.0053)*'mol/l/s'; "Total reactor volume" SPECIFY "Inlet molar flow" Inlet.F = 0.866541*"mol/s"; Inlet.F = 0.866541*'mol/s'; "Inlet conversion" Inlet.X = 0.0; R1.Outlet.X     = 0.8; "Initial volume" R1.V(1) = 0.0*"l"; OPTIONS mode = "steady"; R1.V(1) = 0.0*'l'; OPTIONS Dynamic = false; end FlowSheet comparative VARIABLES V_cstr  as volume       (Brief="CSTR volume", Unit="l"); V_pfr   as volume       (Brief="PFR volume", Unit="l"); V_cstr  as volume       (Brief="CSTR volume",Unit='l'); V_pfr   as volume       (Brief="PFR volume", Unit='l'); DEVICES EQUATIONS "Rate of reaction in CSTR" (-CSTR.r) = (0.0092*CSTR.Outlet.X^3 - 0.0153*CSTR.Outlet.X^2 + 0.0013*CSTR.Outlet.X + 0.0053)*"mol/l/s"; (-CSTR.r) = (0.0092*CSTR.Outlet.X^3 - 0.0153*CSTR.Outlet.X^2 + 0.0013*CSTR.Outlet.X + 0.0053)*'mol/l/s'; "Rate of reaction in PFR" (-PFR.r) = (0.0092*PFR.X^3 - 0.0153*PFR.X^2 + 0.0013*PFR.X + 0.0053)*"mol/l/s"; (-PFR.r) = (0.0092*PFR.X^3 - 0.0153*PFR.X^2 + 0.0013*PFR.X + 0.0053)*'mol/l/s'; "CSTR volume" SPECIFY "Inlet molar flow" Inlet.F = 5.0*"mol/s"; Inlet.F = 5.0*'mol/s'; "Inlet conversion" Inlet.X = 0.0; "Initial volume in PFR" PFR.V(1) = 0.0*"l"; OPTIONS mode = "steady"; PFR.V(1) = 0.0*'l'; OPTIONS Dynamic = false; end FlowSheet cstr_cstr VARIABLES V1              as volume       (Brief="1st reactor volume", Unit="l"); V2              as volume       (Brief="2nd reactor volume", Unit="l"); Vt              as volume       (Brief="Total reactor volumes", Unit="l"); DEVICES Inlet   as stream; # Inlet stream V1              as volume       (Brief="1st reactor volume", Unit='l'); V2              as volume       (Brief="2nd reactor volume", Unit='l'); Vt              as volume       (Brief="Total reactor volumes", Unit='l'); DEVICES Inlet   as stream; R1              as cstr; R2              as cstr; EQUATIONS "Rate of reaction in 1st reactor" (-R1.r) = (0.0092*R1.Outlet.X^3 - 0.0153*R1.Outlet.X^2 + 0.0013*R1.Outlet.X + 0.0053)*"mol/l/s"; (-R1.r) = (0.0092*R1.Outlet.X^3 - 0.0153*R1.Outlet.X^2 + 0.0013*R1.Outlet.X + 0.0053)*'mol/l/s'; "Rate of reaction in 2nd reactor" (-R2.r) = (0.0092*R2.Outlet.X^3 - 0.0153*R2.Outlet.X^2 + 0.0013*R2.Outlet.X + 0.0053)*"mol/l/s"; (-R2.r) = (0.0092*R2.Outlet.X^3 - 0.0153*R2.Outlet.X^2 + 0.0013*R2.Outlet.X + 0.0053)*'mol/l/s'; "1st volume reactor" SPECIFY "Inlet molar flow" Inlet.F = 0.866541*"mol/s"; Inlet.F = 0.866541*'mol/s'; "Inlet conversion" Inlet.X = 0.0; OPTIONS mode = "steady"; Dynamic=false; end FlowSheet pfr_pfr VARIABLES V1              as volume       (Brief="1st reactor volume", Unit="l"); V2              as volume       (Brief="2nd reactor volume", Unit="l"); Vt              as volume       (Brief="Total reactor volumes", Unit="l"); DEVICES Inlet   as stream; # Inlet stream V1              as volume       (Brief="1st reactor volume", Unit='l'); V2              as volume       (Brief="2nd reactor volume", Unit='l'); Vt              as volume       (Brief="Total reactor volumes", Unit='l'); DEVICES Inlet   as stream; R1              as pfr_d; R2              as pfr_d; EQUATIONS "Rate of reaction in 1st reactor" (-R1.r) = (0.0092*R1.X^3 - 0.0153*R1.X^2 + 0.0013*R1.X + 0.0053)*"mol/l/s"; (-R1.r) = (0.0092*R1.X^3 - 0.0153*R1.X^2 + 0.0013*R1.X + 0.0053)*'mol/l/s'; "Rate of reaction in 2nd reactor" (-R2.r) = (0.0092*R2.X^3 - 0.0153*R2.X^2 + 0.0013*R2.X + 0.0053)*"mol/l/s"; (-R2.r) = (0.0092*R2.X^3 - 0.0153*R2.X^2 + 0.0013*R2.X + 0.0053)*'mol/l/s'; "1st reactor volume" SPECIFY "Inlet molar flow" Inlet.F = 0.866541*"mol/s"; Inlet.F = 0.866541*'mol/s'; "Inlet conversion" Inlet.X = 0.0; "Initial 1st reactor volume" R1.V(1) = 0.0*"l"; R1.V(1) = 0.0*'l'; "Initial 2nd reactor volume" R2.V(1) = 0.0*"l"; OPTIONS mode = "steady"; R2.V(1) = 0.0*'l'; OPTIONS Dynamic = false; end FlowSheet pfr_cstr VARIABLES V1              as volume       (Brief="1st reactor volume", Unit="l"); V2              as volume       (Brief="2nd reactor volume", Unit="l"); Vt              as volume       (Brief="Total reactor volumes", Unit="l"); DEVICES Inlet   as stream; # Inlet stream V1              as volume       (Brief="1st reactor volume", Unit='l'); V2              as volume       (Brief="2nd reactor volume", Unit='l'); Vt              as volume       (Brief="Total reactor volumes", Unit='l'); DEVICES Inlet   as stream; R1              as pfr_d; R2              as cstr; EQUATIONS "Rate of reaction in 1st reactor" (-R1.r) = (0.0092*R1.X^3 - 0.0153*R1.X^2 + 0.0013*R1.X + 0.0053)*"mol/l/s"; (-R1.r) = (0.0092*R1.X^3 - 0.0153*R1.X^2 + 0.0013*R1.X + 0.0053)*'mol/l/s'; "Rate of reaction in 2nd reactor" (-R2.r) = (0.0092*R2.Outlet.X^3 - 0.0153*R2.Outlet.X^2 + 0.0013*R2.Outlet.X + 0.0053)*"mol/l/s"; (-R2.r) = (0.0092*R2.Outlet.X^3 - 0.0153*R2.Outlet.X^2 + 0.0013*R2.Outlet.X + 0.0053)*'mol/l/s'; "1st reactor volume" SPECIFY "Inlet molar flow" Inlet.F = 0.866541*"mol/s"; Inlet.F = 0.866541*'mol/s'; "Inlet conversion" Inlet.X = 0.0; "Initial 1st reactor volume" R1.V(1) = 0.0*"l"; OPTIONS mode = "steady"; R1.V(1) = 0.0*'l'; OPTIONS Dynamic= false; end FlowSheet cstr_pfr VARIABLES V1              as volume       (Brief="1st reactor volume", Unit="l"); V2              as volume       (Brief="2nd reactor volume", Unit="l"); Vt              as volume       (Brief="Total reactor volumes", Unit="l"); V1              as volume       (Brief="1st reactor volume", Unit='l'); V2              as volume       (Brief="2nd reactor volume", Unit='l'); Vt              as volume       (Brief="Total reactor volumes", Unit='l'); DEVICES EQUATIONS "Rate of reaction in 1st reactor" (-R1.r) = (9.2*R1.Outlet.X^3 - 15.3*R1.Outlet.X^2 + 1.3*R1.Outlet.X + 5.3)*1e-3*"mol/l/s"; (-R1.r) = (9.2*R1.Outlet.X^3 - 15.3*R1.Outlet.X^2 + 1.3*R1.Outlet.X + 5.3)*1e-3*'mol/l/s'; "Rate of reaction in 2nd reactor" (-R2.r) = (9.2*R2.X^3 - 15.3*R2.X^2 + 1.3*R2.X + 5.3)*1e-3*"mol/l/s"; (-R2.r) = (9.2*R2.X^3 - 15.3*R2.X^2 + 1.3*R2.X + 5.3)*1e-3*'mol/l/s'; "1st reactor volume" SPECIFY "Inlet molar flow" Inlet.F = 0.866541*"mol/s"; Inlet.F = 0.866541*'mol/s'; "Inlet conversion" Inlet.X = 0.0; "Initial 2nd reactor volume" R2.V(1) = 0.0*"l"; OPTIONS mode = "steady"; end R2.V(1) = 0.0*'l'; OPTIONS Dynamic = false; end
• ## branches/newlanguage/sample/reactors/fogler/chap3/equilibrium_conversion.mso

 r82 Model stream PARAMETERS ext     NComp   as Integer (Brief="Number of chemical components", Lower=1); outer   NComp   as Integer (Brief="Number of chemical components", Lower=1); VARIABLES C(NComp)as conc_mol(Brief="Concentration", Unit="kmol/l", Lower=0); C(NComp)as conc_mol(Brief="Concentration", Unit='kmol/l', Lower=0); z(NComp)as fraction(Brief="Molar fraction"); end PARAMETERS NComp   as Integer      (Brief="Number of chemical components", Lower=1); R               as Real         (Brief="Universal gas constant", Unit="atm*l/mol/K", Default=0.082); R               as Real         (Brief="Universal gas constant", Unit='atm*l/mol/K', Default=0.082); stoic(NComp) as Real(Brief="Stoichiometric coefficients"); Outlet  as stream; # Outlet stream X               as fraction     (Brief="Molar conversion", Lower=0); Kc      as Real         (Brief="Equilibrium constant", Unit="mol/l"); C               as conc_mol     (Brief="Total outlet concentration", Unit="mol/l", Lower=0); Co              as conc_mol     (Brief="Total inlet concentration", Unit="mol/l", Lower=0); T               as temperature (Brief="Temperature", Unit="K"); P               as pressure     (Brief="Pressure", Unit="atm"); Kc      as Real         (Brief="Equilibrium constant", Unit='mol/l'); C               as conc_mol     (Brief="Total outlet concentration", Unit='mol/l', Lower=0); Co              as conc_mol     (Brief="Total inlet concentration", Unit='mol/l', Lower=0); T               as temperature (Brief="Temperature", Unit='K'); P               as pressure     (Brief="Pressure", Unit='atm'); Theta(NComp) as Real(Brief="Parameter Theta"); "Inlet pressure" P = 2.0*"atm"; P = 2.0*'atm'; "Inlet temperature" T = 340*"K"; T = 340*'K'; "Equilibrium constant" Kc = 0.1*"mol/l"; Kc = 0.1*'mol/l'; OPTIONS mode = "steady"; Dynamic = false; end PARAMETERS NComp   as Integer      (Brief="Number of chemical components", Lower=1); R               as Real         (Brief="Universal gas constant", Unit="atm*l/mol/K", Default=0.082); R               as Real         (Brief="Universal gas constant", Unit='atm*l/mol/K', Default=0.082); stoic(NComp) as Real(Brief="Stoichiometric coefficients"); Outlet  as stream; # Outlet stream X               as fraction     (Brief="Molar conversion", Lower=0); Kc      as Real         (Brief="Equilibrium constant", Unit="mol/l"); C               as conc_mol     (Brief="Total outlet concentration", Unit="mol/l", Lower=0); Co              as conc_mol     (Brief="Total inlet concentration", Unit="mol/l", Lower=0); T               as temperature (Brief="Temperatura", Unit="K"); P               as pressure     (Brief="Pressure", Unit="atm"); Kc      as Real         (Brief="Equilibrium constant", Unit='mol/l'); C               as conc_mol     (Brief="Total outlet concentration", Unit='mol/l', Lower=0); Co              as conc_mol     (Brief="Total inlet concentration", Unit='mol/l', Lower=0); T               as temperature (Brief="Temperatura", Unit='K'); P               as pressure     (Brief="Pressure", Unit='atm'); Theta(NComp) as Real(Brief="Parameter Theta"); epsilon as Real         (Brief="Parameter epsilon"); "Inlet pressure" P = 2.0*"atm"; P = 2.0*'atm'; "Inlet temperature" T = 340*"K"; T = 340*'K'; "Equilibrium constant" Kc = 0.1*"mol/l"; Kc = 0.1*'mol/l'; OPTIONS mode = "steady"; Dynamic = false; end
• ## branches/newlanguage/sample/reactors/fogler/chap3/oxidation_of_so2.mso

 r82 Model stream PARAMETERS ext     NComp   as Integer (Brief="Number of chemical components", Lower=1); outer   NComp   as Integer (Brief="Number of chemical components", Lower=1); VARIABLES C(NComp)as conc_mol(Brief="Concentration", Unit="mol/l", Lower=0); C(NComp)as conc_mol(Brief="Concentration", Unit='mol/l', Lower=0); z(NComp)as fraction(Brief="Molar fraction"); end NComp   as Integer; stoic(NComp) as Real(Brief="Stoichiometric coefficients"); k       as Real (Brief="Specific rate of reaction", Unit="l/mol/s"); R               as Real (Brief="Universal gas constant", Unit="atm*l/mol/K", Default=0.082); k       as Real (Brief="Specific rate of reaction", Unit='l/mol/s'); R               as Real (Brief="Universal gas constant", Unit='atm*l/mol/K', Default=0.082); VARIABLES Inlet   as stream; # Inlet stream Outlet  as stream; # Outlet stream Inlet   as stream; Outlet  as stream; X               as fraction     (Brief="Molar conversion", Lower=0); r               as reaction_mol (Brief="Rate of reaction of A", Unit="mol/l/s"); T               as temperature  (Brief="Temperature", Unit="K"); P               as pressure     (Brief="Pressure", Unit="atm"); r               as reaction_mol (Brief="Rate of reaction of A", Unit='mol/l/s'); T               as temperature  (Brief="Temperature", Unit='K'); P               as pressure     (Brief="Pressure", Unit='atm'); Theta(NComp)as Real     (Brief="Parameter Theta"); epsilon as Real         (Brief="Parameter epsilon"); EQUATIONS "Change time in X" X = time*"1/s"; X = time*'1/s'; "Outlet molar fraction" NComp = 4; # A, B, C and I stoic = [-1.0, -0.5, 1.0, 0.0]; k = 200*"l/mol/s"; k = 200*'l/mol/s'; SPECIFY Inlet.z = [0.28, 0.1512, 0.0, 0.5688]; "Inlet pressure" P = 1485*"kPa"; P = 1485*'kPa'; "Inlet temperature" T = (227 + 273.15)*"K"; T = (227 + 273.15)*'K'; OPTIONS time = [0:0.005:0.995]; TimeStep = 0.005; TimeEnd = 0.995; end
• ## branches/newlanguage/sample/reactors/fogler/chap4/membrane_reactor.mso

 r82 NComp   as Integer              (Brief="Number of chemical components", Lower=1); stoic(NComp)as Real             (Brief="Stoichiometric number"); Kc      as conc_mol             (Brief="Equilibrium constant", Unit="mol/l"); kc      as Real                 (Brief="Mass transfer coefficient", Unit="1/min"); R               as Real                 (Brief="Universal gas constant", Unit="atm*l/mol/K", Default=0.082); Kc      as conc_mol             (Brief="Equilibrium constant", Unit='mol/l'); kc      as Real                 (Brief="Mass transfer coefficient", Unit='1/min'); R               as Real                 (Brief="Universal gas constant", Unit='atm*l/mol/K', Default=0.082); VARIABLES F(NComp)as flow_mol             (Brief="Molar flow", Unit="mol/min"); C(NComp)as conc_mol             (Brief="Molar concentration", Unit="mol/l", Lower=0); r(NComp)as reaction_mol (Brief="Rate of reaction", Unit="mol/l/min"); Cto             as conc_mol             (Brief="Total inlet concentration", Unit="mol/l"); k               as Real                 (Brief="Specific rate of reaction", Unit="1/min"); V               as volume               (Brief="Volume", Unit="l"); F(NComp)as flow_mol             (Brief="Molar flow", Unit='mol/min'); C(NComp)as conc_mol             (Brief="Molar concentration", Unit='mol/l', Lower=0); r(NComp)as reaction_mol (Brief="Rate of reaction", Unit='mol/l/min'); Cto             as conc_mol             (Brief="Total inlet concentration", Unit='mol/l'); k               as Real                 (Brief="Specific rate of reaction", Unit='1/min'); V               as volume               (Brief="Volume", Unit='l'); T               as temperature  (Brief="Temperatura", Unit="K"); P               as pressure             (Brief="Pressure", Unit="atm"); T               as temperature  (Brief="Temperatura", Unit='K'); P               as pressure             (Brief="Pressure", Unit='atm'); EQUATIONS "Change time in V" V = time*"l/s"; V = time*'l/s'; "Molar balance for A" diff(F(1))*"s/l" = r(1); diff(F(1))*'s/l' = r(1); "Molar balance for B" diff(F(2))*"s/l" = r(2) - kc*C(2); diff(F(2))*'s/l' = r(2) - kc*C(2); "Molar balance for C" diff(F(3))*"s/l" = r(3); diff(F(3))*'s/l' = r(3); "Rate of reaction" stoic = [-1.0, 1.0, 1.0]; # A <-> B + C kc = 0.20*"1/min"; Kc = 0.05*"mol/l"; kc = 0.20*'1/min'; Kc = 0.05*'mol/l'; SPECIFY "Pressure" P = 8.2*"atm";  # Isobaric system P = 8.2*'atm';  # Isobaric system "Temperature" T = 500*"K";    # Isotermic system T = 500*'K';    # Isotermic system "Specific rate of reaction" k = 0.7*"1/min"; k = 0.7*'1/min'; INITIAL "Molar flow" F = [10, 0.0, 0.0]*"mol/min"; F = [10, 0.0, 0.0]*'mol/min'; OPTIONS time =[0:10:500]; TimeStep =10; TimeEnd =500; end
• ## branches/newlanguage/sample/reactors/fogler/chap4/molarflow_pfr.mso

 r82 PARAMETERS NComp   as Integer; ka              as Real                 (Brief="Specific rate of reaction", Unit="1/min"); ka              as Real                 (Brief="Specific rate of reaction", Unit='1/min'); Kc              as conc_mol     (Brief="Equilibrium constant"); VARIABLES F(NComp)as flow_mol         (Brief="Molar flow", Unit="mol/min"); C(NComp)as conc_mol     (Brief="Molar concentration", Unit="mol/l"); r(NComp)as reaction_mol (Brief="Reaction rate", Unit="mol/min/l"); Fo(NComp) as flow_mol   (Brief="Input molar flow of A", Unit="mol/min"); Ft          as flow_mol     (Brief="Total molar flow", Unit="mol/min"); Cto     as conc_mol     (Brief="Initial concentration", Unit="mol/l"); V               as volume               (Brief="Reactor volume", Unit="l"); F(NComp)as flow_mol         (Brief="Molar flow", Unit='mol/min'); C(NComp)as conc_mol     (Brief="Molar concentration", Unit='mol/l'); r(NComp)as reaction_mol (Brief="Reaction rate", Unit='mol/min/l'); Fo(NComp) as flow_mol   (Brief="Input molar flow of A", Unit='mol/min'); Ft          as flow_mol     (Brief="Total molar flow", Unit='mol/min'); Cto     as conc_mol     (Brief="Initial concentration", Unit='mol/l'); V               as volume               (Brief="Reactor volume", Unit='l'); EQUATIONS "Change time in V" V = time*"l/s"; V = time*'l/s'; "Molar balance" diff(F(1))= r(1)*"l/s"; diff(F(1))= r(1)*'l/s'; "Reaction rate of A" SET NComp = 2; # components A and B ka = 2.7*"1/min"; Kc = 1.2*"mol/l"; ka = 2.7*'1/min'; Kc = 1.2*'mol/l'; SPECIFY "Input total molar concentration" Cto = 0.1*"mol/l"; Cto = 0.1*'mol/l'; "Input molar flow" Fo = [10, 0]*"mol/min"; Fo = [10, 0]*'mol/min'; INITIAL "Molar flow of A" F(1) = 10*"mol/min"; F(1) = 10*'mol/min'; OPTIONS time=[0:1:100]; TimeStep=1; TimeEnd=100; DAESolver = "dassl"; end
• ## branches/newlanguage/sample/reactors/fogler/chap4/semibatch_reactor.mso

 r82 VARIABLES C(NComp)        as conc_mol             (Brief="Concentration", Unit="mol/l", Lower=0); Co(NComp)       as conc_mol             (Brief="Inlet concentration", Unit="mol/l", Lower=0); C(NComp)        as conc_mol             (Brief="Concentration", Unit='mol/l', Lower=0); Co(NComp)       as conc_mol             (Brief="Inlet concentration", Unit='mol/l', Lower=0); r(NComp)        as reaction_mol (Brief="Rate of reaction", Unit="mol/l/s"); k                       as Real                 (Brief="Specific rate of reaction", Unit="l/mol/s"); V                       as volume               (Brief="Volume", Unit="l"); r(NComp)        as reaction_mol (Brief="Rate of reaction", Unit='mol/l/s'); k                       as Real                 (Brief="Specific rate of reaction", Unit='l/mol/s'); V                       as volume               (Brief="Volume", Unit='l'); X                       as fraction     (Brief="Molar conversion", Lower=0); stoic = [-1.0, -1.0, 1.0, 1.0]; # A + B -> C + D Vo = 5.00*"l"; vo = 0.05*"l/s"; Cao= 0.05*"mol/l"; # Initial condition Vo = 5.00*'l'; vo = 0.05*'l/s'; Cao= 0.05*'mol/l'; # Initial condition SPECIFY "Specific rate of reaction" k = 2.2*"l/mol/s"; k = 2.2*'l/mol/s'; "Inlet concentration" Co = [0.0, 0.025, 0.0, 0.0]*"mol/l"; Co = [0.0, 0.025, 0.0, 0.0]*'mol/l'; INITIAL "Molar concentration" C = [0.05, 0.0, 0.0, 0.0]*"mol/l"; C = [0.05, 0.0, 0.0, 0.0]*'mol/l'; "Volume" V = Vo; OPTIONS time =[0:5:500]; TimeStep =5; TimeEnd =500; end
• ## branches/newlanguage/sample/reactors/fogler/chap4/spheric_reactor.mso

 r82 FlowSheet spheric_reactor PARAMETERS rho_0 as dens_mass      (Brief="Initial density"); Dp    as length         (Brief="Particle diameter"); k_lin as Real           (Brief="Specific rate of reaction", Unit="m^3/kg/s"); visc  as viscosity      (Brief="Flow viscosity"); L     as length         (Brief="Fixed bed half length"); rho_c as dens_mass      (Brief="Catalyser density"); phi   as fraction       (Brief="Fixed bed porosity"); pi        as Real               (Brief="Number pi", Default=3.14159); R     as length         (Brief="Radius reactor"); PARAMETERS rho_0   as dens_mass    (Brief="Initial density"); Dp              as length               (Brief="Particle diameter"); k_lin           as Real                         (Brief="Specific rate of reaction", Unit='m^3/kg/s'); visc            as viscosity    (Brief="Flow viscosity"); L               as length               (Brief="Fixed bed half length"); rho_c   as dens_mass    (Brief="Catalyser density"); phi             as fraction             (Brief="Fixed bed porosity"); pi                      as Real                 (Brief="Number pi", Default=3.14159); R               as length               (Brief="Radius reactor"); VARIABLES X     as fraction       (Brief="Molar conversion"); y     as Real           (Brief="Dimensionless pressure drop (P/P0)", Lower=0); P     as pressure       (Brief="Output pressure", Unit="kPa"); P     as pressure       (Brief="Output pressure", Unit='kPa'); z         as length             (Brief="Length of reactor"); beta0 as Real           (Brief="Parameter beta0 of Ergun equation", Unit="Pa/m"); beta0 as Real           (Brief="Parameter beta0 of Ergun equation", Unit='Pa/m'); Ac    as area           (Brief="Tranversal section area", Lower=0); Ca0   as conc_mol       (Brief="Input molar concentration of A"); Fa0   as flow_mol       (Brief="Input molar flow of A"); P0    as pressure       (Brief="Initial pressure", Unit="kPa"); P0    as pressure       (Brief="Initial pressure", Unit='kPa'); m         as flow_mass  (Brief="Mass flow"); EQUATIONS "Change time in z" z = time*"m/s"; z = time*'m/s'; "Transversal section area" "Molar conversion" diff(X) = k_lin*(Ca0*(1 - X)/(1 + X)*y)*rho_c*(1 - phi)*Ac/Fa0*"m/s"; diff(X) = k_lin*(Ca0*(1 - X)/(1 + X)*y)*rho_c*(1 - phi)*Ac/Fa0*'m/s'; "Pressure drop" diff(y) = -beta0/P0/y*(1 + X)*"m/s"; diff(y) = -beta0/P0/y*(1 + X)*'m/s'; "Dimensionless pressure drop" SET rho_0 = 32*"kg/m^3"; Dp        = 0.002*"m"; k_lin = 2e-5*"m^3/kg/s"; visc  = 1.5e-5*"kg/m/s"; L         = 2.7*"m"; rho_c = 2600*"kg/m^3"; rho_0 = 32*'kg/m^3'; Dp        = 0.002*'m'; k_lin = 2e-5*'m^3/kg/s'; visc  = 1.5e-5*'kg/m/s'; L         = 2.7*'m'; rho_c = 2600*'kg/m^3'; phi   = 0.4; R         = 3*"m"; R         = 3*'m'; SPECIFY "Input molar concentration of A" Ca0 = 320*"mol/m^3"; Ca0 = 320*'mol/m^3'; "Input molar flow of A" Fa0 = 440*"mol/s"; Fa0 = 440*'mol/s'; "Initial pressure" P0      = 2000*"kPa"; P0      = 2000*'kPa'; "Input mass flow" m       = 44*"kg/s"; m       = 44*'kg/s'; INITIAL OPTIONS time =[0:0.1:5.4]; TimeStep =0.1; TimeEnd =5.4; end
• ## branches/newlanguage/sample/reactors/fogler/chap6/hidrodesalkeletion.mso

 r82 NReac           as Integer              (Brief="Number of reactions"); stoic(NComp,NReac) as Real      (Brief="Stoichiometric coefficients"); k(NReac)        as Real                 (Brief="Specific velocity reaction", Unit="(ft^3/lbmol)^.5/h"); k(NReac)        as Real                 (Brief="Specific velocity reaction", Unit='(ft^3/lbmol)^.5/h'); P                       as pressure     (Brief="Pressure of reactor"); T                       as temperature  (Brief="Temperature of reactor"); R                       as Real                 (Brief="Universal gas constant", Unit="atm*ft^3/degR/lbmol", Default=0.73); R                       as Real                 (Brief="Universal gas constant", Unit='atm*ft^3/degR/lbmol', Default=0.73); yo(NComp)       as fraction     (Brief="Input molar fraction"); vo                      as flow_vol     (Brief="Input volumetric flow"); VARIABLES F(NComp)        as flow_mol     (Brief="Molar flow", Unit="lbmol/h"); C(NComp)        as conc_mol     (Brief="Molar concentration", Lower=0, Unit="lbmol/ft^3"); Co(NComp)       as conc_mol     (Brief="Input molar concentration", Lower=0, Unit="lbmol/ft^3"); F(NComp)        as flow_mol     (Brief="Molar flow", Unit='lbmol/h'); C(NComp)        as conc_mol     (Brief="Molar concentration", Lower=0, Unit='lbmol/ft^3'); Co(NComp)       as conc_mol     (Brief="Input molar concentration", Lower=0, Unit='lbmol/ft^3'); r(NComp,NReac) as reaction_mol (Brief="Relative rate of reaction", Unit="lbmol/h/ft^3"); rate(NComp)     as reaction_mol (Brief="Overall rate of reaction", Unit="lbmol/h/ft^3"); tau                     as time_h               (Brief="Residence time", Unit="h"); V                       as volume               (Brief="Reactor volume", Unit="ft^3"); r(NComp,NReac) as reaction_mol (Brief="Relative rate of reaction", Unit='lbmol/h/ft^3'); rate(NComp)     as reaction_mol (Brief="Overall rate of reaction", Unit='lbmol/h/ft^3'); tau                     as time_h               (Brief="Residence time", Unit='h'); V                       as volume               (Brief="Reactor volume", Unit='ft^3'); EQUATIONS stoic(:,2) = [ 0, -1, -1, 1, 1]; # X + H -> T + Me vo= 476*"ft^3/h"; T = 1500*"degR"; P = 35*"atm"; vo= 476*'ft^3/h'; T = 1500*'degR'; P = 35*'atm'; yo= [1/3, 2/3, 0.0, 0.0, 0.0]; k = [55.2, 30.2]*"(ft^3/lbmol)^.5/h"; k = [55.2, 30.2]*'(ft^3/lbmol)^.5/h'; INITIAL OPTIONS time=[0:0.01:0.5]*"h"; TimeStep =0.01; TimeEnd  =0.5; TimeUnit = 'h'; end
• ## branches/newlanguage/sample/reactors/fogler/chap8/acetic_anhydride.mso

 r82 Ta                      as temperature  (Brief="Internal temperature"); Hr(NComp)       as enth_mol             (Brief="Enthalpy of component"); R                       as Real                 (Brief="Universal gas constant", Unit="kPa*m^3/kmol/K", Default=8.314); U                       as Real                 (Brief="Heat transfer coefficient", Unit="J/m^2/K/s"); a                       as Real                 (Brief="Heat transfer area per volume of tube", Unit="1/m"); R                       as Real                 (Brief="Universal gas constant", Unit='kPa*m^3/kmol/K', Default=8.314); U                       as Real                 (Brief="Heat transfer coefficient", Unit='J/m^2/K/s'); a                       as Real                 (Brief="Heat transfer area per volume of tube", Unit='1/m'); alpha(NComp)as cp_mol           (Brief="Alpha term of Cp expression"); beta(NComp)     as Real                 (Brief="Beta term of Cp expression", Unit="J/mol/K^2"); gamma(NComp)as Real                     (Brief="Gamma term of Cp expression", Unit="J/mol/K^3"); beta(NComp)     as Real                 (Brief="Beta term of Cp expression", Unit='J/mol/K^2'); gamma(NComp)as Real                     (Brief="Gamma term of Cp expression", Unit='J/mol/K^3'); VARIABLES Ca                      as conc_mol     (Brief="Molar concentration of A", Unit="kmol/m^3"); Ca0             as conc_mol     (Brief="Inlet molar concentration of A", Unit="mol/m^3"); Ca                      as conc_mol     (Brief="Molar concentration of A", Unit='kmol/m^3'); Ca0             as conc_mol     (Brief="Inlet molar concentration of A", Unit='mol/m^3'); Fa0             as flow_mol     (Brief="Inlet molar flow of A"); v0                      as flow_vol     (Brief="Volumetric flow", Unit="m^3/s"); r                       as reaction_mol (Brief="Rate of reaction", Unit="kmol/m^3/s"); k                       as Real                 (Brief="Specific rate of reaction", Unit="1/s"); T                       as temperature  (Brief="Temperature of reactor", Unit="K"); v0                      as flow_vol     (Brief="Volumetric flow", Unit='m^3/s'); r                       as reaction_mol (Brief="Rate of reaction", Unit='kmol/m^3/s'); k                       as Real                 (Brief="Specific rate of reaction", Unit='1/s'); T                       as temperature  (Brief="Temperature of reactor", Unit='K'); X                       as fraction     (Brief="Molar conversion", Lower=0); V                       as volume               (Brief="Volume", Unit="m^3"); V                       as volume               (Brief="Volume", Unit='m^3'); eps                     as Real                 (Brief="Parameter epsilon"); Cp(NComp)       as cp_mol               (Brief="Molar heat capacity", Unit="J/mol/K"); DHr                     as enth_mol             (Brief="Enthalpy of reaction", Unit="kJ/mol"); Cp(NComp)       as cp_mol               (Brief="Molar heat capacity", Unit='J/mol/K'); DHr                     as enth_mol             (Brief="Enthalpy of reaction", Unit='kJ/mol'); EQUATIONS "Change time in V" V = time*"m^3/s"; V = time*'m^3/s'; "Molar balance" diff(X) = (-r)/Fa0*"m^3/s"; diff(X) = (-r)/Fa0*'m^3/s'; "Rate of reaction" "Specific rate of reaction" k = exp(34.34)*exp(-34222*"K"/T)*"1/s"; k = exp(34.34)*exp(-34222*'K'/T)*'1/s'; "Concentration of component A" "Energy balance" diff(T)*(Fa0*(Cp(1) + X*sumt(stoic*Cp))) = (U*a*(Ta - T) + (-r)*(-DHr))*"m^3/s"; diff(T)*(Fa0*(Cp(1) + X*sumt(stoic*Cp))) = (U*a*(Ta - T) + (-r)*(-DHr))*'m^3/s'; "Enthalpy of reaction" R.stoic = [-1.0, 1.0, 1.0]; # A -> B + C R.Pa0 = 162*"kPa"; R.alpha = [26.63,  20.04, 13.39]*"J/mol/K"; R.beta  = [0.183, 0.0945, 0.077]*"J/mol/K^2"; R.gamma = [-45.86e-6, -30.95e-6, -18.71e-6]*"J/mol/K^3"; R.Hr = [-216.67, -61.09, -74.81]*"kJ/mol"; R.Tr = 298*"K"; R.T0 = 1035*"K"; R.Ta = 1150*"K"; R.U  = 0.0*"J/m^2/K/s"; R.a  = 150*"1/m"; R.Pa0 = 162*'kPa'; R.alpha = [26.63,  20.04, 13.39]*'J/mol/K'; R.beta  = [0.183, 0.0945, 0.077]*'J/mol/K^2'; R.gamma = [-45.86e-6, -30.95e-6, -18.71e-6]*'J/mol/K^3'; R.Hr = [-216.67, -61.09, -74.81]*'kJ/mol'; R.Tr = 298*'K'; R.T0 = 1035*'K'; R.Ta = 1150*'K'; R.U  = 0.0*'J/m^2/K/s'; R.a  = 150*'1/m'; SPECIFY "Inlet molar flow" R.Fa0 = (8000/58)*"kmol/h"; R.Fa0 = (8000/58)*'kmol/h'; INITIAL R.X = 0.0; "Temperature" R.T = 1035*"K"; R.T = 1035*'K'; OPTIONS time = [0:0.05:5]; TimeStep = 0.05; TimeEnd = 5; end R.stoic = [-1.0, 1.0, 1.0]; # A -> B + C R.Pa0 = 162*"kPa"; R.alpha = [26.63,  20.04, 13.39]*"J/mol/K"; R.beta  = [0.183, 0.0945, 0.077]*"J/mol/K^2"; R.gamma = [-45.86e-6, -30.95e-6, -18.71e-6]*"J/mol/K^3"; R.Hr = [-216.67, -61.09, -74.81]*"kJ/mol"; R.Tr = 298*"K"; R.T0 = 1035*"K"; R.Ta = 1150*"K"; R.U  = 110*"J/m^2/K/s"; R.a  = 150*"1/m"; R.Pa0 = 162*'kPa'; R.alpha = [26.63,  20.04, 13.39]*'J/mol/K'; R.beta  = [0.183, 0.0945, 0.077]*'J/mol/K^2'; R.gamma = [-45.86e-6, -30.95e-6, -18.71e-6]*'J/mol/K^3'; R.Hr = [-216.67, -61.09, -74.81]*'kJ/mol'; R.Tr = 298*'K'; R.T0 = 1035*'K'; R.Ta = 1150*'K'; R.U  = 110*'J/m^2/K/s'; R.a  = 150*'1/m'; SPECIFY "Inlet molar flow" R.Fa0 = (18.8*2e-3)*"mol/s"; R.Fa0 = (18.8*2e-3)*'mol/s'; INITIAL R.X = 0.0; "Temperature" R.T = 1035*"K"; R.T = 1035*'K'; OPTIONS time = [0:1e-5:1e-3]; TimeStep = 1e-5; TimeEnd = 1e-3; end
• ## branches/newlanguage/sample/reactors/fogler/chap8/propylene_glycol.mso

 r82 NComp           as Integer              (Brief="Number of components", Lower=1); stoic(NComp)as Real             (Brief="Stoichiometric coefficients"); vo(NComp)       as flow_vol     (Brief="Total input flow", Unit="ft^3/h"); Hro(NComp)      as enth_mol     (Brief="Enthalpy of formation", Unit="Btu/lbmol"); To                      as temperature  (Brief="Initial temperature", Unit="degR"); Tr                      as temperature  (Brief="Reference temperature", Unit="degR"); Cp(NComp)       as Real                 (Brief="Molar heat capacity", Unit="Btu/lbmol/degR"); Fo(NComp)       as flow_mol             (Brief="Input molar flow of component", Unit="lbmol/h"); vo(NComp)       as flow_vol     (Brief="Total input flow", Unit='ft^3/h'); Hro(NComp)      as enth_mol     (Brief="Enthalpy of formation", Unit='Btu/lbmol'); To                      as temperature  (Brief="Initial temperature", Unit='degR'); Tr                      as temperature  (Brief="Reference temperature", Unit='degR'); Cp(NComp)       as Real                 (Brief="Molar heat capacity", Unit='Btu/lbmol/degR'); Fo(NComp)       as flow_mol             (Brief="Input molar flow of component", Unit='lbmol/h'); V                       as volume               (Brief="Volume of the reactor"); # Rate of reaction A                       as frequency    (Brief="Frequency factor"); E                       as Real                 (Brief="Energy activation", Unit="Btu/lbmol"); R                       as Real                 (Brief="Universal gas constant", Unit="Btu/lbmol/degR", Default=1.987); E                       as Real                 (Brief="Energy activation", Unit='Btu/lbmol'); R                       as Real                 (Brief="Universal gas constant", Unit='Btu/lbmol/degR', Default=1.987); VARIABLES T                       as temperature  (Brief="Temperature", Unit="degR"); k                       as Real                 (Brief="Specific rate of reaction", Unit="1/h"); T                       as temperature  (Brief="Temperature", Unit='degR'); k                       as Real                 (Brief="Specific rate of reaction", Unit='1/h'); XMB                     as fraction             (Brief="Conversion as Material balance"); XEB                     as fraction             (Brief="Conversion as Energy balance"); tau                     as time_h               (Brief="Residence time", Unit="h"); tau                     as time_h               (Brief="Residence time", Unit='h'); Theta(NComp)as Real                     (Brief="Molar fraction between components"); EQUATIONS "Change time in T" T = time*"degR/s"; T = time*'degR/s'; "Residence time" stoic = [-1, -1, 1, 0]; # A + B -> C V       = 300*"gal"; Hro = [-6.66e4, -1.23e5, -2.26e5, 0]*"Btu/lbmol"; # at Tr Cp  = [35, 18, 46, 19.5]*"Btu/lbmol/degR"; vo  = [46.62, 233.1, 0, 46.62]*"ft^3/h"; V       = 300*'gal'; Hro = [-6.66e4, -1.23e5, -2.26e5, 0]*'Btu/lbmol'; # at Tr Cp  = [35, 18, 46, 19.5]*'Btu/lbmol/degR'; vo  = [46.62, 233.1, 0, 46.62]*'ft^3/h'; Fo      = [43.04, 802.8, 0, 71.87]*"lbmol/h"; To      = (75 + 459.69)*"degR"; Tr      = (68 + 459.69)*"degR"; Fo      = [43.04, 802.8, 0, 71.87]*'lbmol/h'; To      = (75 + 459.69)*'degR'; Tr      = (68 + 459.69)*'degR'; A       = 16.96e12*"1/h"; E       = 32400*"Btu/lbmol"; A       = 16.96e12*'1/h'; E       = 32400*'Btu/lbmol'; OPTIONS time=[535:0.45:625]; #       time=[535:0.45:625]; end NComp           as Integer              (Brief="Number of components", Lower=1); stoic(NComp)as Real             (Brief="Stoichiometric coefficients"); vo(NComp)       as flow_vol     (Brief="Total input flow", Unit="ft^3/h"); Hro(NComp)      as enth_mol     (Brief="Enthalpy of formation", Unit="Btu/lbmol"); vo(NComp)       as flow_vol     (Brief="Total input flow", Unit='ft^3/h'); Hro(NComp)      as enth_mol     (Brief="Enthalpy of formation", Unit='Btu/lbmol'); To                      as temperature  (Brief="Initial temperature"); Tr                      as temperature  (Brief="Reference temperature"); Ta                      as temperature  (Brief="Temperature of cooling"); Cp(NComp)       as Real                 (Brief="Molar heat capacity", Unit="Btu/lbmol/degR"); Fo(NComp)       as flow_mol             (Brief="Input molar flow of component", Unit="lbmol/h"); Cp(NComp)       as Real                 (Brief="Molar heat capacity", Unit='Btu/lbmol/degR'); Fo(NComp)       as flow_mol             (Brief="Input molar flow of component", Unit='lbmol/h'); V                       as volume               (Brief="Volume of the reactor"); U                       as heat_trans_coeff(Brief="Heat transfer coefficient"); # Rate of reaction A                       as frequency    (Brief="Frequency factor"); E                       as Real                 (Brief="Energy Activation", Unit="Btu/lbmol"); R                       as Real                 (Brief="Universal gas constant", Unit="Btu/lbmol/degR", Default=1.987); E                       as Real                 (Brief="Energy Activation", Unit='Btu/lbmol'); R                       as Real                 (Brief="Universal gas constant", Unit='Btu/lbmol/degR', Default=1.987); VARIABLES XMB                     as fraction             (Brief="Molar conversion as Material balance"); XEB                     as fraction             (Brief="Molar conversion as Energy balance", Lower=-0.1, Upper=1.5); k                       as Real                 (Brief="Specific rate of reaction", Unit="1/h"); T                       as temperature  (Brief="Temperature", Unit="degR"); tau                     as time_h               (Brief="Residence time", Unit="h"); k                       as Real                 (Brief="Specific rate of reaction", Unit='1/h'); T                       as temperature  (Brief="Temperature", Unit='degR'); tau                     as time_h               (Brief="Residence time", Unit='h'); Theta(NComp)as Real                     (Brief="Molar fraction between components"); EQUATIONS "Change time in T" T = time*"degR/s"; T = time*'degR/s'; "Specific rate of reaction" stoic = [-1, -1, 1, 0]; # A + B -> C V       = 300*"gal"; U       = 100*"Btu/ft^2/h/degR"; a       = 40*"ft^2"; V       = 300*'gal'; U       = 100*'Btu/ft^2/h/degR'; a       = 40*'ft^2'; Hro = [-6.66e4, -1.23e5, -2.26e5, 0]*"Btu/lbmol"; # at Tr Cp  = [35, 18, 46, 19.5]*"Btu/lbmol/degR"; vo  = [46.62, 233.1, 0, 46.62]*"ft^3/h"; Fo      = [43.04, 802.8, 0, 71.87]*"lbmol/h"; Hro = [-6.66e4, -1.23e5, -2.26e5, 0]*'Btu/lbmol'; # at Tr Cp  = [35, 18, 46, 19.5]*'Btu/lbmol/degR'; vo  = [46.62, 233.1, 0, 46.62]*'ft^3/h'; Fo      = [43.04, 802.8, 0, 71.87]*'lbmol/h'; To      = (75 + 459.69)*"degR"; Tr      = (68 + 459.69)*"degR"; Ta      = (85 + 459.69)*"degR"; To      = (75 + 459.69)*'degR'; Tr      = (68 + 459.69)*'degR'; Ta      = (85 + 459.69)*'degR'; A       = 16.96e12*"1/h"; E       = 32400*"Btu/lbmol"; A       = 16.96e12*'1/h'; E       = 32400*'Btu/lbmol'; OPTIONS time=[535:0.45:625]; #       time    =[535:0.45:625]; original TimeStep        =0.45; TimeEnd         =625; end
• ## branches/newlanguage/sample/reactors/fogler/chap8/series_reactions.mso

 r82 vo              as flow_vol     (Brief="Volumetric flow"); Cp              as cp_mol               (Brief="Heat capacity"); UA              as Real                 (Brief="Heat change", Unit="J/min/K"); UA              as Real                 (Brief="Heat change", Unit='J/min/K'); tau             as time_min     (Brief="Residence time"); Tr_ko(NReac)as temperature      (Brief="Reference temperature for ko"); ko(NReac)       as Real                 (Brief="Frequency factor", Unit="1/min"); ko(NReac)       as Real                 (Brief="Frequency factor", Unit='1/min'); E(NReac)        as energy_mol   (Brief="Activation energy"); R                       as Real                 (Brief="Universal gas constant", Unit="cal/mol/K", Default=1.987); R                       as Real                 (Brief="Universal gas constant", Unit='cal/mol/K', Default=1.987); VARIABLES kappa           as Real                 (Brief="Kappa parameter"); Tc              as temperature  (Brief="Temperature of reactor surface"); k(NReac)        as Real                 (Brief="Specific rate of reaction", Unit="1/min"); k(NReac)        as Real                 (Brief="Specific rate of reaction", Unit='1/min'); Co              as conc_mol     (Brief="Initial concentration of A"); To              as temperature  (Brief="Initial temperature"); EQUATIONS "Temperature profile" diff(T) = 2*"K/min"; diff(T) = 2*'K/min'; "Parameter kappa" NReac = 2; # A->B->C DH      = [-5.50e4, -7.15e4]*"J/mol"; vo      = 1000*"m^3/min"; DH      = [-5.50e4, -7.15e4]*'J/mol'; vo      = 1000*'m^3/min'; ko      = [ 3.30,  4.58]*"1/min"; E       = [9.9e3, 2.7e4]*"cal/mol"; Tr_ko = [300, 500]*"K"; ko      = [ 3.30,  4.58]*'1/min'; E       = [9.9e3, 2.7e4]*'cal/mol'; Tr_ko = [300, 500]*'K'; Cp      = 200*"J/mol/K"; UA      = 4e4*"J/min/K"; tau     = 0.01*"min"; Ta      = 330*"K"; Cp      = 200*'J/mol/K'; UA      = 4e4*'J/min/K'; tau     = 0.01*'min'; Ta      = 330*'K'; SPECIFY "Inlet temperature" To = 283*"K" ; To = 283*'K' ; "Inlet concentration of A" Co= 0.3*"mol/m^3"; Co= 0.3*'mol/m^3'; INITIAL "Temperature" T = 283*"K"; T = 283*'K'; OPTIONS time = [0:2:225]*"min"; TimeStep = 2; TimeEnd = 225; TimeUnit ='min'; end
Note: See TracChangeset for help on using the changeset viewer.