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
| 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 | |||
| Integer | selectStd | 2 | 1=ISO 4126-1, 2=API 520 |
| 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.975 | discharge coefficient(API). Default gas:0.975, rup.disk: 0.62, liquid=0.65 |
| Real | kdr | 0.8775 | derated discharge coefficient (ISO). Default gas:0.8775, liquid: 0.585 |
| Real | kc | 1.0 | Only for API: 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 |
| Real | kb | 1.0 | Only for API: backpressure correction factor from manufacturer |
| User phys. prop. | |||
| Boolean | useFixedDensity | false | if true, density is taken from manually fixed value. If false, from Medium calculation |
| Modelica.Units.SI.Density | rhoA | 1e3 | manually fixed density at inlet |
| Real | z | 1.0 | if useFixedDensity=true and rhoA=0, density is calculated from Z and MW |
| Real | mw | 18.015 | molar mass. Used if useFixedDensity=true and rhoA=0 |
| Modelica.Units.SI.IsentropicExponent | gamma | 1.0 | isentropic coefficient |
| 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.Density | RhoA | ||
| Modelica.Units.SI.DynamicViscosity | MuA | ||
| Modelica.Units.SI.IsentropicExponent | Gamma | isentropic exponent | |
| Modelica.Units.SI.AbsolutePressure | Pc | discharge pressure for critical flow | |
| Real | Overpressure | ||
| Real | C | isentropic exponent dependent coefficient | |
| Real | Kb | correction coefficient for gas back pressure | |
| Real | F2 | correction coefficent for subcritical gas flow (API) | |
| Real | Kw | correction coefficient for liquid back pressure | |
| Real | Kv | correction coefficient for liquid viscosity | |
| Modelica.Units.SI.ReynoldsNumber | Re | Reynolds number at orifice |