Changeset 813 for branches/gui/sample
- Timestamp:
- Aug 5, 2009, 4:00:16 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/sample/reactors/sample_pfr.mso
r745 r813 39 39 PARAMETERS 40 40 41 PP 41 PP as Plugin (Brief="Physical Properties", 42 42 Type = "PP", 43 Components = ["acetone", " acetic anhydride", "methane" ],43 Components = ["acetone", "ketene", "methane" ], 44 44 LiquidModel = "PR", 45 45 VapourModel = "PR" 46 46 ); 47 47 NComp as Integer; 48 SET 49 NComp = PP.NumberOfComponents; 48 50 49 51 DEVICES 52 s1 as source; 53 Reac as pfr; 50 54 51 s1 as simple_source; 52 Reac as pfr; 55 CONNECTIONS 56 s1.Outlet to Reac.Inlet; 57 58 SET 59 Reac.NDisc = 15; 60 Reac.L = 2.28 * 'm'; 61 # Area was chosen to match the original example data 62 Reac.Across = 1.27*'m^3'/Reac.L; 53 63 54 SET 55 NComp = PP.NumberOfComponents; 56 57 s1.ValidPhases = "Vapour-Liquid"; 58 #s1.CompositionBasis = "Molar"; 59 60 Reac.NDisc = 10; 61 Reac.Dpipe = 3 * 'in'; 62 Reac.L = 15 * 'm'; 64 # Only one reaction 63 65 Reac.NReac = 1; 64 Reac.Roughness = 4.572E-5*'m'; 66 # Reaction 1: acetone -> ketene + methane 67 Reac.stoic(:,1) = [-1, 1, 1]; 65 68 66 # Reaction 1: A -> B + C 67 Reac.stoic(:,1) = [-1, 1, 1]; 69 SPECIFY 70 # Feed specification 71 s1.Fw = 8000 * 'kg/h'; 72 s1.T = 1035 * 'K'; 73 s1.P = 1.6 * 'atm'; 74 s1.Composition = [0.98, 0.01, 0.01]; 75 76 # Adiabatic 77 Reac.q = 0 * 'J/s'; 68 78 69 79 EQUATIONS … … 77 87 Reac.Hr(1,z) = -80.77 * 'kJ/mol'; 78 88 89 "Pressure Drop (no pressure drop)" 90 Reac.str(z+1).P = Reac.str(z).P; 91 79 92 end 80 93 81 SPECIFY82 s1.F = 138/1000 * 'kmol/h';83 s1.T = 1035 * 'K';84 s1.P = 1.6 * 'atm';85 s1.MolarComposition = [1, 0, 0];86 87 Reac.q = 0 * 'J/s';88 89 CONNECTIONS90 91 s1.Outlet to Reac.Inlet;92 93 94 INITIAL 94 95 95 96 for z in [2:Reac.NDisc+1] do 97 Reac.str(z).T = Reac.Inlet.T; 98 Reac.str(z).z(1:NComp) = Reac.Inlet.z(1:NComp); 99 end 96 100 97 Reac.str(z).T = Reac.Inlet.T;98 Reac.vel(z) = Reac.vel(1);99 #Reac.str(z).F = Reac.str(1).F;100 Reac.str(z).z(1:NComp-1) = Reac.Inlet.z(1:NComp-1);101 102 end103 104 VARIABLES105 106 SOMA as Real;107 108 EQUATIONS109 110 SOMA = sum(Reac.Outlet.z);111 112 101 OPTIONS 113 # This model can be solved in both steady or dynamic114 102 Dynamic = true; 115 103 TimeStep = 0.05; 116 TimeEnd = 3; 117 DAESolver(File="sundials", RelativeAccuracy=1e-2); 118 NLASolver(RelativeAccuracy=1e-4); 104 TimeEnd = 10; 119 105 #InitialFile = "PFR_AceticAnhydride"; 120 #Dynamic = false; 121 #DAESolver = "dassl"; 106 #Dynamic = false; # Requires a GuessFile from a dynamic simulation 122 107 end
Note: See TracChangeset
for help on using the changeset viewer.