Changeset 204
- Timestamp:
- Mar 14, 2007, 4:09:38 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/newlanguage/eml/pressure_changers/valve.mso
r196 r204 20 20 * - Equal 21 21 * - Quick 22 * - valve: a very simple model 22 * - Hyperbolic 23 * - valve_simplified: a very simple model 23 24 * 24 25 *-------------------------------------------------------------------- … … 37 38 38 39 39 Model valve _basicas flux_machine_basic_PH40 Model valve as flux_machine_basic_PH 40 41 41 42 PARAMETERS 42 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 43 outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); 43 Valve_Type as Switcher (Valid = ["valve_linear", "valve_parabolic", "valve_equal", "valve_quick", "valve_hyperbolic"], Default = "valve_linear"); 44 outer PP as Plugin (Brief = "External Physical Properties", Type = "PP"); 45 outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); 44 46 rho60F as dens_mass; 45 47 46 48 VARIABLES 47 Pdiff as press_delta (Brief = "Pressure Increase" , DisplayUnit = 'kPa');49 Pdiff as press_delta (Brief = "Pressure Increase"); 48 50 Qv as flow_vol (Brief = "Volumetric Flow"); 49 51 fc as positive (Brief = "Opening Function"); … … 52 54 rho as dens_mass; 53 55 vm as vol_mol (Brief = "Mixture Molar Volume"); 56 x as fraction (Brief = "Opening"); 54 57 55 58 SET 56 rho60F = 999. 2 * 'kg/m^3';59 rho60F = 999.02 * 'kg/m^3'; 57 60 58 61 EQUATIONS … … 89 92 vm = PP.LiquidVolume(Inlet.T,Inlet.P,Inlet.z); 90 93 91 end 92 93 Model valve_linear as valve_basic 94 95 VARIABLES 96 x as fraction (Brief = "Opening"); 97 98 EQUATIONS 99 100 "Opening Equation" 101 fc = x; 102 103 end 104 105 Model valve_parabolic as valve_basic 106 107 PARAMETERS 108 n as positive (Brief = "Constant", Lower = 1.4, Upper = 2.6); 109 110 VARIABLES 111 x as fraction (Brief = "Opening"); 112 113 EQUATIONS 114 115 "Opening Equation" 116 fc = x^n; 117 118 end 119 120 Model valve_equal as valve_basic 121 122 PARAMETERS 123 a as Real (Brief = "Constant", Default = 100); 124 125 VARIABLES 126 x as fraction (Brief = "Opening"); 127 128 EQUATIONS 129 130 "Opening Equation" 131 fc = a^(x-1); 132 133 end 134 135 Model valve_quick as valve_basic 136 137 PARAMETERS 138 a as positive (Brief = "Constant", Default = 0.05); 139 n as positive (Brief = "Constant", Default = 5); 140 141 VARIABLES 142 x as fraction (Brief = "Opening"); 143 144 EQUATIONS 145 146 "Opening Equation" 147 fc = (1-(a*(1-x)-(a-1)*(1-x)^n)); 148 94 switch Valve_Type 95 case "valve_linear": 96 97 98 "Opening Equation" 99 fc = x; 100 101 case "valve_parabolic": 102 103 104 "Opening Equation" 105 fc = x^2; 106 107 108 case "valve_equal": 109 110 111 "Opening Equation" 112 fc = x^2/(2-x^4)^(1/2); 113 114 115 case "valve_quick": 116 117 118 "Opening Equation" 119 fc = 10*x/sqrt(1+99*x^2); 120 121 122 case "valve_hyperbolic": 123 124 125 "Opening Equation" 126 fc = 0.1*x/sqrt(1-0.99*x^2); 127 128 end 149 129 end 150 130 … … 176 156 * Author: Paula B. Staudt 177 157 *--------------------------------------------------------------------*# 178 Model valve 158 Model valve_simplified 159 179 160 PARAMETERS 180 outer PP as Plugin (Brief = "External Physical Properties", Type="PP");161 outer PP as Plugin; 181 162 outer NComp as Integer; 182 163 … … 200 181 Inlet.h = Outlet.h; 201 182 202 #"Vapourisation Fraction"203 #Outlet.v = Inlet.v;183 "Vapourisation Fraction" 184 Outlet.v = Inlet.v; 204 185 205 186 "Density"
Note: See TracChangeset
for help on using the changeset viewer.