modelSafetyValveFlash

Safety valve calculation for flashing liquids, according to API standard 520 Annex C.2.1

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

Information

It implements the calculation methodology described at API 520 Annex C section C.2.1, based on isentropic flow. In order to get the flow, an array of 25 pressures, between inlet and outlet pressures, are tested, and the higher flow is taken. Instead of implementing the integration of dP ρ to obtain the velocity, the relationship d( v 2) 2 =-dH has been used. 

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.DensityRhoAinlet density
Modelica.Units.SI.DynamicViscosityMuAinlet viscosity
Modelica.Units.SI.TemperatureTainlet temperature
Modelica.Units.SI.SpecificEnthalpyHa
RealGFagas fraction at inlet
Real[25]GFcorifice gas fractions at testing pressures
Modelica.Units.SI.AbsolutePressure[25]Pcorifice outlet pressures to find for critical flow
Modelica.Units.SI.AbsolutePressurePmaxorifice outlet pressure for critical flow
Medium.ThermodynamicStateStateCorifice thermodynamic state
Modelica.Units.SI.SpecificEnthalpy[25]Hcorifice specific enthalpy at testing pressures
Modelica.Units.SI.Density[25]RhoCorifice density at testing pressures
Modelica.Units.SI.Velocity[25]Vcorifice velocity at testing pressures
Real[25]Gcorifice mass velocity at testing pressures
RealGmaxcritical mass velocity
Modelica.Units.SI.ReynoldsNumberReReynolds number at orifice
RealKbcorrection coefficient for back pressure
RealKvviscosity correction factor for liquids