Changeset 595
- Timestamp:
- Aug 8, 2008, 6:55:17 PM (14 years ago)
- Location:
- branches/gui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/eml/pressure_changers/compressor.mso
r393 r595 21 21 22 22 Model centrifugal_compressor 23 ATTRIBUTES 23 24 ATTRIBUTES 24 25 Pallete = true; 25 26 Icon = "icon/CentrifugalCompressor"; 26 Brief = "Model of a centrifugal compressor."; 27 Info = 28 "== Assumptions == 29 * Steady State; 30 * Only Vapor; 31 * Adiabatic. 27 Brief = "Testing Model of a centrifugal compressor."; 28 32 29 33 == Specify == 34 * the inlet stream; 35 * the outlet pressure (Outlet.P); 36 * the Isentropic efficiency (Effs). 37 "; 38 39 PARAMETERS 40 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 41 outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); 42 R as positive (Default = 8.31451, Brief = "Constant of Gases", Unit= 'kJ/kmol/K'); 30 PARAMETERS 31 32 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 33 outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); 34 R as positive (Brief = "Constant of Gases", Unit= 'kJ/kmol/K', Default = 8.31451,Hidden=true); 43 35 Mw(NComp) as molweight (Brief = "Molar Weight"); 44 36 45 VARIABLES 46 n as positive (Brief = "Politropic Coefficient", Lower=0); 47 k as positive (Brief = "Isentropic Coefficient", Lower=1e-3); 48 Cp as cp_mol (Brief = "Heat Capacity"); 49 Cv as cv_mol (Brief = "Heat Capacity"); 37 VARIABLES 38 39 n as positive (Brief = "Politropic Coefficient", Lower=0); 40 k as positive (Brief = "Isentropic Coefficient", Lower=1e-3); 41 Cp as cp_mol (Brief = "Heat Capacity"); 42 Cv as cv_mol (Brief = "Heat Capacity"); 50 43 Pratio as positive (Brief = "Pressure Ratio", Symbol ="P_{ratio}"); 51 44 Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P"); 52 45 Wp as energy_mol (Brief = "Politropic Head"); 53 46 Ws as energy_mol (Brief = "Isentropic Head"); 54 Tiso as temperature (Brief = "Isentropic Temperature"); 55 Effp as positive (Brief = "Politropic efficiency"); 56 Effs as efficiency (Brief = "Isentropic efficiency"); 57 FPower as power (Brief = "Fluid Power"); 58 Mwm as molweight (Brief = "Mixture Molar Weight"); 59 in Inlet as stream (Brief = "Inlet stream", PosX=0, PosY=0.5086, Symbol="_{in}"); 60 out Outlet as streamPH (Brief = "Outlet stream", PosX=1, PosY=0.5022, Symbol="_{out}"); 47 Tiso as temperature (Brief = "Isentropic Temperature"); 48 Effp as positive (Brief = "Politropic efficiency"); 49 Effs as efficiency (Brief = "Isentropic efficiency"); 50 FPower as power (Brief = "Fluid Power"); 51 Mwm as molweight (Brief = "Mixture Molar Weight"); 61 52 62 SET 53 in Inlet as stream (Brief = "Inlet stream", PosX=0.35, PosY=0, Symbol="_{in}"); 54 out Outlet as streamPH (Brief = "Outlet stream", PosX=1, PosY=0.85, Symbol="_{out}"); 55 56 in WorkIn as power (Brief = "Work Inlet", PosX=0, PosY=0.55); 57 58 SET 59 63 60 Mw = PP.MolecularWeight(); 64 65 EQUATIONS 66 67 "Calculate Mwm for Inlet Mixture" 61 62 R = 8.31451*'kJ/kmol/K'; 63 64 EQUATIONS 65 66 "Calculate Mwm for Inlet Mixture" 68 67 Mwm = sum(Mw*Inlet.z); 69 68 70 69 "Pressure Ratio" 71 70 Outlet.P = Inlet.P * Pratio; 72 71 73 72 "Pressure Drop" 74 73 Outlet.P = Inlet.P - Pdrop; 75 74 76 75 "Calculate Cp Using a External Physical Properties Routine" 77 76 Cp = PP.VapourCp(Inlet.T,Inlet.P,Inlet.z); 78 77 79 78 "Calculate Cv Using a External Physical Properties Routine" 80 79 Cv = PP.VapourCv(Inlet.T,Inlet.P,Inlet.z); 81 80 82 81 "Calculate Isentropic Coeficient" 83 82 k * Cv = Cp; 84 83 85 84 "Calculate Isentropic Head" 86 85 Ws = (k/(k-1))*R*Inlet.T*((Outlet.P/Inlet.P)^((k-1)/k) - 1); 87 86 88 87 "Calculate Isentropic Outlet Temperature" 89 88 # Tiso = Inlet.T * (Outlet.P/Inlet.P)^((k-1)/k); 90 PP.VapourEntropy(Tiso, Outlet.P, Outlet.z) = 91 PP.VapourEntropy(Inlet.T, Inlet.P, Inlet.z); 89 PP.VapourEntropy(Tiso, Outlet.P, Outlet.z) = PP.VapourEntropy(Inlet.T, Inlet.P, Inlet.z); 92 90 93 91 "Calculate Real Outlet Temperature" 94 92 Effs * (Outlet.T- Inlet.T) = (Tiso - Inlet.T); 95 93 96 94 "Calculate Politropic Coefficient" 97 95 n*(ln(Outlet.T/Inlet.T)) = (n-1)*(ln(Outlet.P/Inlet.P)); 98 96 99 97 "Calculate Politropic Efficiency" 100 98 Effp * (n-1) * k = n * (k-1); 101 99 102 100 "Calculate Politropic Head" 103 101 Ws*Effp = Wp*Effs; 104 102 105 "Calculate Fluid Power" 106 FPower*Effs = Inlet.F*Ws; 107 108 "Overall Molar Balance" 103 "Overall Molar Balance" 109 104 Outlet.F = Inlet.F; 110 105 111 106 "Component Molar Balance" 112 107 Outlet.z = Inlet.z; 108 109 # Testing Equations 110 111 "Fluid Power" 112 FPower*Effs = Inlet.F*Ws; 113 114 "Fluid Power" 115 FPower = WorkIn; 116 113 117 end -
branches/gui/eml/pressure_changers/icon/CentrifugalCompressor.svg
r305 r595 3 3 <svg 4 4 xmlns:dc="http://purl.org/dc/elements/1.1/" 5 xmlns:cc="http:// web.resource.org/cc/"5 xmlns:cc="http://creativecommons.org/ns#" 6 6 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 7 7 xmlns:svg="http://www.w3.org/2000/svg" … … 12 12 id="svg2124" 13 13 sodipodi:version="0.32" 14 inkscape:version="0.4 4.1"14 inkscape:version="0.46" 15 15 width="210mm" 16 16 height="297mm" 17 17 sodipodi:docbase="C:\Documents and Settings\Administrador\Meus documentos\Bolsa Simulação\Desenhos Prontos 4" 18 sodipodi:docname="compressor.svg"> 18 sodipodi:docname="CentrifugalCompressor.svg" 19 inkscape:output_extension="org.inkscape.output.svg.inkscape" 20 inkscape:export-filename="D:\Apps\repositorio\branches\gui\eml\pressure_changers\icon\CentrifugalCompressor.png" 21 inkscape:export-xdpi="108" 22 inkscape:export-ydpi="108"> 19 23 <metadata 20 24 id="metadata2129"> … … 30 34 <defs 31 35 id="defs2127"> 36 <marker 37 inkscape:stockid="EmptyTriangleOutL" 38 orient="auto" 39 refY="0.0" 40 refX="0.0" 41 id="EmptyTriangleOutL" 42 style="overflow:visible"> 43 <path 44 id="path3328" 45 d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z " 46 style="fill-rule:evenodd;fill:#FFFFFF;stroke:#000000;stroke-width:1.0pt;marker-start:none" 47 transform="scale(0.8) translate(-6,0)" /> 48 </marker> 49 <marker 50 inkscape:stockid="EmptyTriangleInL" 51 orient="auto" 52 refY="0.0" 53 refX="0.0" 54 id="EmptyTriangleInL" 55 style="overflow:visible"> 56 <path 57 id="path3319" 58 d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z " 59 style="fill-rule:evenodd;fill:#FFFFFF;stroke:#000000;stroke-width:1.0pt;marker-start:none" 60 transform="scale(-0.8) translate(-6,0)" /> 61 </marker> 62 <inkscape:perspective 63 sodipodi:type="inkscape:persp3d" 64 inkscape:vp_x="0 : 526.18109 : 1" 65 inkscape:vp_y="0 : 1000 : 0" 66 inkscape:vp_z="744.09448 : 526.18109 : 1" 67 inkscape:persp3d-origin="372.04724 : 350.78739 : 1" 68 id="perspective19" /> 32 69 <linearGradient 33 70 id="linearGradient3913"> … … 65 102 y2="390.36218" 66 103 gradientUnits="userSpaceOnUse" 67 gradientTransform="matrix( 0.704551,0,0,1.003186,100.134,-1.568554)" />104 gradientTransform="matrix(1.5321645,0,0,0.9953023,-261.39319,2.8065289)" /> 68 105 </defs> 69 106 <sodipodi:namedview … … 80 117 id="base" 81 118 showgrid="true" 82 inkscape:zoom=" 0.71648337"119 inkscape:zoom="2.026521" 83 120 inkscape:cx="372.04724" 84 inkscape:cy="5 26.18109"85 inkscape:window-x=" -4"86 inkscape:window-y=" -4"121 inkscape:cy="595.95584" 122 inkscape:window-x="0" 123 inkscape:window-y="97" 87 124 inkscape:current-layer="svg2124" /> 88 125 <path 89 style="fill:url(#linearGradient3919);fill-opacity:1;fill-rule:evenodd;stroke: black;stroke-width:3.36284566;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"90 d="M 339.68142,412.10732 L 339.68142,592.68076 L 438.31858,532.48961 L 438.31858,452.23475 L 339.68142,392.0436 L 339.68142,412.10732 L 339.68142,412.10732"126 style="fill:url(#linearGradient3919);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:4.93958187;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" 127 d="M 259.54292,413.23147 L 259.54292,592.38585 L 474.046,532.66772 L 474.046,453.04356 L 259.54292,393.32543 L 259.54292,413.23147 L 259.54292,413.23147" 91 128 id="path2131" /> 92 129 <path 93 style="fill:none;fill-rule:evenodd;stroke: black;stroke-width:3.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"94 d="M 2 60.33264,492.36218 C 340.16736,492.36218 340.16736,492.36218 340.16736,492.36218"95 id="path 3921" />130 style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.8903805;stroke-linecap:square;stroke-linejoin:miter;marker-end:url(#EmptyTriangleOutL);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" 131 d="M 279.28963,369.70701 C 279.79407,397.75019 279.79407,397.75019 279.79407,397.75019" 132 id="path2392" /> 96 133 <path 97 style="fill:none;fill-rule:evenodd;stroke: black;stroke-width:3.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"98 d="M 4 36.90786,491.05839 C 516.74258,491.05839 516.74258,491.05839 516.74258,491.05839"99 id="path 5693" />134 style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.8903805;stroke-linecap:square;stroke-linejoin:miter;marker-end:url(#EmptyTriangleOutL);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" 135 d="M 462.10585,537.48222 C 462.61029,565.5254 462.61029,565.5254 462.61029,565.5254" 136 id="path4465" /> 100 137 <path 101 style="fill:black;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.61016744px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" 102 d="M 252.30508,482.60285 L 252.30508,502.0571 L 282.92498,492.32998 L 252.30508,482.60285 z " 103 id="path5695" /> 104 <path 105 style="fill:black;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.61016744px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" 106 d="M 505.07502,480.66727 L 505.07502,500.12152 L 535.69492,490.3944 L 505.07502,480.66727 z " 107 id="path6582" /> 138 style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2.90423274;stroke-linecap:square;stroke-linejoin:miter;marker-end:url(#EmptyTriangleOutL);stroke-miterlimit:4;stroke-dasharray:2.90423274,2.90423274;stroke-opacity:1;stroke-dashoffset:0" 139 d="M 188.30905,495.49505 C 259.256,495.02443 259.256,495.02443 259.256,495.02443" 140 id="path4467" /> 108 141 </svg> -
branches/gui/sample/pressure_changers/sample_compressor.mso
r585 r595 28 28 FlowSheet compressor_C1 29 29 30 DEVICES31 S1 as source;32 C1 as centrifugal_compressor;33 34 CONNECTIONS35 S1.Outlet to C1.Inlet;36 37 30 PARAMETERS 38 31 PP as Plugin (Brief="External Physical Properties", … … 44 37 NComp as Integer (Default= 1); 45 38 39 DEVICES 40 S1 as source; 41 W1 as work_source; 42 C1 as centrifugal_compressor; 43 44 CONNECTIONS 45 S1.Outlet to C1.Inlet; 46 W1.Work to C1.WorkIn; 47 48 46 49 SET 47 50 NComp = PP.NumberOfComponents; 48 51 49 S1.ValidPhases = " Liquid-Only";52 S1.ValidPhases = "Vapour-Only"; 50 53 S1.CompositionBasis = "Molar"; 51 54 … … 59 62 C1.Outlet.P = 3 * 'atm'; 60 63 end 64 65 FlowSheet compressor_C2 66 67 PARAMETERS 68 PP as Plugin (Brief="External Physical Properties", 69 Type="PP", 70 Components = ["propane"], 71 LiquidModel = "IdealLiquid", 72 VapourModel = "Ideal" 73 ); 74 NComp as Integer (Default= 1); 75 76 DEVICES 77 S1 as source; 78 C1 as centrifugal_compressor; 79 80 CONNECTIONS 81 S1.Outlet to C1.Inlet; 82 83 84 SET 85 NComp = PP.NumberOfComponents; 86 87 S1.ValidPhases = "Vapour-Only"; 88 S1.CompositionBasis = "Molar"; 89 90 SPECIFY 91 C1.Effs = 0.75; 92 S1.F = 41.05 * 'kmol/h'; 93 S1.P = 1 * 'atm'; 94 S1.T = 298 * 'K' ; 95 S1.Composition = [01]; 96 97 C1.Outlet.P = 3 * 'atm'; 98 end
Note: See TracChangeset
for help on using the changeset viewer.