Class LeakModel
java.lang.Object
neqsim.process.safety.release.LeakModel
- All Implemented Interfaces:
Serializable
Calculates source terms for leak and rupture release scenarios.
This class provides methods for calculating time-dependent release rates from pressurized vessels or pipes. The calculations use NeqSim thermodynamics for accurate real-gas properties and phase behavior.
Key capabilities:
- Choked (sonic) and subsonic flow
- Two-phase flashing releases
- Time-dependent blowdown from vessels
- Jet properties (velocity, momentum)
- Droplet size estimation for liquid releases
Example usage:
SystemInterface gas = new SystemSrkEos(300.0, 50.0);
gas.addComponent("methane", 1.0);
gas.setMixingRule("classic");
LeakModel leak = new LeakModel.builder().fluid(gas).holeDiameter(0.02) // 20mm hole
.orientation(ReleaseOrientation.HORIZONTAL).vesselVolume(10.0) // 10 m³
.dischargeCoefficient(0.62).build();
SourceTermResult result = leak.calculateSourceTerm(300.0); // 5 minutes
result.exportToPHAST("release.csv");
References:
- API 520 - Sizing and Selection of Pressure-Relieving Devices
- CCPS - Guidelines for Consequence Analysis
- Yellow Book (TNO) - Methods for calculation of physical effects
- Version:
- 1.0
- Author:
- ESOL
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final doubleprivate final doubleprivate final SystemInterfaceprivate final doubleprivate final ReleaseOrientationprivate final Stringprivate static final longprivate final double -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LeakModel.Builderbuilder()Creates a new builder for LeakModel.doublecalculateDropletSMD(SystemInterface system) Estimates liquid droplet Sauter Mean Diameter (SMD) for two-phase releases.doublecalculateJetMomentum(SystemInterface system) Calculates the jet momentum (reaction force).doublecalculateJetVelocity(SystemInterface system) Calculates the jet velocity at the orifice exit.doublecalculateMassFlowRate(SystemInterface system) Calculates the instantaneous mass flow rate through the orifice.calculateSourceTerm(double duration) Calculates time-dependent source term for vessel blowdown.calculateSourceTerm(double duration, double timeStep) Calculates time-dependent source term for vessel blowdown.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
fluid
-
holeDiameter
private final double holeDiameter -
orientation
-
vesselVolume
private final double vesselVolume -
dischargeCoefficient
private final double dischargeCoefficient -
backPressure
private final double backPressure -
scenarioName
-
-
Constructor Details
-
LeakModel
-
-
Method Details
-
calculateMassFlowRate
Calculates the instantaneous mass flow rate through the orifice.Uses choked or subsonic flow equations depending on pressure ratio.
- Parameters:
system- thermodynamic system at current conditions- Returns:
- mass flow rate [kg/s]
-
calculateJetVelocity
Calculates the jet velocity at the orifice exit.- Parameters:
system- thermodynamic system at current conditions- Returns:
- jet velocity [m/s]
-
calculateJetMomentum
Calculates the jet momentum (reaction force).- Parameters:
system- thermodynamic system at current conditions- Returns:
- jet momentum / reaction force [N]
-
calculateDropletSMD
Estimates liquid droplet Sauter Mean Diameter (SMD) for two-phase releases.Uses correlation from CCPS Guidelines for Consequence Analysis.
- Parameters:
system- thermodynamic system at current conditions- Returns:
- droplet SMD [m], or 0 if all vapor
-
calculateSourceTerm
Calculates time-dependent source term for vessel blowdown.- Parameters:
duration- simulation duration [s]- Returns:
- source term result with time series
-
calculateSourceTerm
Calculates time-dependent source term for vessel blowdown.- Parameters:
duration- simulation duration [s]timeStep- time step [s]- Returns:
- source term result with time series
-
builder
Creates a new builder for LeakModel.- Returns:
- new builder instance
-