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
| Type | Name | Default | Description |
|---|---|---|---|
| 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 |
| Basic | |||
| Boolean | liquidInlet | true | if false, a biphasic inlet calculation is used |
| Modelica.Units.SI.AbsolutePressure | pSet | 1.01325e5 | set pressure |
| 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 | 0.0 | flow to use if useFixedArea=false |
| Real | kd | 0.85 | discharge coefficient(API). Default two phases: 0.85, gas:0.975, rup.disk: 0.62, liquid=0.65 |
| Real | kc | 1.0 | 0.9 if it is a safety valve with an upstream bursting disk |
| Boolean | balancedValve | false | If balanced, Kb must be applied for API critical flow |
| User phys. prop. | |||
| Boolean | useFixedDensities | false | if true, density is taken from manually fixed value. If false, from Medium calculation |
| Modelica.Units.SI.AbsolutePressure | pSatur | 0.0 | manually fixed saturation pressure of the inlet. Only if liquidInlet=true |
| Modelica.Units.SI.Density | rhoA | 1e3 | manually fixed density at inlet |
| Modelica.Units.SI.Density | rhoA9 | 1e3 | manually fixed density at 0.9 of inlet pressure/saturation pressure |
| Boolean | useFixedViscosity | false | if true, viscosity is taken from manually fixed value. If false, from Medium calculation |
| Modelica.Units.SI.DynamicViscosity | muA | 1e-3 | fixed viscosity at inlet |
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 | |
| Medium.ThermodynamicState | StateA | thermodynamic state at inlet | |
| Modelica.Units.SI.Temperature | Ta | inlet temperature | |
| Modelica.Units.SI.AbsolutePressure | Ps | saturation pressure of the inlet | |
| Real | Nst | transition saturation pressure ratio | |
| Real | Ns | saturation pressure ratio: Ps/P inlet | |
| Modelica.Units.SI.Density | RhoA | inlet density | |
| Modelica.Units.SI.Density | RhoA9 | inlet density at 0.9 of inlet pressure/saturation pressure | |
| Modelica.Units.SI.DynamicViscosity | MuA | inlet viscosity | |
| Real | Omega | ||
| Real | Nc | critical ratio of pressures | |
| Modelica.Units.SI.AbsolutePressure | Pc | discharge pressure for critical flow | |
| Real | Overpressure | ||
| Real | Kb | correction coefficient for gas back pressure | |
| Real | Kw | correction coefficient for liquid back pressure | |
| Real | Kv | correction coefficient for liquid viscosity | |
| Modelica.Units.SI.ReynoldsNumber | Re | Reynolds number at orifice |