Class Ejector
- All Implemented Interfaces:
Serializable, Runnable, AutoSizeable, CapacityConstrainedEquipment, ProcessEquipmentInterface, SimulationInterface, NamedInterface
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.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanFlag indicating if ejector has been auto-sized.private static final doubleprivate 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 static final org.apache.logging.log4j.Loggerprivate doubleMaximum critical back pressure in bara.private EjectorMechanicalDesignprivate StreamInterfaceprivate doubleprivate StreamInterfaceprivate static final longSerialization version UID.private doubleprivate booleanprivate 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 new 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 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 doubleestimateSuctionConnectionLength(double suctionDiameter, double suctionPressure, double dischargePressure) Gets the constraint with the highest utilization (the bottleneck).Gets all capacity constraints defined for this equipment.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.doublegetMassBalance(String unit) getMassBalance.doubleGets the maximum critical back pressure.doubleGets the maximum utilization across all constraints.Get amechanicalDesignfor the equipment.Getter for the fieldmixedStream.Getter for the fieldmotiveStream.getOutStream.Get a detailed sizing report after auto-sizing.Get sizing report as JSON for programmatic access.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.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.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.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
copy, displayResult, equals, getConditionAnalysisMessage, getController, getEffectiveCapacityFactor, getEnergyStream, getEntropyProduction, getExergyChange, getFailureMode, getMassBalance, getMinimumFlow, getPressure, getPressure, getProperty, getReport_json, getResultTable, getSpecification, getTemperature, getTemperature, getThermoSystem, hashCode, isActive, isActive, isFailed, isSetEnergyStream, reportResults, restoreFromFailure, run_step, runConditionAnalysis, setController, setEnergyStream, setEnergyStream, setFailureMode, setFlowValveController, setMinimumFlow, setPressure, setRegulatorOutSignal, setSpecification, setTemperature, simulateDegradedOperation, simulateTrip, solvedMethods inherited from class SimulationBaseClass
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTimeMethods inherited from class NamedBaseClass
getName, getTagName, setName, setTagNameMethods 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, setName, setTagNameMethods inherited from interface ProcessEquipmentInterface
getCapacityDuty, getCapacityMax, getExergyChange, getFluid, getOperatingEnvelopeViolation, 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 -
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
-
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
-
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
-
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) -
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.The map keys are constraint names (e.g., "speed", "gasLoadFactor") and values are the corresponding CapacityConstraint objects containing design values, current values, and utilization calculations.
- Specified by:
getCapacityConstraintsin interfaceCapacityConstrainedEquipment- Returns:
- unmodifiable map of constraint name to CapacityConstraint
-
getBottleneckConstraint
Gets the constraint with the highest utilization (the bottleneck).This method identifies which constraint is closest to or exceeding its design limit. Use this to determine what is limiting equipment capacity.
- Specified by:
getBottleneckConstraintin interfaceCapacityConstrainedEquipment- Returns:
- the bottleneck constraint, or null if no constraints are defined
-
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- Returns:
- true if any 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- Returns:
- true if any HARD constraint's max value is exceeded
-
getMaxUtilization
public double getMaxUtilization()Gets the maximum utilization across all constraints.This gives a single number representing how close the equipment is to its limiting constraint. Values above 1.0 indicate the equipment is over capacity.
- Specified by:
getMaxUtilizationin interfaceCapacityConstrainedEquipment- Returns:
- maximum utilization as fraction (1.0 = 100% of design capacity)
-
addCapacityConstraint
Adds a new capacity constraint to this equipment.This allows dynamic addition of constraints at runtime. Constraints can be added during equipment configuration or based on operating conditions.
- Specified by:
addCapacityConstraintin interfaceCapacityConstrainedEquipment- Parameters:
constraint- the constraint to add
-
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
-