using "pressure_changers/valve"; FlowSheet valve_Test_V # with vapour conditions PARAMETERS PP as CalcObject(Brief="Physical Properties",File="vrpp"); NComp as Integer; SET PP.Components = [ "isobutane", "n-pentane"]; PP.LiquidModel = "PR"; PP.VapourModel = "PR"; NComp = PP.NumberOfComponents; DEVICES v1 as valve; s1 as stream_therm; CONNECTIONS s1 to v1.Inlet; SPECIFY s1.P = 150 * "kPa"; s1.T = 281.75 * "K"; s1.z = [0.664, 0.336]; s1.v = 0.0; v1.x = 0.866; v1.Outlet.P = 148 * "kPa"; SET v1.k = 20 * "gal/min/psi^0.5"; OPTIONS relativeAccuracy = 1e-6; outputLevel = "high"; time = [0:20:1000]; mode = "steady"; end FlowSheet valve_Test_L #with liquid conditions PARAMETERS PP as CalcObject(Brief="Physical Properties",File="vrpp"); NComp as Integer; SET PP.Components = [ "isobutane", "n-pentane"]; PP.LiquidModel = "PR"; PP.VapourModel = "PR"; NComp = PP.NumberOfComponents; DEVICES v1 as valve; s1 as stream_therm; CONNECTIONS s1 to v1.Inlet; SPECIFY s1.P = 185 * "kPa"; s1.T = 328.12 * "K"; s1.z = [0.001848, 0.9982]; s1.v = 0.0; v1.x = 0.3363; v1.Outlet.P = 183 * "kPa"; SET v1.k = 20 * "gal/min/psi^0.5"; OPTIONS relativeAccuracy = 1e-6; outputLevel = "high"; time = [0:20:1000]; mode = "steady"; end