#*------------------------------------------------------------------- * EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC. * * This LIBRARY is free software; you can distribute it and/or modify * it under the therms of the ALSOC FREE LICENSE as available at * http://www.enq.ufrgs.br/alsoc. * * EMSO Copyright (C) 2004 - 2007 ALSOC, original code * from http://www.rps.eng.br Copyright (C) 2002-2004. * All rights reserved. * * EMSO is distributed under the therms of the ALSOC LICENSE as * available at http://www.enq.ufrgs.br/alsoc. * *-------------------------------------------------------------------- * Sample file for models valve_simplified and valve *-------------------------------------------------------------------- * * This sample file needs VRTherm DEMO (www.vrtech.com.br) to run. * *---------------------------------------------------------------------- * Author: Paula B. Staudt, Estefane Horn, Núbia do Carmo Ferreira * $Id: sample_valve.mso 247 2007-04-24 13:44:18Z rafael $ *--------------------------------------------------------------------*# using "pressure_changers/valve"; FlowSheet valve_Test_V # with vapour conditions PARAMETERS PP as Plugin(Brief="Physical Properties", Type="PP", Components = [ "isobutane", "benzene"], LiquidModel = "PR", VapourModel = "PR" ); NComp as Integer; SET NComp = PP.NumberOfComponents; DEVICES v1 as valve_simplified; s1 as source; CONNECTIONS s1.Outlet to v1.Inlet; SPECIFY s1.Outlet.P = 150 * 'kPa'; s1.Outlet.T = 281.75 * 'K'; s1.Outlet.z = [0.664, 0.336]; v1.x = 0.866; v1.Outlet.P = 148 * 'kPa'; SET v1.k = 20 * 'gal/min/psi^0.5'; OPTIONS Dynamic = false; NLASolver( RelativeAccuracy = 1e-6 ); end FlowSheet valve_Test_L #with liquid conditions PARAMETERS PP as Plugin(Brief="Physical Properties", Type="PP", Components = [ "isobutane", "benzene"], LiquidModel = "PR", VapourModel = "PR" ); NComp as Integer; SET NComp = PP.NumberOfComponents; DEVICES v1 as valve_simplified; s1 as source; CONNECTIONS s1.Outlet to v1.Inlet; SPECIFY s1.Outlet.P = 185 * 'kPa'; s1.Outlet.T = 328.12 * 'K'; s1.Outlet.z = [0.001848, 0.9982]; v1.x = 0.3363; v1.Outlet.P = 183 * 'kPa'; SET v1.k = 20 * 'gal/min/psi^0.5'; OPTIONS Dynamic = false; NLASolver( RelativeAccuracy = 1e-6 ); end FlowSheet valve_linear_Test DEVICES S1 as source; V1 as valve; CONNECTIONS S1.Outlet to V1.Inlet; PARAMETERS PP as Plugin(Brief="Physical Properties", Type="PP", Components = [ "isobutane", "benzene"], LiquidModel = "PR", VapourModel = "PR" ); NComp as Integer (Default= 1); SET NComp = PP.NumberOfComponents; V1.valve_type = "linear"; #"parabolic", "equal", "quick", "hyperbolic" SPECIFY S1.Outlet.P = 2169.78 * 'kPa'; S1.Outlet.T = 394.26 * 'K' ; S1.Outlet.z = [1]; V1.Qv = 113.56 * 'm^3/h'; V1.x = 0.5; V1.cv = 10 * 'm^3/h/kPa^0.5'; OPTIONS Dynamic = false; NLASolver( RelativeAccuracy = 1e-6 ); end