modelSafetyValveStd

Safety valve calculation according to ISO 4126-1 and API 520

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

Information

API 520 and ISO 4126-1 calculation methods are implemented, with the API one as default. It is limited to monophasic flow. Although a Medium is declared, and physical properties can be taken from it (except the isentropic coefficient for gases, that must be always entered by hand), there is the possibility of manual entering of all the physical properties. If you enter all physical properties manually, you can use data for a different fluid than that of the Medium. The Medium will be used just for generating P and H at the PortA, with H being passed to the PortB if the calculation has been activated. As H is not used in the calculation of the flow, if the pressures are OK the calculation should be fine.

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
IntegerselectStd21=ISO 4126-1, 2=API 520
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.975discharge coefficient(API). Default gas:0.975, rup.disk: 0.62, liquid=0.65
Realkdr0.8775derated discharge coefficient (ISO). Default gas:0.8775, liquid: 0.585
Realkc1.0Only for API: 0.9 if it is a safety valve with an upstream bursting disk
BooleanbalancedValvefalseIf balanced, Kb must be applied for API critical flow
Realkb1.0Only for API: backpressure correction factor from manufacturer
User phys. prop.
BooleanuseFixedDensityfalseif true, density is taken from manually fixed value. If false, from Medium calculation
Modelica.Units.SI.DensityrhoA1e3manually fixed density at inlet
Realz1.0if useFixedDensity=true and rhoA=0, density is calculated from Z and MW
Realmw18.015molar mass. Used if useFixedDensity=true and rhoA=0
Modelica.Units.SI.IsentropicExponentgamma1.0isentropic coefficient
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.DensityRhoA
Modelica.Units.SI.DynamicViscosityMuA
Modelica.Units.SI.IsentropicExponentGammaisentropic exponent
Modelica.Units.SI.AbsolutePressurePcdischarge pressure for critical flow
RealOverpressure
RealCisentropic exponent dependent coefficient
RealKbcorrection coefficient for gas back pressure
RealF2correction coefficent for subcritical gas flow (API)
RealKwcorrection coefficient for liquid back pressure
RealKvcorrection coefficient for liquid viscosity
Modelica.Units.SI.ReynoldsNumberReReynolds number at orifice