- Timestamp:
- Jan 19, 2007, 12:03:14 PM (16 years ago)
- Location:
- branches/newlanguage
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/newlanguage/eml/streams.mso
r117 r123 26 26 Pallete = false; 27 27 Brief = "General Material Stream"; 28 Documentation=28 Info = 29 29 "This is the basic building block for the EML models. 30 30 Every model should have input and output streams derived … … 47 47 Pallete = false; 48 48 Brief = "Liquid Material Stream"; 49 Documentation=49 Info = 50 50 "Model for liquid material streams. 51 51 This model should be used only when the phase of the stream … … 66 66 Pallete = false; 67 67 Brief = "Vapour Material Stream"; 68 Documentation=68 Info = 69 69 "Model for vapour material streams. 70 70 This model should be used only when the phase of the stream … … 83 83 Model source 84 84 ATTRIBUTES 85 Documentation=85 Info = 86 86 "Material stream source. 87 87 This model should be used for boundary streams. … … 97 97 x(NComp) as fraction(Brief = "Liquid Molar Fraction"); 98 98 y(NComp) as fraction(Brief = "Vapour Molar Fraction"); 99 hl as enth_mol; 100 hv as enth_mol; 99 101 100 102 EQUATIONS … … 104 106 Outlet.h = (1-Outlet.v)*PP.LiquidEnthalpy(Outlet.T, Outlet.P, x) + 105 107 Outlet.v*PP.VapourEnthalpy(Outlet.T, Outlet.P, y); 108 109 hl = PP.LiquidEnthalpy(Outlet.T, Outlet.P, x); 110 hv = PP.VapourEnthalpy(Outlet.T, Outlet.P, y); 111 end 112 113 Model sink2 114 VARIABLES 115 in Inlet as stream; 106 116 end 107 117 108 118 Model sink 109 119 ATTRIBUTES 110 Documentation=120 Info = 111 121 "Material stream sink. 112 122 This model should be used for boundary streams."; … … 124 134 EQUATIONS 125 135 "Flash Calculation" 126 [v, x, y] = PP. PHFlash(Inlet.P, Inlet.h, Inlet.z);136 [v, x, y] = PP.FlashPH(Inlet.P, Inlet.h, Inlet.z); 127 137 end -
branches/newlanguage/sample/stage_separators/sample_flash.mso
r121 r123 55 55 s1.Outlet.T = 338 * "K"; 56 56 s1.Outlet.P = 507.1 * "kPa"; 57 #s1. v = 0.1380;57 #s1.Outlet.v = 0.1380; 58 58 s1.Outlet.z = [0.2379,0.3082,0.09958,0.1373,0.08872,0.1283]; 59 59 60 60 fl.OutletV.F = 68.5 * "kmol/h"; 61 Q = 1* "kJ/h";61 Q = 0 * "kJ/h"; 62 62 63 63 SET … … 66 66 67 67 INITIAL 68 fl.OutletL.T = 33 0*"K";68 fl.OutletL.T = 338 *"K"; 69 69 fl.Level = 1 * "m"; 70 70 fl.OutletL.z(1) = 0.1; … … 75 75 76 76 OPTIONS 77 RelativeAccuracy = 1e- 7;78 AbsoluteAccuracy = 1e- 9;77 RelativeAccuracy = 1e-4; 78 AbsoluteAccuracy = 1e-8; 79 79 Dynamic = true; 80 80 TimeStep = 0.1; -
branches/newlanguage/sample/stage_separators/sample_stream.mso
r121 r123 39 39 DEVICES 40 40 s1 as source; 41 s2 as sink2; 42 43 CONNECTIONS 44 s1.Outlet to s2.Inlet; 41 45 42 46 SPECIFY 43 47 s1.Outlet.F = 496.3 * "kmol/h"; 44 48 s1.Outlet.T = 338 * "K"; 45 s1.Outlet.P = 507.1 * "kPa";46 #s1.v = 0.1380;49 #s1.Outlet.P = 507.1 * "kPa"; 50 s1.Outlet.v = 0.12; 47 51 s1.Outlet.z = [0.2379,0.3082,0.09958,0.1373,0.08872,0.1283]; 48 52 … … 50 54 RelativeAccuracy = 1e-7; 51 55 AbsoluteAccuracy = 1e-9; 52 Dynamic = true;56 Dynamic = false; 53 57 TimeStep = 0.1; 54 58 TimeEnd = 20;
Note: See TracChangeset
for help on using the changeset viewer.