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 to obtain the velocity, the relationship has been used.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.AbsolutePressure | pSet | 1.01325e5 | |
| Boolean | balancedValve | false | If balanced, Kb must be applied |
| Boolean | useFixedArea | true | if false, the flow will be fixed |
| Modelica.Units.SI.Area | fixedArea | 0.0 | area to use if useFixedArea=true |
| Modelica.Units.SI.MassFlowRate | fixedFlow | flow to use if useFixedArea=false | |
| Real | kd | 0.975 | discharge coefficient. Default gas:0.975, rup.disk: 0.62, liquid=0.65, biphasic=0.85 |
| Real | kc | 1.0 | 0.9 if it is a safety valve with an upstream bursting disk |
| Ports links | |||
| Boolean | useElevDifference (from TwoFluidPorts) | true | introduces, or not, an equation for the ports elevation. Use only in one connector |
| FreeFluids.Types.ElevationOption | elevCalcMethod (from TwoFluidPorts) | FreeFluids.Types.ElevationOption.differential | if useElevDifference==true, selects the equation to use: differential, or absolute for PortB |
| Modelica.Units.SI.Length | elevDifference (from TwoFluidPorts) | 0.0 | used only if previously selected. Positive if PortB higher than PortA |
| Modelica.Units.SI.Length | portBelevation (from TwoFluidPorts) | 0.0 | used only if previously selected. |
| Boolean | calcEnthalpyDifference (from TwoFluidPorts) | true | if true, will calculate the enthalpy difference between ports. Use only in one connector |
| Boolean | passComposition (from TwoFluidPorts) | true | if true, the equation PortA.X=PortB.X will be activated |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| FreeFluids.Interfaces.FluidPortA | PortA (from TwoFluidPorts) | ||
| FreeFluids.Interfaces.FluidPortB | PortB (from TwoFluidPorts) |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.SpecificEnthalpy | Hdiff (from TwoFluidPorts) | specific enthalpy difference: Port B - Port A | |
| Modelica.Units.SI.PressureDifference | Pdiff (from TwoFluidPorts) | pressure difference: Port B - Port A | |
| Modelica.Units.SI.Area | A | Discharge orifice area | |
| Modelica.Units.SI.Area | Aeff | Effective orifice area | |
| Medium.ThermodynamicState | StateA | thermodynamic state at inlet | |
| Modelica.Units.SI.Density | RhoA | inlet density | |
| Modelica.Units.SI.DynamicViscosity | MuA | inlet viscosity | |
| Modelica.Units.SI.Temperature | Ta | inlet temperature | |
| Modelica.Units.SI.SpecificEnthalpy | Ha | ||
| Real | GFa | gas fraction at inlet | |
| Real[25] | GFc | orifice gas fractions at testing pressures | |
| Modelica.Units.SI.AbsolutePressure[25] | Pc | orifice outlet pressures to find for critical flow | |
| Modelica.Units.SI.AbsolutePressure | Pmax | orifice outlet pressure for critical flow | |
| Medium.ThermodynamicState | StateC | orifice thermodynamic state | |
| Modelica.Units.SI.SpecificEnthalpy[25] | Hc | orifice specific enthalpy at testing pressures | |
| Modelica.Units.SI.Density[25] | RhoC | orifice density at testing pressures | |
| Modelica.Units.SI.Velocity[25] | Vc | orifice velocity at testing pressures | |
| Real[25] | Gc | orifice mass velocity at testing pressures | |
| Real | Gmax | critical mass velocity | |
| Modelica.Units.SI.ReynoldsNumber | Re | Reynolds number at orifice | |
| Real | Kb | correction coefficient for back pressure | |
| Real | Kv | viscosity correction factor for liquids |