modelSafetyValve

Single phase flow calculation using Medium's physical properties, and adiabatic, isentropic, flow

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

Information

Allows the calculation of the flow or the area of a safety relief valve or disk. It uses isentropic calculation between the inlet, supposed with velocity equal to 0, and the orifice. The gas flow can be chocked or not, and all the calculations are done with the physical properties calculated by the Medium, except the possibility of manual entering of the isentropic coefficient. Correction coefficients are applied for backpressure and for viscosity, according to the API 520 methodology. It is capable for biphasic flow calculation, but the model SafetyValveFlash, that conforms to the API recommenations, is probably more adequate.
Two thermodynamic states are declared at the orifice outlet, both isentropics with the inlet. One of them at the discharge pressure of the valve, the other adjusted to obtain sonic speed at the orifice. If the discharge pressure is below the obtained critical pressure, the flow is taken from the critical calculation, if not from the discharge pressure calculation.

Parameters

TypeNameDefaultDescription
Modelica.Units.SI.AbsolutePressurepSet1.01325e5
BooleanbalancedValvefalseIf balanced, Kb must be applied
BooleanuseFixedAreatrueif false, the flow will be fixed
Modelica.Units.SI.AreafixedArea0.0area to use if useFixedArea=true
Modelica.Units.SI.MassFlowRatefixedFlowflow to use if useFixedArea=false
Realkd0.975discharge coefficient. Default gas:0.975, rup.disk: 0.62, liquid=0.65, biphasic=0.85
Realkc1.00.9 if it is a safety valve with an upstream bursting disk
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

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
Modelica.Units.SI.AreaAeffEffective orifice area
Medium.ThermodynamicStateStateAthermodynamic state at inlet
Modelica.Units.SI.DensityRhoA
Modelica.Units.SI.DynamicViscosityMuA
Modelica.Units.SI.AbsolutePressurePcorifice outlet pressure for critical flow
Medium.ThermodynamicStateStateCorifice thermodynamic state at critical flow
Modelica.Units.SI.SpecificEnthalpyHcorifice specific enthalpy at critical flow
Modelica.Units.SI.DensityRhoCorifice density at critical flow
Modelica.Units.SI.VelocityVcvelocity of sound at orifice discharge
Modelica.Units.SI.MassFlowRateGccritical flow
Medium.ThermodynamicStateStateBthermodynamic state at orifice at PortB pressure
Modelica.Units.SI.DensityRhoBorifice density at PortB pressure
Modelica.Units.SI.SpecificEnthalpyHborifice specific enthalpy at P
Modelica.Units.SI.VelocityVbvelocity at orifice discharge
Modelica.Units.SI.MassFlowRateGb
Modelica.Units.SI.ReynoldsNumberReReynolds number at orifice
RealKbcorrection coefficient for back pressure
RealKvviscosity correction factor for liquids