modelSafetyValveOmega

Safety valve calculation for flashing liquids, according to API standard 520 Annex C.2.2-3

Extends from FreeFluids.Interfaces.TwoFluidPorts (To be used by equipment with two fluid ports.).

Information

It is a model for safety valves working with flashing liquids, according to API 520 Annex C sections C.2.2 and C.2.3. The parameter Boolean liquidInlet allows you so select the calculation method to use, if made true it will use the C.2.3 methodology, that works with an inlet 100% in liquid state. Otherwise the C.2.2 method will be used. The parameters allow you to choose between fixing the discharge area or the flow, configure the basic characteristics of the valve, and enter the physical properties or let them to be taken from the Medium. 

Parameters

TypeNameDefaultDescription
Ports links
BooleanuseElevDifference (from TwoFluidPorts)trueintroduces, or not, an equation for the ports elevation. Use only in one connector
FreeFluids.Types.ElevationOptionelevCalcMethod (from TwoFluidPorts)FreeFluids.Types.ElevationOption.differentialif useElevDifference==true, selects the equation to use: differential, or absolute for PortB
Modelica.Units.SI.LengthelevDifference (from TwoFluidPorts)0.0used only if previously selected. Positive if PortB higher than PortA
Modelica.Units.SI.LengthportBelevation (from TwoFluidPorts)0.0used only if previously selected.
BooleancalcEnthalpyDifference (from TwoFluidPorts)trueif true, will calculate the enthalpy difference between ports. Use only in one connector
BooleanpassComposition (from TwoFluidPorts)trueif true, the equation PortA.X=PortB.X will be activated
Basic
BooleanliquidInlettrueif false, a biphasic inlet calculation is used
Modelica.Units.SI.AbsolutePressurepSet1.01325e5set pressure
BooleanuseFixedAreatrueif false, the flow will be fixed
Modelica.Units.SI.AreafixedArea0.0area to use if useFixedArea=true
Modelica.Units.SI.MassFlowRatefixedFlow0.0flow to use if useFixedArea=false
Realkd0.85discharge coefficient(API). Default two phases: 0.85, gas:0.975, rup.disk: 0.62, liquid=0.65
Realkc1.00.9 if it is a safety valve with an upstream bursting disk
BooleanbalancedValvefalseIf balanced, Kb must be applied for API critical flow
User phys. prop.
BooleanuseFixedDensitiesfalseif true, density is taken from manually fixed value. If false, from Medium calculation
Modelica.Units.SI.AbsolutePressurepSatur0.0manually fixed saturation pressure of the inlet. Only if liquidInlet=true
Modelica.Units.SI.DensityrhoA1e3manually fixed density at inlet
Modelica.Units.SI.DensityrhoA91e3manually fixed density at 0.9 of inlet pressure/saturation pressure
BooleanuseFixedViscosityfalseif true, viscosity is taken from manually fixed value. If false, from Medium calculation
Modelica.Units.SI.DynamicViscositymuA1e-3fixed viscosity at inlet

Connectors

TypeNameDefaultDescription
FreeFluids.Interfaces.FluidPortAPortA (from TwoFluidPorts)
FreeFluids.Interfaces.FluidPortBPortB (from TwoFluidPorts)

Components

TypeNameDefaultDescription
Modelica.Units.SI.SpecificEnthalpyHdiff (from TwoFluidPorts)specific enthalpy difference: Port B - Port A
Modelica.Units.SI.PressureDifferencePdiff (from TwoFluidPorts)pressure difference: Port B - Port A
Modelica.Units.SI.AreaADischarge orifice area
Medium.ThermodynamicStateStateAthermodynamic state at inlet
Modelica.Units.SI.TemperatureTainlet temperature
Modelica.Units.SI.AbsolutePressurePssaturation pressure of the inlet
RealNst transition saturation pressure ratio
RealNssaturation pressure ratio: Ps/P inlet
Modelica.Units.SI.DensityRhoAinlet density
Modelica.Units.SI.DensityRhoA9inlet density at 0.9 of inlet pressure/saturation pressure
Modelica.Units.SI.DynamicViscosityMuAinlet viscosity
RealOmega
RealNccritical ratio of pressures
Modelica.Units.SI.AbsolutePressurePcdischarge pressure for critical flow
RealOverpressure
RealKbcorrection coefficient for gas back pressure
RealKwcorrection coefficient for liquid back pressure
RealKvcorrection coefficient for liquid viscosity
Modelica.Units.SI.ReynoldsNumberReReynolds number at orifice