Class Ejector
- All Implemented Interfaces:
Serializable, Runnable, AutoSizeable, CapacityConstrainedEquipment, ProcessEquipmentInterface, ProcessElementInterface, SimulationInterface, NamedInterface
Supports both constant-pressure mixing (CPM) and constant-area mixing (CAM) models, and calculates critical back pressure, Mach numbers, and area ratios needed for vendor-style ejector sizing (e.g. Transvac, Croll Reynolds, Schutte & Koerting). The CPM model is the standard method used by most ejector vendors including Transvac for gas-gas and steam ejector design.
The ejector implements AutoSizeable for automatic sizing based on
flow conditions and CapacityConstrainedEquipment for
capacity analysis with constraints for entrainment ratio, compression ratio, and critical back
pressure.
Key Transvac-style parameters accessible after run():
- Entrainment ratio (ER) = suction mass flow / motive mass flow
- Compression ratio (CR) = discharge pressure / suction pressure
- Expansion ratio = motive pressure / discharge pressure
- Critical back pressure = max discharge pressure before ejector breaks down
- Area ratio = mixing section area / motive nozzle throat area
- Mach numbers at nozzle exit, suction, and mixing section
- Version:
- 2.0
- Author:
- esol
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleArea ratio = mixing area / motive nozzle throat area.private booleanFlag indicating if ejector has been auto-sized.private static final doubleprivate doubleCompression ratio = discharge pressure / suction pressure.private doubleCritical back pressure in bara (max discharge before breakdown).private static final doubleprivate static final doubleprivate static final doubleprivate static final doubleprivate doubleDesign compression ratio (discharge/suction pressure).private doubleprivate booleanprivate doubleDesign entrainment ratio (suction/motive mass ratio).private doubleDesign motive flow rate in kg/s.private doubleprivate booleanprivate doubleprivate doubleprivate booleanprivate doubleprivate doubleprivate booleanFlag for capacity analysis.private Map<String, CapacityConstraint> Capacity constraints map.private doubleExpansion ratio = motive pressure / discharge pressure.private static final org.apache.logging.log4j.Loggerprivate doubleMaximum critical back pressure in bara.private EjectorMechanicalDesignprivate StreamInterfaceprivate doubleprivate doubleMach number of mixed flow at mixing section.private doubleprivate booleanWhether motive flow is choked at nozzle throat.private doubleMach number at motive nozzle exit.private StreamInterfaceprivate static final longSerialization version UID.private booleanWhether suction flow is choked (Mach >= 1).private doubleprivate booleanprivate doubleMach number of suction flow at mixing section entrance.private doubleprivate StreamInterfaceFields inherited from class ProcessEquipmentBaseClass
conditionAnalysisMessage, energyStream, hasController, isSolved, properties, reportFields inherited from class SimulationBaseClass
calcIdentifier, calculateSteadyState, timeFields inherited from class NamedBaseClass
name -
Constructor Summary
ConstructorsConstructorDescriptionEjector(String name, StreamInterface motiveStream, StreamInterface suctionStream) Constructs an Ejector with the specified name, motive stream, and suction stream. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCapacityConstraint(CapacityConstraint constraint) Adds a capacity constraint to this equipment.voidautoSize()Automatically size using default safety factor (1.2 = 20% margin).voidautoSize(double safetyFactor) Automatically size the equipment based on connected stream conditions.voidAutomatically size using company-specific design standards.private static doubleclamp(double value, double min, double max) voidClears all capacity constraints from this equipment.private static doublecylinderVolume(double area, double length) private static doublediameterFromArea(double area) private doubleestimateCriticalBackPressure(SystemInterface mixedFluidClone, double totalEnthalpy, double mixingPressureLocal, double currentDischargePressure) Estimates the critical back pressure for the ejector.private doubleestimateDefaultMixingPressure(double suctionPressure, double dischargePressure, double mDotMotive, double mDotSuction) private doubleestimateDesignDiffuserOutletVelocity(double mixingPressure, double dischargePressure, double rhoDiffuser, double mDotTotal) private doubleestimateDesignSuctionVelocity(double suctionPressure, double dischargePressure, double rhoSuction, double mDotSuction) private doubleestimateDischargeConnectionLength(double diffuserDiameter, double mixingPressure, double dischargePressure) private static doubleestimateLength(double diameter, double factor) private doubleEstimates the speed of sound in a fluid from thermodynamic properties.private doubleestimateSuctionConnectionLength(double suctionDiameter, double suctionPressure, double dischargePressure) List<double[]> generatePerformanceCurve(double minDischargePressure, double maxDischargePressure, int numPoints) Generates a performance map showing how entrainment ratio varies with discharge pressure at constant motive and suction conditions.doubleReturns the area ratio (mixing section area / motive nozzle throat area).Gets the bottleneck (most limiting) constraint for this equipment.Gets all capacity constraints defined for this equipment.doubleReturns the compression ratio (discharge pressure / suction pressure).doubleReturns the critical back pressure in bara.doubleGets the design compression ratio.doubleGets the design entrainment ratio.Backwards compatible accessor for mechanical design results.doubleGetter for the fielddiffuserEfficiency.doubleGetter for the fieldefficiencyIsentropic.doublegetEntrainmentRatio.doubleReturns the expansion ratio (motive pressure / discharge pressure).doublegetMassBalance(String unit) getMassBalance.doubleGets the maximum critical back pressure.doubleGets the maximum utilization across all enabled constraints.Get amechanicalDesignfor the equipment.Getter for the fieldmixedStream.doubleGets the mixing section efficiency.doubleReturns the Mach number of the mixed flow in the mixing section.doubleReturns the Mach number at the motive nozzle exit.Getter for the fieldmotiveStream.getOutStream.Get a detailed sizing report after auto-sizing.Get sizing report as JSON for programmatic access.doubleReturns the Mach number of the suction flow at the mixing section entrance.doubleGets the suction nozzle efficiency.Getter for the fieldsuctionStream.private voidInitialize ejector capacity constraints.voidInitialize ainitMechanicalDesignfor the equipment.booleanCheck if equipment has been auto-sized.booleanChecks if capacity analysis is enabled for this equipment.booleanChecks if any capacity constraint is violated (exceeds 100% utilization).booleanChecks if any HARD constraint limit is exceeded.booleanChecks if the current discharge pressure exceeds the critical back pressure, meaning the ejector is operating in breakdown mode and cannot maintain stable entrainment.booleanReturns whether the motive flow is choked at the nozzle.booleanReturns whether the suction flow is choked (Mach >= 1).booleanremoveCapacityConstraint(String constraintName) Removes a capacity constraint by name.voidIn this method all thermodynamic and unit operations will be calculated in a steady state calculation.voidsetCapacityAnalysisEnabled(boolean enabled) Enables or disables capacity analysis for this equipment.voidsetDesignCompressionRatio(double ratio) Sets the design compression ratio.voidsetDesignDiffuserOutletVelocity(double velocity) Sets the design diffuser outlet velocity used when calculating mechanical dimensions.voidsetDesignEntrainmentRatio(double ratio) Sets the design entrainment ratio.voidsetDesignSuctionVelocity(double velocity) Sets the design suction velocity used when calculating mechanical dimensions.voidsetDiffuserEfficiency(double diffuserEfficiency) Setter for the fielddiffuserEfficiency.voidsetDischargeConnectionLength(double length) Sets the straight length of discharge piping to include in total volume calculations.voidsetDischargePressure(double dischargePressure) Setter for the fielddischargePressure.voidsetEfficiencyIsentropic(double efficiencyIsentropic) Setter for the fieldefficiencyIsentropic.voidsetMaxCriticalBackPressure(double pressure) Sets the maximum critical back pressure.voidsetMixingEfficiency(double efficiency) Sets the mixing section efficiency.voidsetMixingPressure(double mixingPressure) Sets the target mixing pressure within the ejector.voidsetSuctionConnectionLength(double length) Sets the straight length of suction piping to include in total volume calculations.voidsetSuctionNozzleEfficiency(double efficiency) Sets the suction nozzle isentropic efficiency.voidsetThroatArea(double throatArea) Setter for the fieldthroatArea.toJson()Serializes the Process Equipment along with its state to a JSON string.toJson(ReportConfig cfg) Serializes the Process Equipment with configurable level of detail.Methods inherited from class ProcessEquipmentBaseClass
addController, copy, displayResult, equals, getAvailableMargin, getAvailableMarginPercent, getConditionAnalysisMessage, getConstraintEvaluationReport, getController, getController, getControllers, getEffectiveCapacityFactor, getEnergyStream, getEntropyProduction, getExergyChange, getFailureMode, getMassBalance, getMaxUtilizationPercent, getMinimumFlow, getPressure, getPressure, getProperty, getReferenceDesignation, getReport_json, getResultTable, getSpecification, getTemperature, getTemperature, getThermoSystem, getUtilizationSummary, hashCode, initElectricalDesign, initializeDefaultConstraints, initInstrumentDesign, isActive, isActive, isFailed, isNearCapacityLimit, isSetEnergyStream, reportResults, restoreFromFailure, run_step, runConditionAnalysis, setController, setEnergyStream, setEnergyStream, setFailureMode, setFlowValveController, setMinimumFlow, setPressure, setReferenceDesignation, setRegulatorOutSignal, setSpecification, setTemperature, simulateDegradedOperation, simulateTrip, solvedMethods inherited from class SimulationBaseClass
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTimeMethods inherited from class NamedBaseClass
getName, getTagNumber, setName, setTagNumberMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CapacityConstrainedEquipment
disableAllConstraints, enableAllConstraints, getAvailableMargin, getAvailableMarginPercent, getMaxUtilizationPercent, getUtilizationSummary, isNearCapacityLimitMethods inherited from interface NamedInterface
getName, getTagName, getTagNumber, setName, setTagName, setTagNumberMethods inherited from interface ProcessEquipmentInterface
getCapacityDuty, getCapacityMax, getElectricalDesign, getEquipmentState, getExergyChange, getExergyDestruction, getExergyDestruction, getFluid, getInletStreams, getInstrumentDesign, getOperatingEnvelopeViolation, getOutletFlowRate, getOutletPressure, getOutletStreams, getOutletTemperature, getReferenceDesignationString, getRestCapacity, getSimulationValidationErrors, isSimulationValid, isWithinOperatingEnvelope, needRecalculation, validateSetupMethods inherited from interface SimulationInterface
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, run, run_step, runTransient, runTransient, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTime
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
logger
private static final org.apache.logging.log4j.Logger logger -
motiveStream
-
suctionStream
-
mixedStream
-
dischargePressure
private double dischargePressure -
mixingPressure
private double mixingPressure -
efficiencyIsentropic
private double efficiencyIsentropic -
suctionNozzleEfficiency
private double suctionNozzleEfficiency -
mixingEfficiency
private double mixingEfficiency -
diffuserEfficiency
private double diffuserEfficiency -
designSuctionVelocity
private double designSuctionVelocity -
designDiffuserOutletVelocity
private double designDiffuserOutletVelocity -
designSuctionVelocityOverride
private boolean designSuctionVelocityOverride -
designDiffuserVelocityOverride
private boolean designDiffuserVelocityOverride -
suctionConnectionLength
private double suctionConnectionLength -
dischargeConnectionLength
private double dischargeConnectionLength -
suctionConnectionLengthOverride
private boolean suctionConnectionLengthOverride -
dischargeConnectionLengthOverride
private boolean dischargeConnectionLengthOverride -
mechanicalDesign
-
compressionRatio
private double compressionRatioCompression ratio = discharge pressure / suction pressure. -
expansionRatio
private double expansionRatioExpansion ratio = motive pressure / discharge pressure. -
criticalBackPressure
private double criticalBackPressureCritical back pressure in bara (max discharge before breakdown). -
areaRatio
private double areaRatioArea ratio = mixing area / motive nozzle throat area. -
motiveNozzleMach
private double motiveNozzleMachMach number at motive nozzle exit. -
suctionMach
private double suctionMachMach number of suction flow at mixing section entrance. -
mixingMach
private double mixingMachMach number of mixed flow at mixing section. -
suctionChoked
private boolean suctionChokedWhether suction flow is choked (Mach >= 1). -
motiveChoked
private boolean motiveChokedWhether motive flow is choked at nozzle throat. -
autoSized
private boolean autoSizedFlag indicating if ejector has been auto-sized. -
designEntrainmentRatio
private double designEntrainmentRatioDesign entrainment ratio (suction/motive mass ratio). -
designCompressionRatio
private double designCompressionRatioDesign compression ratio (discharge/suction pressure). -
maxCriticalBackPressure
private double maxCriticalBackPressureMaximum critical back pressure in bara. -
designMotiveFlowRate
private double designMotiveFlowRateDesign motive flow rate in kg/s. -
ejectorCapacityConstraints
Capacity constraints map. -
ejectorCapacityAnalysisEnabled
private boolean ejectorCapacityAnalysisEnabledFlag for capacity analysis. -
BAR_TO_PA
private static final double BAR_TO_PA- See Also:
-
DEFAULT_NOZZLE_LENGTH_FACTOR
private static final double DEFAULT_NOZZLE_LENGTH_FACTOR- See Also:
-
DEFAULT_SUCTION_LENGTH_FACTOR
private static final double DEFAULT_SUCTION_LENGTH_FACTOR- See Also:
-
DEFAULT_MIXING_LENGTH_FACTOR
private static final double DEFAULT_MIXING_LENGTH_FACTOR- See Also:
-
DEFAULT_DIFFUSER_LENGTH_FACTOR
private static final double DEFAULT_DIFFUSER_LENGTH_FACTOR- See Also:
-
-
Constructor Details
-
Ejector
Constructs an Ejector with the specified name, motive stream, and suction stream.- Parameters:
name- the name of the ejectormotiveStream- the motive streamsuctionStream- the suction stream
-
-
Method Details
-
setDischargePressure
public void setDischargePressure(double dischargePressure) Setter for the field
dischargePressure.- Parameters:
dischargePressure- a double
-
setEfficiencyIsentropic
public void setEfficiencyIsentropic(double efficiencyIsentropic) Setter for the field
efficiencyIsentropic.- Parameters:
efficiencyIsentropic- a double
-
setDiffuserEfficiency
public void setDiffuserEfficiency(double diffuserEfficiency) Setter for the field
diffuserEfficiency.- Parameters:
diffuserEfficiency- a double
-
setSuctionNozzleEfficiency
public void setSuctionNozzleEfficiency(double efficiency) Sets the suction nozzle isentropic efficiency. This accounts for losses in the suction flow path as the suction gas accelerates into the mixing section. Typical values: 0.85-0.95.- Parameters:
efficiency- suction nozzle efficiency (0-1)
-
getSuctionNozzleEfficiency
public double getSuctionNozzleEfficiency()Gets the suction nozzle efficiency.- Returns:
- suction nozzle efficiency
-
setMixingEfficiency
public void setMixingEfficiency(double efficiency) Sets the mixing section efficiency. This accounts for momentum losses during the mixing of motive and suction streams due to turbulence and friction. Typical values: 0.80-0.95. Transvac-type ejectors with optimised mixing sections typically achieve 0.85-0.92.- Parameters:
efficiency- mixing efficiency (0-1)
-
getMixingEfficiency
public double getMixingEfficiency()Gets the mixing section efficiency.- Returns:
- mixing efficiency
-
setThroatArea
public void setThroatArea(double throatArea) Setter for the field
throatArea.- Parameters:
throatArea- a double
-
setMixingPressure
public void setMixingPressure(double mixingPressure) Sets the target mixing pressure within the ejector. If not set the suction pressure is used.- Parameters:
mixingPressure- the mixing pressure in bara
-
setDesignSuctionVelocity
public void setDesignSuctionVelocity(double velocity) Sets the design suction velocity used when calculating mechanical dimensions.- Parameters:
velocity- velocity in m/s
-
setDesignDiffuserOutletVelocity
public void setDesignDiffuserOutletVelocity(double velocity) Sets the design diffuser outlet velocity used when calculating mechanical dimensions.- Parameters:
velocity- velocity in m/s
-
setSuctionConnectionLength
public void setSuctionConnectionLength(double length) Sets the straight length of suction piping to include in total volume calculations.- Parameters:
length- length in metres
-
setDischargeConnectionLength
public void setDischargeConnectionLength(double length) Sets the straight length of discharge piping to include in total volume calculations.- Parameters:
length- length in metres
-
initMechanicalDesign
public void initMechanicalDesign()Description copied from class:ProcessEquipmentBaseClassInitialize a
initMechanicalDesignfor the equipment.- Specified by:
initMechanicalDesignin interfaceProcessEquipmentInterface- Overrides:
initMechanicalDesignin classProcessEquipmentBaseClass
-
getMechanicalDesign
Description copied from class:ProcessEquipmentBaseClassGet a
mechanicalDesignfor the equipment.- Specified by:
getMechanicalDesignin interfaceProcessEquipmentInterface- Overrides:
getMechanicalDesignin classProcessEquipmentBaseClass- Returns:
- a
MechanicalDesignobject
-
getDesignResult
Backwards compatible accessor for mechanical design results.- Returns:
- the ejector mechanical design container
-
run
In this method all thermodynamic and unit operations will be calculated in a steady state calculation.
- Specified by:
runin interfaceSimulationInterface- Parameters:
id- UUID
-
getOutStream
-
getEntrainmentRatio
public double getEntrainmentRatio()getEntrainmentRatio.
- Returns:
- a double
-
getCompressionRatio
public double getCompressionRatio()Returns the compression ratio (discharge pressure / suction pressure). This is a key parameter in Transvac ejector specification.- Returns:
- compression ratio (dimensionless)
-
getExpansionRatio
public double getExpansionRatio()Returns the expansion ratio (motive pressure / discharge pressure). This indicates how much energy is available from the motive stream.- Returns:
- expansion ratio (dimensionless)
-
getCriticalBackPressure
public double getCriticalBackPressure()Returns the critical back pressure in bara. This is the maximum discharge pressure at which the ejector can maintain stable operation with the current motive conditions. Above this pressure, the ejector breaks down and entrainment ratio drops sharply to zero. This is the most important parameter in Transvac-style ejector design.- Returns:
- critical back pressure in bara
-
getAreaRatio
public double getAreaRatio()Returns the area ratio (mixing section area / motive nozzle throat area). This is the primary sizing parameter for ejectors and determines the operating envelope.- Returns:
- area ratio (dimensionless)
-
getMotiveNozzleMach
public double getMotiveNozzleMach()Returns the Mach number at the motive nozzle exit.- Returns:
- motive nozzle exit Mach number
-
getSuctionMach
public double getSuctionMach()Returns the Mach number of the suction flow at the mixing section entrance.- Returns:
- suction Mach number
-
getMixingMach
public double getMixingMach()Returns the Mach number of the mixed flow in the mixing section.- Returns:
- mixing section Mach number
-
isSuctionChoked
public boolean isSuctionChoked()Returns whether the suction flow is choked (Mach >= 1). When choked, the ejector is operating in its design regime and the entrainment ratio is stable.- Returns:
- true if suction flow is choked
-
isMotiveChoked
public boolean isMotiveChoked()Returns whether the motive flow is choked at the nozzle. For proper ejector operation, the motive flow should always be choked.- Returns:
- true if motive flow is choked
-
isInBreakdown
public boolean isInBreakdown()Checks if the current discharge pressure exceeds the critical back pressure, meaning the ejector is operating in breakdown mode and cannot maintain stable entrainment.- Returns:
- true if the ejector is operating beyond its critical back pressure
-
generatePerformanceCurve
public List<double[]> generatePerformanceCurve(double minDischargePressure, double maxDischargePressure, int numPoints) Generates a performance map showing how entrainment ratio varies with discharge pressure at constant motive and suction conditions. This produces data similar to Transvac performance curves. Each point is calculated by running the ejector at a different discharge pressure.- Parameters:
minDischargePressure- minimum discharge pressure in baramaxDischargePressure- maximum discharge pressure in baranumPoints- number of points in the curve- Returns:
- list of double arrays [dischargePressure, entrainmentRatio, compressionRatio]
-
diameterFromArea
private static double diameterFromArea(double area) -
estimateLength
private static double estimateLength(double diameter, double factor) -
cylinderVolume
private static double cylinderVolume(double area, double length) -
estimateDefaultMixingPressure
private double estimateDefaultMixingPressure(double suctionPressure, double dischargePressure, double mDotMotive, double mDotSuction) -
estimateDesignSuctionVelocity
private double estimateDesignSuctionVelocity(double suctionPressure, double dischargePressure, double rhoSuction, double mDotSuction) -
estimateDesignDiffuserOutletVelocity
private double estimateDesignDiffuserOutletVelocity(double mixingPressure, double dischargePressure, double rhoDiffuser, double mDotTotal) -
estimateSuctionConnectionLength
private double estimateSuctionConnectionLength(double suctionDiameter, double suctionPressure, double dischargePressure) -
estimateDischargeConnectionLength
private double estimateDischargeConnectionLength(double diffuserDiameter, double mixingPressure, double dischargePressure) -
clamp
private static double clamp(double value, double min, double max) -
estimateSpeedOfSound
Estimates the speed of sound in a fluid from thermodynamic properties. Uses the relationship c = sqrt(Cp/Cv * P / rho) for an ideal-gas approximation when detailed derivatives are not available. For real fluids, this is a reasonable estimate that errs slightly on the conservative side.- Parameters:
fluid- the fluid to estimate speed of sound for- Returns:
- estimated speed of sound in m/s, or 0.0 if cannot be estimated
-
estimateCriticalBackPressure
private double estimateCriticalBackPressure(SystemInterface mixedFluidClone, double totalEnthalpy, double mixingPressureLocal, double currentDischargePressure) Estimates the critical back pressure for the ejector. This is the maximum discharge pressure at which stable ejector operation can be maintained. Above this pressure, the normal shock in the mixing section becomes too strong and the suction flow unchokes.The estimation uses a bisection search to find the maximum pressure at which the mixed fluid's static enthalpy (from a PH flash at total/stagnation enthalpy) is consistent with the diffuser efficiency. This is more accurate than analytic formulas, especially for compressible gas ejectors where density varies significantly with pressure.
- Parameters:
mixedFluidClone- a clone of the mixed fluid for trial flashestotalEnthalpy- total (stagnation) enthalpy of mixed stream in J/kgmixingPressureLocal- mixing pressure in baracurrentDischargePressure- current discharge pressure in bara (starting point)- Returns:
- estimated critical back pressure in bara
-
getMassBalance
getMassBalance.
- Specified by:
getMassBalancein interfaceProcessEquipmentInterface- Overrides:
getMassBalancein classProcessEquipmentBaseClass- Parameters:
unit- aStringobject- Returns:
- a double
-
getMotiveStream
Getter for the field
motiveStream.- Returns:
- a
StreamInterfaceobject
-
getSuctionStream
Getter for the field
suctionStream.- Returns:
- a
StreamInterfaceobject
-
getMixedStream
Getter for the field
mixedStream.- Returns:
- a
StreamInterfaceobject
-
getEfficiencyIsentropic
public double getEfficiencyIsentropic()Getter for the field
efficiencyIsentropic.- Returns:
- a double
-
getDiffuserEfficiency
public double getDiffuserEfficiency()Getter for the field
diffuserEfficiency.- Returns:
- a double
-
toJson
Serializes the Process Equipment along with its state to a JSON string.
- Specified by:
toJsonin interfaceProcessEquipmentInterface- Overrides:
toJsonin classProcessEquipmentBaseClass- Returns:
- json string.
-
toJson
Serializes the Process Equipment with configurable level of detail.- Specified by:
toJsonin interfaceProcessEquipmentInterface- Overrides:
toJsonin classProcessEquipmentBaseClass- Parameters:
cfg- report configuration- Returns:
- json string
-
autoSize
public void autoSize(double safetyFactor) Automatically size the equipment based on connected stream conditions.This method calculates dimensions and design parameters using the inlet stream properties and applies the specified safety factor. The equipment must have a valid inlet stream connected before calling this method.
- Specified by:
autoSizein interfaceAutoSizeable- Parameters:
safetyFactor- multiplier for design capacity, typically 1.1-1.3 (10-30% over design)
-
autoSize
public void autoSize()Automatically size using default safety factor (1.2 = 20% margin).- Specified by:
autoSizein interfaceAutoSizeable
-
autoSize
Automatically size using company-specific design standards.This method applies design rules from the specified company's technical requirements (TR) documents. The standards are loaded from the NeqSim design database.
- Specified by:
autoSizein interfaceAutoSizeable- Parameters:
companyStandard- company name (e.g., "Equinor", "Shell", "TotalEnergies")trDocument- TR document reference (e.g., "TR2000", "DEP-31.38.01.11")
-
isAutoSized
public boolean isAutoSized()Check if equipment has been auto-sized.- Specified by:
isAutoSizedin interfaceAutoSizeable- Returns:
- true if autoSize() has been called successfully
-
getSizingReport
Get a detailed sizing report after auto-sizing.The report includes:
- Design basis (flow rates, pressures, temperatures)
- Calculated dimensions
- Design parameters (K-factor, Cv, velocity, etc.)
- Safety margins
- Specified by:
getSizingReportin interfaceAutoSizeable- Returns:
- formatted sizing report string
-
getSizingReportJson
Get sizing report as JSON for programmatic access.- Specified by:
getSizingReportJsonin interfaceAutoSizeable- Returns:
- JSON string with sizing data
-
initializeEjectorCapacityConstraints
private void initializeEjectorCapacityConstraints()Initialize ejector capacity constraints. -
setDesignEntrainmentRatio
public void setDesignEntrainmentRatio(double ratio) Sets the design entrainment ratio.- Parameters:
ratio- design entrainment ratio (suction/motive mass ratio)
-
getDesignEntrainmentRatio
public double getDesignEntrainmentRatio()Gets the design entrainment ratio.- Returns:
- design entrainment ratio
-
setDesignCompressionRatio
public void setDesignCompressionRatio(double ratio) Sets the design compression ratio.- Parameters:
ratio- design compression ratio (discharge/suction pressure)
-
getDesignCompressionRatio
public double getDesignCompressionRatio()Gets the design compression ratio.- Returns:
- design compression ratio
-
setMaxCriticalBackPressure
public void setMaxCriticalBackPressure(double pressure) Sets the maximum critical back pressure.- Parameters:
pressure- maximum critical back pressure in bara
-
getMaxCriticalBackPressure
public double getMaxCriticalBackPressure()Gets the maximum critical back pressure.- Returns:
- maximum critical back pressure in bara
-
isCapacityAnalysisEnabled
public boolean isCapacityAnalysisEnabled()Checks if capacity analysis is enabled for this equipment.When disabled, this equipment is excluded from bottleneck detection, capacity utilization summaries, and optimization routines. The equipment still tracks its constraints but doesn't contribute to system-level analysis.
- Specified by:
isCapacityAnalysisEnabledin interfaceCapacityConstrainedEquipment- Overrides:
isCapacityAnalysisEnabledin classProcessEquipmentBaseClass- Returns:
- true if capacity analysis is enabled (default is true)
-
setCapacityAnalysisEnabled
public void setCapacityAnalysisEnabled(boolean enabled) Enables or disables capacity analysis for this equipment.When disabled, this equipment is excluded from:
- System bottleneck detection (
ProcessSystem.findBottleneck()) - Capacity utilization summaries (
ProcessSystem.getCapacityUtilizationSummary()) - Equipment near capacity lists (
ProcessSystem.getEquipmentNearCapacityLimit()) - Optimization constraint checking
The equipment still calculates and tracks its constraints internally.
- Specified by:
setCapacityAnalysisEnabledin interfaceCapacityConstrainedEquipment- Overrides:
setCapacityAnalysisEnabledin classProcessEquipmentBaseClass- Parameters:
enabled- true to include in capacity analysis, false to exclude
- System bottleneck detection (
-
getCapacityConstraints
Gets all capacity constraints defined for this equipment.Returns an unmodifiable map of constraint name to constraint object. Constraints are used by the optimization framework to detect bottlenecks, enforce limits, and guide production allocation. Equipment subclasses populate this map via
ProcessEquipmentInterface.addCapacityConstraint(CapacityConstraint).- Specified by:
getCapacityConstraintsin interfaceCapacityConstrainedEquipment- Specified by:
getCapacityConstraintsin interfaceProcessEquipmentInterface- Overrides:
getCapacityConstraintsin classProcessEquipmentBaseClass- Returns:
- unmodifiable map of constraint name to constraint, empty if none defined
-
getBottleneckConstraint
Gets the bottleneck (most limiting) constraint for this equipment.Returns the enabled constraint with the highest utilization ratio. If no constraints are defined or enabled, returns null.
- Specified by:
getBottleneckConstraintin interfaceCapacityConstrainedEquipment- Specified by:
getBottleneckConstraintin interfaceProcessEquipmentInterface- Overrides:
getBottleneckConstraintin classProcessEquipmentBaseClass- Returns:
- the most limiting constraint, or null if none
-
isCapacityExceeded
public boolean isCapacityExceeded()Checks if any capacity constraint is violated (exceeds 100% utilization).A violated constraint means the equipment is operating beyond its design capacity. For HARD constraints, this may indicate equipment trip or failure. For SOFT constraints, this indicates reduced efficiency or accelerated wear.
- Specified by:
isCapacityExceededin interfaceCapacityConstrainedEquipment- Specified by:
isCapacityExceededin interfaceProcessEquipmentInterface- Overrides:
isCapacityExceededin classProcessEquipmentBaseClass- Returns:
- true if any enabled constraint utilization exceeds 1.0 (100%)
-
isHardLimitExceeded
public boolean isHardLimitExceeded()Checks if any HARD constraint limit is exceeded.HARD limits represent absolute equipment limits (e.g., maximum speed) that cannot be exceeded without equipment trip or damage. This is more severe than general capacity exceedance.
- Specified by:
isHardLimitExceededin interfaceCapacityConstrainedEquipment- Specified by:
isHardLimitExceededin interfaceProcessEquipmentInterface- Overrides:
isHardLimitExceededin classProcessEquipmentBaseClass- Returns:
- true if any enabled HARD constraint's max value is exceeded
-
getMaxUtilization
public double getMaxUtilization()Gets the maximum utilization across all enabled constraints.Returns the highest utilization ratio across all enabled constraints. Values above 1.0 indicate the equipment is over capacity. Returns 0.0 if no constraints are defined or enabled.
- Specified by:
getMaxUtilizationin interfaceCapacityConstrainedEquipment- Specified by:
getMaxUtilizationin interfaceProcessEquipmentInterface- Overrides:
getMaxUtilizationin classProcessEquipmentBaseClass- Returns:
- maximum utilization as fraction (1.0 = 100% of design capacity)
-
addCapacityConstraint
Adds a capacity constraint to this equipment.Constraints can be added at any time. If a constraint with the same name already exists, it is replaced. Use the fluent builder API on
CapacityConstraintto configure the constraint before adding.- Specified by:
addCapacityConstraintin interfaceCapacityConstrainedEquipment- Specified by:
addCapacityConstraintin interfaceProcessEquipmentInterface- Overrides:
addCapacityConstraintin classProcessEquipmentBaseClass- Parameters:
constraint- the capacity constraint to add (ignored if null)
-
removeCapacityConstraint
Removes a capacity constraint by name.- Specified by:
removeCapacityConstraintin interfaceCapacityConstrainedEquipment- Parameters:
constraintName- the name of the constraint to remove- Returns:
- true if the constraint was found and removed
-
clearCapacityConstraints
public void clearCapacityConstraints()Clears all capacity constraints from this equipment.- Specified by:
clearCapacityConstraintsin interfaceCapacityConstrainedEquipment
-