Class Compressor
- All Implemented Interfaces:
Serializable, Runnable, CompressorInterface, ProcessEquipmentInterface, TwoPortInterface, StateVectorProvider, SimulationInterface, NamedInterface
- Direct Known Subclasses:
Expander
Compressor class.
- Version:
- $Id: $Id
- Author:
- esol
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class for constructing Compressor instances with a fluent API. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleprivate AntiSurgeprivate booleanbooleanprivate doubleprivate CompressorChartInterfaceprivate doubledoubleprivate CompressorDriverprivate List<CompressorEventListener> private doubledoubledoubleprivate booleanprivate boolean(package private) static org.apache.logging.log4j.LoggerLogger object for class.private doubleprivate doubleprivate doubleprivate double(package private) CompressorMechanicalDesignprivate CompressorMechanicalLossesMechanical losses model for seal gas and bearing calculations.private doubleprivate intprivate CompressorOperatingHistoryprivate doubleprivate CompressorStateprivate doubledoubleprivate doubleprivate doubleprivate doubleprivate doubleprivate Stringbooleandoubleprivate Stringprivate doubleprivate doubleprivate CompressorPropertyProfileprivate doubleprivate static final longSerialization version UID.private doubleprivate ShutdownProfileprivate booleanprivate doubleprivate doubleprivate booleanprivate doubleprivate StartupProfileprivate doubleprivate booleanprivate doubleprivate booleanprivate doubleprivate doubleprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanbooleanprivate booleanprivate booleanFields inherited from class TwoPortEquipment
inStream, outStreamFields inherited from class ProcessEquipmentBaseClass
conditionAnalysisMessage, energyStream, hasController, isSolved, properties, reportFields inherited from class SimulationBaseClass
calcIdentifier, calculateSteadyState, timeFields inherited from class NamedBaseClass
name -
Constructor Summary
ConstructorsConstructorDescriptionCompressor(String name) Constructor for Compressor.Compressor(String name, boolean interpolateMapLookup) Constructor for Compressor.Compressor(String name, StreamInterface inletStream) Constructor for Compressor. -
Method Summary
Modifier and TypeMethodDescriptionvoidAcknowledge a tripped compressor to allow restart.voidaddEventListener(CompressorEventListener listener) Add an event listener for compressor events.voidaddOperatingHours(double hours) Add operating time.static Compressor.BuilderCreates a new Builder for constructing a Compressor with a fluent API.voidCheck driver power limits and fire events if limits are exceeded.voidCheck speed limits and fire events if limits are exceeded.voidCheck stone wall margin and fire events if threshold is crossed.voidCheck surge margin and fire events if thresholds are crossed.copy()Create deep copy.voidDisable operating history tracking.voiddisplayResult.voidEmergency shutdown (ESD).voidEnable operating history tracking.booleandoublefindOutPressure(double hinn, double hout, double polytropicEfficiency) findOutPressure.private voidfirePowerLimitExceededEvent(double currentPower, double maxPower) Fire power limit exceeded event.private voidFire shutdown complete event.private voidfireSpeedBelowMinimumEvent(double currentSpeed, double ratio) Fire speed below minimum event.private voidfireSpeedLimitExceededEvent(double currentSpeed, double ratio) Fire speed limit exceeded event.private voidFire startup complete event.private voidfireStateChangeEvent(CompressorState oldState, CompressorState newState) Fire state change event.private voidfireStoneWallApproachEvent(double stoneWallMargin) Fire stone wall approach event.private voidfireSurgeApproachEvent(double surgeMargin, boolean isCritical) Fire surge approach event to all listeners.private voidfireSurgeOccurredEvent(double surgeMargin) Fire surge occurred event.voidGenerates a compressor chart based on the current operating point.voidgenerateCompressorChart(int numberOfSpeeds) Generates a compressor chart with multiple speed curves.voidgenerateCompressorChart(String generationOption) Generates a compressor chart with specified options.voidgenerateCompressorChart(String generationOption, double[] speeds) Generates a compressor chart with specific speed values.voidgenerateCompressorChart(String generationOption, int numberOfSpeeds) Generates a compressor chart with specified options and number of speeds.voidgenerateCompressorChartFromTemplate(String templateName, int numberOfSpeeds) Generates a compressor chart from a predefined template.voidgenerateCompressorCurves.doubleGetter for the fieldactualCompressionRatio.getAntiSurge.doubleGet total bearing power loss.doublegetCapacityDuty.doublegetCapacityMax.doubleGetter for the fieldcompressionRatio.Getter for the fieldcompressorChart.Gets the current compressor chart type as a string.doubleGet the performance degradation factor.doubleCalculate the distance to the stone wall (choke) limit.doublegetDistanceToSurge.Get the compressor driver model.doubleGet the effective efficiency accounting for degradation.doubleGet the effective polytropic head accounting for degradation.doublegetEnergy.doublegetEntropyProduction(String unit) getEntropyProduction.doublegetExergyChange(String unit) getExergyChange.doublegetExergyChange(String unit, double surroundingTemperature) Get exergy change production of the process equipment.doubleGet the fouling factor.doublegetIsentropicEfficiency.doubleGet the maximum acceleration rate.doubleGet the maximum deceleration rate.doublegetMaximumSpeed.doubleGetter for the fieldmaxOutletPressure.Get amechanicalDesignfor the equipment.doubleGet mechanical efficiency accounting for bearing and seal friction losses.Get the mechanical losses model for seal gas and bearing calculations.doublegetMinimumSpeed.intGetter for the fieldnumberOfCompressorCalcSteps.Get the operating history tracker.doubleGet the total operating hours.Get the current operating state of the compressor.doubleGet outlet pressure of twoport.doubleGetter for the fieldoutTemperature.doublegetPolytropicEfficiency.doubleGetter for the fieldpolytropicExponent.doubleGetter for the fieldpolytropicFluidHead.doubleGetter for the fieldpolytropicHead.doublegetPolytropicHead(String unit) Getter for the fieldpolytropicHead.doubleGetter for the fieldpolytropicHeadMeter.Getter for the fieldpolytropicMethod.doublegetPower()getPower.doublegetPower.Getter for the fieldpropertyProfile.doubleGet the ratio of the current compressor speed to the maximum speed in the compressor curves.doublegetRatioToMaxSpeed(double calculatedSpeed) Get the ratio of a calculated speed to the maximum speed in the compressor curves.doubleGet the ratio of the current compressor speed to the minimum speed in the compressor curves.doublegetRatioToMinSpeed(double calculatedSpeed) Get the ratio of a calculated speed to the minimum speed in the compressor curves.String[][]getResultTable.doubleGet the rotational inertia of the compressor rotor.double[]Get the safety-factor-corrected surge flow and head at the current compressor speed.doubleGet total seal gas consumption including primary leakage, buffer gas, and separation gas.Get the shutdown profile.doublegetSpeed()Getter for the fieldspeed.Get the startup profile.Get the current state as a standardized vector.doubleGet the stone wall warning threshold.doubleGet the surge critical threshold.doublegetSurgeFlowRate.doublegetSurgeFlowRateMargin.doubledoubleGet the surge warning threshold.doubleGet the target speed for dynamic control.getThermoSystem.doublegetTotalWork.inthashCode()voidInitialize ainitMechanicalDesignfor the equipment.Initialize a default mechanical losses model based on current compressor configuration.initMechanicalLosses(double shaftDiameterMm) Initialize a mechanical losses model with specified shaft diameter.booleanCheck if auto-speed mode is enabled.booleanisCalcPressureOut.booleanCheck if the current compressor speed is higher than the maximum speed in the compressor curves.booleanisHigherThanMaxSpeed(double calculatedSpeed) Check if a calculated speed is higher than the maximum speed in the compressor curves.booleanChecks if the compressor speed is limited.booleanCheck if the current compressor speed is lower than the minimum speed in the compressor curves.booleanisLowerThanMinSpeed(double calculatedSpeed) Check if a calculated speed is lower than the minimum speed in the compressor curves.booleanisSetMaxOutletPressure.booleanisSolveSpeed.booleanCheck if the current compressor speed is within the defined compressor curve speed range.booleanisSpeedWithinRange(double calculatedSpeed) Check if a calculated speed is within the defined compressor curve speed range.booleanisStoneWall.booleanisStoneWall(double flow, double head) isStoneWall.booleanisSurge(double flow, double head) isSurge.booleanGetter for property useGERG2008.booleanGetter for property useLeachman.booleanisUseRigorousPolytropicMethod.booleanGetter for property useVega.voidrecordOperatingPoint(double time) Record the current operating point to history.voidremoveEventListener(CompressorEventListener listener) Remove an event listener.voidReset all dynamic simulation state.voidIn this method all thermodynamic and unit operations will be calculated in a steady state calculation.voidrunController(double dt, UUID id) runController.voidrunTransient(double dt, UUID id) runTransientvoidsetAntiSurge(AntiSurge antiSurge) Setter for the fieldantiSurge.voidsetAutoSpeedMode(boolean enabled) Enable or disable auto-speed mode.voidsetCalcPressureOut(boolean calcPressureOut) Setter for the fieldcalcPressureOut.voidsetCompressionRatio(double compRatio) Setter for the fieldcompressionRatio.voidsetCompressorChart(CompressorChartInterface compressorChart) Setter for the fieldcompressorChart.voidsetCompressorChartType(String type) Set CompressorChartTypevoidsetDegradationFactor(double factor) Set the performance degradation factor.voidsetDriver(CompressorDriver driver) Set the compressor driver model.voidsetDriver(DriverType type, double ratedPower) Create and set a new driver with specified type and rated power.voidsetFoulingFactor(double factor) Set the fouling factor.voidsetInletStream(StreamInterface inletStream) Set inlet Stream of twoport.voidsetIsentropicEfficiency(double isentropicEfficiency) setIsentropicEfficiency.voidsetIsSetMaxOutletPressure(boolean isSetMaxOutletPressure) Setter for the fieldisSetMaxOutletPressure.voidsetLimitSpeed(boolean limitSpeed) Sets whether the compressor speed should be limited.voidsetMaxAccelerationRate(double rate) Set the maximum acceleration rate.voidsetMaxDecelerationRate(double rate) Set the maximum deceleration rate.voidsetMaximumSpeed(double maxSpeed) setMaximumSpeed.voidsetMaxOutletPressure(double maxOutletPressure) Setter for the fieldmaxOutletPressure.voidsetMechanicalLosses(CompressorMechanicalLosses mechanicalLosses) Set the mechanical losses model.voidsetMinimumSpeed(double minspeed) setMinimumSpeed.voidsetNumberOfCompressorCalcSteps(int numberOfCompressorCalcSteps) Setter for the fieldnumberOfCompressorCalcSteps.voidsetOperatingHours(double hours) Set the total operating hours.voidsetOperatingState(CompressorState state) Set the operating state of the compressor.voidsetOutletPressure(double pressure) Set outlet pressure of twoport.voidsetOutletPressure(double pressure, String unit) setOutletPressure.voidsetOutTemperature(double outTemperature) Setter for the fieldoutTemperature.voidsetPolytropicEfficiency(double polytropicEfficiency) setPolytropicEfficiency.voidsetPolytropicHeadMeter(double polytropicHeadMeter) Setter for the fieldpolytropicHeadMeter.voidsetPolytropicMethod(String polytropicMethod) Setter for the fieldpolytropicMethod.voidsetPower(double p) setPower.voidsetPressure(double pressure) Setter for the fieldpressure.voidsetPressure(double pressure, String unit) Setter for the fieldpressure.voidsetPropertyProfile(CompressorPropertyProfile propertyProfile) Setter for the fieldpropertyProfile.voidsetRotationalInertia(double inertia) Set the rotational inertia of the compressor rotor.voidsetShutdownProfile(ShutdownProfile profile) Set the shutdown profile.voidsetSolveSpeed(boolean solveSpeed) Setter for the fieldsolveSpeed.voidsetSpeed(double speed) Setter for the fieldspeed.voidsetStartupProfile(StartupProfile profile) Set the startup profile.voidsetStoneWallWarningThreshold(double threshold) Set the stone wall warning threshold.voidsetSurgeCriticalThreshold(double threshold) Set the surge critical threshold.voidsetSurgeWarningThreshold(double threshold) Set the surge warning threshold.voidsetTargetSpeed(double speed) Set the target speed for dynamic control.voidsetUseEnergyEfficiencyChart(boolean useEnergyEfficiencyChart) voidsetUseGERG2008(boolean useGERG2008) Setter for property useGERG2008.voidsetUseLeachman(boolean useLeachman) Setter for property useLeachman.voidsetUsePolytropicCalc(boolean usePolytropicCalc) Setter for the fieldusePolytropicCalc.voidsetUseRigorousPolytropicMethod(boolean useRigorousPolytropicMethod) Setter for the fielduseRigorousPolytropicMethod.voidsetUseVega(boolean useVega) Setter for property useVega.voidsolveAntiSurge.doublesolveEfficiency(double outTemperature) Calculates polytropic or isentropic efficiency.voidstartCompressor(double targetOperatingSpeed) Start the compressor following the startup profile.voidNormal shutdown.voidStop the compressor following the shutdown profile.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.private voidUpdate speed automatically based on operating point.voidupdateDynamicState(double timeStep) Update the compressor state during a transient simulation step.voidUpdate mechanical losses model with current operating conditions.private voidupdateShutdown(double timeStep) Update shutdown sequence.private voidupdateSpeedWithInertia(double targetSpd, double timeStep) Update speed considering inertia constraints.private voidupdateStartup(double timeStep) Update startup sequence.private booleanvoiduseOutTemperature(boolean useOutTemperature) useOutTemperature.booleanusePolytropicCalc.Methods inherited from class TwoPortEquipment
getInletPressure, getInletStream, getInletTemperature, getMassBalance, getOutletStream, getOutletTemperature, setInletPressure, setInletTemperature, setOutletStream, setOutletTemperature, validateSetupMethods inherited from class ProcessEquipmentBaseClass
getConditionAnalysisMessage, getController, getEnergyStream, getMassBalance, getMinimumFlow, getPressure, getPressure, getProperty, getReport_json, getSpecification, getTemperature, getTemperature, isActive, isActive, isSetEnergyStream, reportResults, run_step, runConditionAnalysis, setController, setEnergyStream, setEnergyStream, setFlowValveController, setMinimumFlow, setRegulatorOutSignal, setSpecification, setTemperature, 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 CompressorInterface
isSurgeMethods inherited from interface NamedInterface
getName, getTagName, setName, setTagNameMethods inherited from interface ProcessEquipmentInterface
getConditionAnalysisMessage, getController, getFluid, getMassBalance, getMassBalance, getPressure, getPressure, getReport_json, getRestCapacity, getSpecification, getTemperature, getTemperature, needRecalculation, reportResults, runConditionAnalysis, setController, setRegulatorOutSignal, setSpecification, setTemperature, validateSetupMethods inherited from interface SimulationInterface
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, run, run_step, run_step, runTransient, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTime, solvedMethods inherited from interface StateVectorProvider
getStateDimension, getStateNamesMethods inherited from interface TwoPortInterface
getInletPressure, getInletStream, getInletTemperature, getInStream, getOutletStream, getOutletTemperature, getOutStream, setInletPressure, setInletTemperature, setOutletStream, setOutletTemperature
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
logger
static org.apache.logging.log4j.Logger loggerLogger object for class. -
thermoSystem
-
outTemperature
private double outTemperature -
useOutTemperature
private boolean useOutTemperature -
compressionRatio
private double compressionRatio -
actualCompressionRatio
private double actualCompressionRatio -
useCompressionRatio
private boolean useCompressionRatio -
maxOutletPressure
private double maxOutletPressure -
isSetMaxOutletPressure
private boolean isSetMaxOutletPressure -
propertyProfile
-
dH
public double dH -
inletEnthalpy
public double inletEnthalpy -
solveSpeed
private boolean solveSpeed -
pressure
public double pressure -
speed
private double speed -
maxspeed
private double maxspeed -
minspeed
private double minspeed -
isentropicEfficiency
public double isentropicEfficiency -
polytropicEfficiency
public double polytropicEfficiency -
usePolytropicCalc
public boolean usePolytropicCalc -
powerSet
public boolean powerSet -
calcPressureOut
public boolean calcPressureOut -
compressorChart
-
antiSurge
-
polytropicHead
private double polytropicHead -
polytropicFluidHead
private double polytropicFluidHead -
polytropicHeadMeter
private double polytropicHeadMeter -
polytropicExponent
private double polytropicExponent -
numberOfCompressorCalcSteps
private int numberOfCompressorCalcSteps -
useRigorousPolytropicMethod
private boolean useRigorousPolytropicMethod -
useGERG2008
private boolean useGERG2008 -
useLeachman
private boolean useLeachman -
useVega
private boolean useVega -
limitSpeed
private boolean limitSpeed -
useEnergyEfficiencyChart
private boolean useEnergyEfficiencyChart -
operatingState
-
driver
-
operatingHistory
-
startupProfile
-
shutdownProfile
-
eventListeners
-
rotationalInertia
private double rotationalInertia -
maxAccelerationRate
private double maxAccelerationRate -
maxDecelerationRate
private double maxDecelerationRate -
targetSpeed
private double targetSpeed -
autoSpeedMode
private boolean autoSpeedMode -
degradationFactor
private double degradationFactor -
foulingFactor
private double foulingFactor -
operatingHours
private double operatingHours -
surgeWarningThreshold
private double surgeWarningThreshold -
surgeCriticalThreshold
private double surgeCriticalThreshold -
stoneWallWarningThreshold
private double stoneWallWarningThreshold -
startupElapsedTime
private double startupElapsedTime -
shutdownElapsedTime
private double shutdownElapsedTime -
speedAtShutdownStart
private double speedAtShutdownStart -
surgeWarningActive
private boolean surgeWarningActive -
surgeCriticalActive
private boolean surgeCriticalActive -
speedLimitWarningActive
private boolean speedLimitWarningActive -
previousActualFlow
private double previousActualFlow -
previousPolyHead
private double previousPolyHead -
mechanicalDesign
CompressorMechanicalDesign mechanicalDesign -
mechanicalLosses
Mechanical losses model for seal gas and bearing calculations. -
pressureUnit
-
polytropicMethod
-
-
Constructor Details
-
Compressor
-
Compressor
Constructor for Compressor.
- Parameters:
name- aStringobjectinletStream- aStreamInterfaceobject
-
Compressor
Constructor for Compressor.
- Parameters:
name- Name of compressorinterpolateMapLookup- a boolean
-
-
Method Details
-
getMechanicalDesign
Get a
mechanicalDesignfor the equipment.- Specified by:
getMechanicalDesignin interfaceProcessEquipmentInterface- Overrides:
getMechanicalDesignin classProcessEquipmentBaseClass- Returns:
- a
MechanicalDesignobject
-
initMechanicalDesign
public void initMechanicalDesign()Initialize a
initMechanicalDesignfor the equipment.- Specified by:
initMechanicalDesignin interfaceProcessEquipmentInterface- Overrides:
initMechanicalDesignin classProcessEquipmentBaseClass
-
getMechanicalLosses
Get the mechanical losses model for seal gas and bearing calculations.- Returns:
- mechanical losses model, or null if not configured
-
setMechanicalLosses
Set the mechanical losses model.- Parameters:
mechanicalLosses- the mechanical losses model
-
initMechanicalLosses
Initialize a default mechanical losses model based on current compressor configuration.This creates a mechanical losses model with typical parameters for a centrifugal compressor with dry gas seals and tilting pad bearings.
- Returns:
- the initialized mechanical losses model
-
initMechanicalLosses
Initialize a mechanical losses model with specified shaft diameter.- Parameters:
shaftDiameterMm- shaft diameter in mm- Returns:
- the initialized mechanical losses model
-
updateMechanicalLosses
public void updateMechanicalLosses()Update mechanical losses model with current operating conditions.Call this after running the compressor to update seal gas consumption and bearing losses.
-
getSealGasConsumption
public double getSealGasConsumption()Get total seal gas consumption including primary leakage, buffer gas, and separation gas.- Returns:
- seal gas consumption in Nm³/hr, or 0.0 if mechanical losses not configured
-
getBearingLoss
public double getBearingLoss()Get total bearing power loss.- Returns:
- bearing power loss in kW, or 0.0 if mechanical losses not configured
-
getMechanicalEfficiency
public double getMechanicalEfficiency()Get mechanical efficiency accounting for bearing and seal friction losses.- Returns:
- mechanical efficiency (0-1), or 0.98 if mechanical losses not configured
-
copy
Create deep copy.- Overrides:
copyin classProcessEquipmentBaseClass- Returns:
- a deep copy of the unit operation/process equipment
-
setInletStream
Set inlet Stream of twoport.- Specified by:
setInletStreamin interfaceTwoPortInterface- Overrides:
setInletStreamin classTwoPortEquipment- Parameters:
inletStream- value to set
-
solveAntiSurge
public void solveAntiSurge()solveAntiSurge.
-
setOutletPressure
public void setOutletPressure(double pressure) Set outlet pressure of twoport.- Specified by:
setOutletPressurein interfaceTwoPortInterface- Overrides:
setOutletPressurein classTwoPortEquipment- Parameters:
pressure- value to set in unit bara
-
setOutletPressure
-
getOutletPressure
public double getOutletPressure()Get outlet pressure of twoport.- Specified by:
getOutletPressurein interfaceTwoPortInterface- Overrides:
getOutletPressurein classTwoPortEquipment- Returns:
- outlet pressure of TwoPortEquipment in unit bara
-
getEnergy
public double getEnergy()getEnergy.
- Specified by:
getEnergyin interfaceCompressorInterface- Returns:
- a double
-
getPower
public double getPower()getPower.
- Returns:
- a double
-
getPower
-
setPower
public void setPower(double p) setPower.
- Parameters:
p- a double
-
solveEfficiency
public double solveEfficiency(double outTemperature) Calculates polytropic or isentropic efficiency.- Parameters:
outTemperature- a double- Returns:
- a double
-
findOutPressure
public double findOutPressure(double hinn, double hout, double polytropicEfficiency) findOutPressure.
- Parameters:
hinn- a doublehout- a doublepolytropicEfficiency- a double- Returns:
- a double
-
run
In this method all thermodynamic and unit operations will be calculated in a steady state calculation.
- Specified by:
runin interfaceSimulationInterface- Parameters:
id- UUID
-
useEnergyEfficiencyChart
private boolean useEnergyEfficiencyChart() -
setUseEnergyEfficiencyChart
public void setUseEnergyEfficiencyChart(boolean useEnergyEfficiencyChart) -
runTransient
runTransient
This method calculates thermodynamic and unit operations using difference equations if available and calculateSteadyState is true. Use setCalculateSteadyState to set the parameter. Sets calc identifier UUID.- Specified by:
runTransientin interfaceSimulationInterface- Parameters:
dt- Delta time [s]id- Calculation identifier
-
generateCompressorCurves
public void generateCompressorCurves()generateCompressorCurves.
-
displayResult
public void displayResult()displayResult.
- Specified by:
displayResultin interfaceProcessEquipmentInterface- Overrides:
displayResultin classProcessEquipmentBaseClass
-
getResultTable
getResultTable.
- Specified by:
getResultTablein interfaceProcessEquipmentInterface- Overrides:
getResultTablein classProcessEquipmentBaseClass- Returns:
- an array of
Stringobjects
-
getTotalWork
public double getTotalWork()getTotalWork.
- Returns:
- a double
-
getIsentropicEfficiency
public double getIsentropicEfficiency()getIsentropicEfficiency.
- Specified by:
getIsentropicEfficiencyin interfaceCompressorInterface- Returns:
- a double
-
setIsentropicEfficiency
public void setIsentropicEfficiency(double isentropicEfficiency) setIsentropicEfficiency.
- Specified by:
setIsentropicEfficiencyin interfaceCompressorInterface- Parameters:
isentropicEfficiency- a double
-
usePolytropicCalc
public boolean usePolytropicCalc()usePolytropicCalc.
- Returns:
- the usePolytropicCalc
-
setUsePolytropicCalc
public void setUsePolytropicCalc(boolean usePolytropicCalc) Setter for the field
usePolytropicCalc.- Parameters:
usePolytropicCalc- the usePolytropicCalc to set
-
getPolytropicEfficiency
public double getPolytropicEfficiency()getPolytropicEfficiency.
- Specified by:
getPolytropicEfficiencyin interfaceCompressorInterface- Returns:
- a double
-
setPolytropicEfficiency
public void setPolytropicEfficiency(double polytropicEfficiency) setPolytropicEfficiency.
- Specified by:
setPolytropicEfficiencyin interfaceCompressorInterface- Parameters:
polytropicEfficiency- a double
-
getThermoSystem
getThermoSystem.
- Specified by:
getThermoSystemin interfaceProcessEquipmentInterface- Overrides:
getThermoSystemin classProcessEquipmentBaseClass- Returns:
- a
SystemInterfaceobject
-
getCompressorChart
Getter for the field
compressorChart.- Returns:
- a
CompressorChartInterfaceobject
-
setCompressorChart
Setter for the field
compressorChart.- Parameters:
compressorChart- aCompressorChartInterfaceobject
-
getAntiSurge
getAntiSurge.
- Specified by:
getAntiSurgein interfaceCompressorInterface- Returns:
- a
AntiSurgeobject
-
isSurge
public boolean isSurge(double flow, double head) isSurge.
- Parameters:
flow- a doublehead- a double- Returns:
- a boolean
-
getDistanceToSurge
public double getDistanceToSurge()getDistanceToSurge.
- Specified by:
getDistanceToSurgein interfaceCompressorInterface- Returns:
- a double
-
getSurgeFlowRateMargin
public double getSurgeFlowRateMargin()getSurgeFlowRateMargin.
- Specified by:
getSurgeFlowRateMarginin interfaceCompressorInterface- Returns:
- a double
-
getSurgeFlowRate
public double getSurgeFlowRate()getSurgeFlowRate.
- Specified by:
getSurgeFlowRatein interfaceCompressorInterface- Returns:
- a double
-
getSurgeFlowRateStd
public double getSurgeFlowRateStd()- Specified by:
getSurgeFlowRateStdin interfaceCompressorInterface
-
isStoneWall
public boolean isStoneWall()Description copied from interface:CompressorInterfaceisStoneWall.
- Specified by:
isStoneWallin interfaceCompressorInterface- Returns:
- a boolean
-
getDistanceToStoneWall
public double getDistanceToStoneWall()Calculate the distance to the stone wall (choke) limit.Returns a positive value indicating the percentage margin to stone wall. For example, 0.5 means the stone wall is 50% above the current flow rate.
For single speed compressors where the stone wall curve is not active, this method uses the maximum flow point at the current speed. For multi-speed compressors, it uses the stone wall curve interpolation.
- Returns:
- distance to stone wall as a ratio (stone wall flow / current flow - 1)
-
isStoneWall
public boolean isStoneWall(double flow, double head) isStoneWall.
- Parameters:
flow- a doublehead- a double- Returns:
- a boolean
-
setAntiSurge
-
getSafetyFactorCorrectedFlowHeadAtCurrentSpeed
public double[] getSafetyFactorCorrectedFlowHeadAtCurrentSpeed()Get the safety-factor-corrected surge flow and head at the current compressor speed.
This method returns the safe minimum operating point by applying the surge control factor (typically 1.05 for 5% margin) to the surge flow at the current speed. The head is calculated at this safe flow rate using the compressor chart. This is particularly useful for single speed compressors where speed cannot be adjusted to move away from surge.
- Returns:
- A double array with two elements: [0] = safe surge flow (m3/hr), [1] = head at safe flow (kJ/kg or meter depending on chart headUnit)
-
getSpeed
public double getSpeed()Getter for the field
speed.- Returns:
- a double
-
isHigherThanMaxSpeed
public boolean isHigherThanMaxSpeed()Check if the current compressor speed is higher than the maximum speed in the compressor curves.This method is useful for detecting when the compressor is operating outside its design envelope (requires speed extrapolation beyond the defined curves).
- Returns:
- true if the current speed exceeds the maximum curve speed, false otherwise
-
isHigherThanMaxSpeed
public boolean isHigherThanMaxSpeed(double calculatedSpeed) Check if a calculated speed is higher than the maximum speed in the compressor curves.- Parameters:
calculatedSpeed- the speed to check in RPM- Returns:
- true if the calculated speed exceeds the maximum curve speed, false otherwise
-
getRatioToMaxSpeed
public double getRatioToMaxSpeed()Get the ratio of the current compressor speed to the maximum speed in the compressor curves.A ratio greater than 1.0 indicates the speed exceeds the maximum curve speed.
- Returns:
- the ratio speed/maxSpeedCurve (dimensionless), or NaN if chart not set
-
getRatioToMaxSpeed
public double getRatioToMaxSpeed(double calculatedSpeed) Get the ratio of a calculated speed to the maximum speed in the compressor curves.- Parameters:
calculatedSpeed- the speed to compare in RPM- Returns:
- the ratio calculatedSpeed/maxSpeedCurve (dimensionless), or NaN if chart not set
-
isLowerThanMinSpeed
public boolean isLowerThanMinSpeed()Check if the current compressor speed is lower than the minimum speed in the compressor curves.This method is useful for detecting when the compressor is operating below its design envelope (requires speed extrapolation below the defined curves), which may indicate turndown issues.
- Returns:
- true if the current speed is below the minimum curve speed, false otherwise
-
isLowerThanMinSpeed
public boolean isLowerThanMinSpeed(double calculatedSpeed) Check if a calculated speed is lower than the minimum speed in the compressor curves.- Parameters:
calculatedSpeed- the speed to check in RPM- Returns:
- true if the calculated speed is below the minimum curve speed, false otherwise
-
getRatioToMinSpeed
public double getRatioToMinSpeed()Get the ratio of the current compressor speed to the minimum speed in the compressor curves.A ratio less than 1.0 indicates the speed is below the minimum curve speed.
- Returns:
- the ratio speed/minSpeedCurve (dimensionless), or NaN if chart not set
-
getRatioToMinSpeed
public double getRatioToMinSpeed(double calculatedSpeed) Get the ratio of a calculated speed to the minimum speed in the compressor curves.- Parameters:
calculatedSpeed- the speed to compare in RPM- Returns:
- the ratio calculatedSpeed/minSpeedCurve (dimensionless), or NaN if chart not set
-
isSpeedWithinRange
public boolean isSpeedWithinRange()Check if the current compressor speed is within the defined compressor curve speed range.- Returns:
- true if the speed is within [minSpeedCurve, maxSpeedCurve], false otherwise
-
isSpeedWithinRange
public boolean isSpeedWithinRange(double calculatedSpeed) Check if a calculated speed is within the defined compressor curve speed range.- Parameters:
calculatedSpeed- the speed to check in RPM- Returns:
- true if the speed is within [minSpeedCurve, maxSpeedCurve], false otherwise
-
setSpeed
public void setSpeed(double speed) Setter for the field
speed.- Parameters:
speed- a int
-
getPolytropicHead
-
getPolytropicHead
public double getPolytropicHead()Getter for the field
polytropicHead.- Returns:
- a double
-
getPolytropicFluidHead
public double getPolytropicFluidHead()Getter for the field
polytropicFluidHead.- Returns:
- a double
-
getPolytropicExponent
public double getPolytropicExponent()Getter for the field
polytropicExponent.- Returns:
- a double
-
getPolytropicHeadMeter
public double getPolytropicHeadMeter()Getter for the field
polytropicHeadMeter.- Returns:
- a double
-
setPolytropicHeadMeter
public void setPolytropicHeadMeter(double polytropicHeadMeter) Setter for the field
polytropicHeadMeter.- Parameters:
polytropicHeadMeter- a double
-
getOutTemperature
public double getOutTemperature()Getter for the field
outTemperature.- Returns:
- a double
-
setOutTemperature
public void setOutTemperature(double outTemperature) Setter for the field
outTemperature.- Parameters:
outTemperature- a double
-
useOutTemperature
public void useOutTemperature(boolean useOutTemperature) useOutTemperature.
- Parameters:
useOutTemperature- a boolean
-
getNumberOfCompressorCalcSteps
public int getNumberOfCompressorCalcSteps()Getter for the field
numberOfCompressorCalcSteps.- Returns:
- the number of calculation steps in compressor
-
setNumberOfCompressorCalcSteps
public void setNumberOfCompressorCalcSteps(int numberOfCompressorCalcSteps) Setter for the field
numberOfCompressorCalcSteps.- Parameters:
numberOfCompressorCalcSteps- a int
-
isUseRigorousPolytropicMethod
public boolean isUseRigorousPolytropicMethod()isUseRigorousPolytropicMethod.
- Returns:
- a boolean
-
setUseRigorousPolytropicMethod
public void setUseRigorousPolytropicMethod(boolean useRigorousPolytropicMethod) Setter for the field
useRigorousPolytropicMethod.- Parameters:
useRigorousPolytropicMethod- a boolean
-
setPressure
public void setPressure(double pressure) Setter for the field
pressure.- Specified by:
setPressurein interfaceProcessEquipmentInterface- Overrides:
setPressurein classProcessEquipmentBaseClass- Parameters:
pressure- a double
-
setPressure
-
getEntropyProduction
getEntropyProduction.
- Specified by:
getEntropyProductionin interfaceProcessEquipmentInterface- Overrides:
getEntropyProductionin classProcessEquipmentBaseClass- Parameters:
unit- aStringobject- Returns:
- a double
-
getExergyChange
Get exergy change production of the process equipment.- Specified by:
getExergyChangein interfaceProcessEquipmentInterface- Overrides:
getExergyChangein classProcessEquipmentBaseClass- Parameters:
unit- Supported units are J and kJsurroundingTemperature- The surrounding temperature in Kelvin- Returns:
- change in exergy in specified unit
-
getPolytropicMethod
-
setPolytropicMethod
-
isUseGERG2008
public boolean isUseGERG2008()Getter for property useGERG2008.- Returns:
- Value
-
setUseGERG2008
public void setUseGERG2008(boolean useGERG2008) Setter for property useGERG2008.- Parameters:
useGERG2008- Value to set
-
isUseLeachman
public boolean isUseLeachman()Getter for property useLeachman.- Returns:
- Value
-
setUseLeachman
public void setUseLeachman(boolean useLeachman) Setter for property useLeachman.- Parameters:
useLeachman- Value to set
-
isUseVega
public boolean isUseVega()Getter for property useVega.- Returns:
- Value
-
setUseVega
public void setUseVega(boolean useVega) Setter for property useVega.- Parameters:
useVega- Value to set
-
getPropertyProfile
Getter for the field
propertyProfile.- Returns:
- a
CompressorPropertyProfileobject
-
setPropertyProfile
Setter for the field
propertyProfile.- Parameters:
propertyProfile- aCompressorPropertyProfileobject
-
runController
runController.
- Parameters:
dt- a doubleid- Calculation identifier
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceProcessEquipmentInterface- Overrides:
hashCodein classProcessEquipmentBaseClass
-
equals
- Specified by:
equalsin interfaceProcessEquipmentInterface- Overrides:
equalsin classProcessEquipmentBaseClass
-
setMaximumSpeed
public void setMaximumSpeed(double maxSpeed) setMaximumSpeed.
- Specified by:
setMaximumSpeedin interfaceCompressorInterface- Parameters:
maxSpeed- a double
-
setMinimumSpeed
public void setMinimumSpeed(double minspeed) setMinimumSpeed.
- Specified by:
setMinimumSpeedin interfaceCompressorInterface- Parameters:
minspeed- a double
-
getMaximumSpeed
public double getMaximumSpeed()getMaximumSpeed.
- Specified by:
getMaximumSpeedin interfaceCompressorInterface- Returns:
- a double
-
getMinimumSpeed
public double getMinimumSpeed()getMinimumSpeed.
- Specified by:
getMinimumSpeedin interfaceCompressorInterface- Returns:
- a double
-
setCompressionRatio
public void setCompressionRatio(double compRatio) Setter for the field
compressionRatio.- Parameters:
compRatio- a double
-
getCompressionRatio
public double getCompressionRatio()Getter for the field
compressionRatio.- Returns:
- a double
-
toJson
Serializes the Process Equipment along with its state to a JSON string.
- Specified by:
toJsonin interfaceProcessEquipmentInterface- Overrides:
toJsonin classTwoPortEquipment- Returns:
- json string.
-
toJson
Serializes the Process Equipment with configurable level of detail.- Specified by:
toJsonin interfaceProcessEquipmentInterface- Overrides:
toJsonin classTwoPortEquipment- Parameters:
cfg- report configuration- Returns:
- json string
-
getMaxOutletPressure
public double getMaxOutletPressure()Getter for the field
maxOutletPressure.- Returns:
- a double
-
setMaxOutletPressure
public void setMaxOutletPressure(double maxOutletPressure) Setter for the field
maxOutletPressure.- Parameters:
maxOutletPressure- a double
-
isSetMaxOutletPressure
public boolean isSetMaxOutletPressure()isSetMaxOutletPressure.
- Returns:
- a boolean
-
setIsSetMaxOutletPressure
public void setIsSetMaxOutletPressure(boolean isSetMaxOutletPressure) Setter for the field
isSetMaxOutletPressure.- Parameters:
isSetMaxOutletPressure- a boolean
-
getActualCompressionRatio
public double getActualCompressionRatio()Getter for the field
actualCompressionRatio.- Returns:
- a double
-
setCompressorChartType
Set CompressorChartType
- Specified by:
setCompressorChartTypein interfaceCompressorInterface- Parameters:
type- aStringobject
-
generateCompressorChart
public void generateCompressorChart()Generates a compressor chart based on the current operating point.This is a convenience method that creates a single-speed compressor chart using the compressor's current speed and operating conditions. The chart type will match the compressor's current chart type setting.
Example usage:
compressor.setSpeed(10000); compressor.run(); compressor.generateCompressorChart(); // Generates chart at current speed
-
generateCompressorChart
public void generateCompressorChart(int numberOfSpeeds) Generates a compressor chart with multiple speed curves.Creates a multi-speed compressor chart centered around the current speed. The speeds are distributed from 80% to 120% of the current speed.
- Parameters:
numberOfSpeeds- Number of speed curves to generate (must be at least 1)
-
generateCompressorChart
Generates a compressor chart with specified options.Available generation options:
- "normal curves" - Standard 5-point curves with surge, design, and stonewall points
- "mid range" - 3-point simplified curves
- Parameters:
generationOption- The generation option to use
-
generateCompressorChart
Generates a compressor chart with specified options and number of speeds.This is the main chart generation method that provides full control over the generated chart. The generated chart will automatically use the compressor's current chart type (simple, interpolate, or interpolate and extrapolate).
Example usage:
// Generate 5-speed chart with normal curves compressor.generateCompressorChart("normal curves", 5); // Generate 3-speed chart with simplified curves compressor.generateCompressorChart("mid range", 3);- Parameters:
generationOption- The generation option: "normal curves" or "mid range"numberOfSpeeds- Number of speed curves to generate (must be at least 1)
-
generateCompressorChartFromTemplate
Generates a compressor chart from a predefined template.Templates provide realistic compressor curve shapes based on typical compressor characteristics. Available templates:
- "CENTRIFUGAL_STANDARD" - Standard centrifugal compressor curves
- "CENTRIFUGAL_HIGH_FLOW" - High flow, lower head compressor
- "CENTRIFUGAL_HIGH_HEAD" - High head, narrower operating range
Example usage:
compressor.generateCompressorChartFromTemplate("CENTRIFUGAL_STANDARD", 9);- Parameters:
templateName- Name of the template to usenumberOfSpeeds- Number of speed curves to generate
-
generateCompressorChart
Generates a compressor chart with specific speed values.This method allows precise control over which speeds are included in the chart.
- Parameters:
generationOption- The generation option: "normal curves" or "mid range"speeds- Array of speed values in RPM
-
getCompressorChartType
Gets the current compressor chart type as a string.- Returns:
- The chart type: "simple", "interpolate", or "interpolate and extrapolate"
-
isSolveSpeed
public boolean isSolveSpeed()isSolveSpeed.
- Returns:
- a boolean
-
setSolveSpeed
public void setSolveSpeed(boolean solveSpeed) Setter for the field
solveSpeed.- Parameters:
solveSpeed- a boolean
-
isCalcPressureOut
public boolean isCalcPressureOut()isCalcPressureOut.
- Returns:
- a boolean
-
setCalcPressureOut
public void setCalcPressureOut(boolean calcPressureOut) Setter for the field
calcPressureOut.- Parameters:
calcPressureOut- a boolean
-
isLimitSpeed
public boolean isLimitSpeed()Checks if the compressor speed is limited.- Returns:
trueif the compressor speed is limited,falseotherwise.
-
setLimitSpeed
public void setLimitSpeed(boolean limitSpeed) Sets whether the compressor speed should be limited.- Parameters:
limitSpeed-trueto limit the compressor speed,falseotherwise.
-
getExergyChange
getExergyChange.
- Specified by:
getExergyChangein interfaceProcessEquipmentInterface- Parameters:
unit- aStringobject- Returns:
- a double
-
getCapacityDuty
public double getCapacityDuty()getCapacityDuty.
- Specified by:
getCapacityDutyin interfaceProcessEquipmentInterface- Returns:
- a double
-
getCapacityMax
public double getCapacityMax()getCapacityMax.
- Specified by:
getCapacityMaxin interfaceProcessEquipmentInterface- Returns:
- a double
-
getStateVector
Get the current state as a standardized vector.The state vector should include all observable variables relevant for control and monitoring. Values should be in physical units with appropriate bounds.
Returns state vector containing:
- inlet_pressure - Inlet pressure [bar]
- outlet_pressure - Outlet pressure [bar]
- inlet_temperature - Inlet temperature [K]
- outlet_temperature - Outlet temperature [K]
- compression_ratio - Compression ratio [-]
- polytropic_efficiency - Polytropic efficiency [fraction]
- isentropic_efficiency - Isentropic efficiency [fraction]
- power - Shaft power [kW]
- speed - Rotational speed [rpm]
- surge_margin - Distance to surge [%]
- polytropic_head - Polytropic head [kJ/kg]
- inlet_flow - Inlet mass flow [kg/s]
- Specified by:
getStateVectorin interfaceStateVectorProvider- Returns:
- current state vector
-
getOperatingState
Get the current operating state of the compressor.- Returns:
- the current CompressorState
-
setOperatingState
Set the operating state of the compressor.- Parameters:
state- the new operating state
-
getDriver
Get the compressor driver model.- Returns:
- the driver model, or null if not set
-
setDriver
Set the compressor driver model.- Parameters:
driver- the driver model
-
setDriver
Create and set a new driver with specified type and rated power.- Parameters:
type- driver typeratedPower- rated power in kW
-
getOperatingHistory
Get the operating history tracker.- Returns:
- the operating history, or null if not enabled
-
enableOperatingHistory
public void enableOperatingHistory()Enable operating history tracking. -
disableOperatingHistory
public void disableOperatingHistory()Disable operating history tracking. -
recordOperatingPoint
public void recordOperatingPoint(double time) Record the current operating point to history.- Parameters:
time- simulation time in seconds
-
getStartupProfile
Get the startup profile.- Returns:
- the startup profile, or null if not set
-
setStartupProfile
Set the startup profile.- Parameters:
profile- the startup profile
-
getShutdownProfile
Get the shutdown profile.- Returns:
- the shutdown profile, or null if not set
-
setShutdownProfile
Set the shutdown profile.- Parameters:
profile- the shutdown profile
-
addEventListener
Add an event listener for compressor events.- Parameters:
listener- the event listener to add
-
removeEventListener
Remove an event listener.- Parameters:
listener- the event listener to remove
-
getRotationalInertia
public double getRotationalInertia()Get the rotational inertia of the compressor rotor.- Returns:
- inertia in kg⋅m²
-
setRotationalInertia
public void setRotationalInertia(double inertia) Set the rotational inertia of the compressor rotor.- Parameters:
inertia- inertia in kg⋅m²
-
getMaxAccelerationRate
public double getMaxAccelerationRate()Get the maximum acceleration rate.- Returns:
- max acceleration in RPM/s
-
setMaxAccelerationRate
public void setMaxAccelerationRate(double rate) Set the maximum acceleration rate.- Parameters:
rate- max acceleration in RPM/s
-
getMaxDecelerationRate
public double getMaxDecelerationRate()Get the maximum deceleration rate.- Returns:
- max deceleration in RPM/s
-
setMaxDecelerationRate
public void setMaxDecelerationRate(double rate) Set the maximum deceleration rate.- Parameters:
rate- max deceleration in RPM/s
-
getTargetSpeed
public double getTargetSpeed()Get the target speed for dynamic control.- Returns:
- target speed in RPM
-
setTargetSpeed
public void setTargetSpeed(double speed) Set the target speed for dynamic control.- Parameters:
speed- target speed in RPM
-
isAutoSpeedMode
public boolean isAutoSpeedMode()Check if auto-speed mode is enabled.In auto-speed mode, the compressor automatically calculates the required speed from the current operating point (flow and head) using the compressor chart.
- Returns:
- true if auto-speed mode is enabled
-
setAutoSpeedMode
public void setAutoSpeedMode(boolean enabled) Enable or disable auto-speed mode.- Parameters:
enabled- true to enable auto-speed mode
-
getDegradationFactor
public double getDegradationFactor()Get the performance degradation factor.- Returns:
- degradation factor (1.0 = new, less than 1.0 = degraded)
-
setDegradationFactor
public void setDegradationFactor(double factor) Set the performance degradation factor.- Parameters:
factor- degradation factor (1.0 = new, less than 1.0 = degraded)
-
getFoulingFactor
public double getFoulingFactor()Get the fouling factor.- Returns:
- fouling factor (0 = clean, higher = more fouled)
-
setFoulingFactor
public void setFoulingFactor(double factor) Set the fouling factor.- Parameters:
factor- fouling factor (0 = clean, higher = more fouled)
-
getOperatingHours
public double getOperatingHours()Get the total operating hours.- Returns:
- operating hours
-
setOperatingHours
public void setOperatingHours(double hours) Set the total operating hours.- Parameters:
hours- operating hours
-
addOperatingHours
public void addOperatingHours(double hours) Add operating time.- Parameters:
hours- hours to add
-
getSurgeWarningThreshold
public double getSurgeWarningThreshold()Get the surge warning threshold.- Returns:
- threshold as ratio (e.g., 0.15 = 15% margin)
-
setSurgeWarningThreshold
public void setSurgeWarningThreshold(double threshold) Set the surge warning threshold.- Parameters:
threshold- threshold as ratio
-
getSurgeCriticalThreshold
public double getSurgeCriticalThreshold()Get the surge critical threshold.- Returns:
- threshold as ratio (e.g., 0.05 = 5% margin)
-
setSurgeCriticalThreshold
public void setSurgeCriticalThreshold(double threshold) Set the surge critical threshold.- Parameters:
threshold- threshold as ratio
-
getStoneWallWarningThreshold
public double getStoneWallWarningThreshold()Get the stone wall warning threshold.- Returns:
- threshold as ratio
-
setStoneWallWarningThreshold
public void setStoneWallWarningThreshold(double threshold) Set the stone wall warning threshold.- Parameters:
threshold- threshold as ratio
-
checkSurgeMargin
public void checkSurgeMargin()Check surge margin and fire events if thresholds are crossed. -
checkStoneWallMargin
public void checkStoneWallMargin()Check stone wall margin and fire events if threshold is crossed. -
checkSpeedLimits
public void checkSpeedLimits()Check speed limits and fire events if limits are exceeded. -
checkPowerLimits
public void checkPowerLimits()Check driver power limits and fire events if limits are exceeded. -
startCompressor
public void startCompressor(double targetOperatingSpeed) Start the compressor following the startup profile.- Parameters:
targetOperatingSpeed- the final target speed in RPM
-
stopCompressor
Stop the compressor following the shutdown profile.- Parameters:
type- the type of shutdown
-
stopCompressor
public void stopCompressor()Normal shutdown. -
emergencyShutdown
public void emergencyShutdown()Emergency shutdown (ESD). -
updateDynamicState
public void updateDynamicState(double timeStep) Update the compressor state during a transient simulation step.This method should be called during dynamic simulation to update the compressor speed, state, and fire appropriate events.
- Parameters:
timeStep- the time step in seconds
-
updateStartup
private void updateStartup(double timeStep) Update startup sequence.- Parameters:
timeStep- time step in seconds
-
updateShutdown
private void updateShutdown(double timeStep) Update shutdown sequence.- Parameters:
timeStep- time step in seconds
-
updateSpeedWithInertia
private void updateSpeedWithInertia(double targetSpd, double timeStep) Update speed considering inertia constraints.- Parameters:
targetSpd- target speed in RPMtimeStep- time step in seconds
-
updateAutoSpeed
private void updateAutoSpeed()Update speed automatically based on operating point. -
getEffectivePolytropicHead
public double getEffectivePolytropicHead()Get the effective polytropic head accounting for degradation.- Returns:
- effective head in kJ/kg
-
getEffectivePolytropicEfficiency
public double getEffectivePolytropicEfficiency()Get the effective efficiency accounting for degradation.- Returns:
- effective polytropic efficiency
-
fireSurgeApproachEvent
private void fireSurgeApproachEvent(double surgeMargin, boolean isCritical) Fire surge approach event to all listeners.- Parameters:
surgeMargin- current surge marginisCritical- true if critical threshold
-
fireSurgeOccurredEvent
private void fireSurgeOccurredEvent(double surgeMargin) Fire surge occurred event.- Parameters:
surgeMargin- current surge margin
-
fireSpeedLimitExceededEvent
private void fireSpeedLimitExceededEvent(double currentSpeed, double ratio) Fire speed limit exceeded event.- Parameters:
currentSpeed- current speedratio- ratio to max speed
-
fireSpeedBelowMinimumEvent
private void fireSpeedBelowMinimumEvent(double currentSpeed, double ratio) Fire speed below minimum event.- Parameters:
currentSpeed- current speedratio- ratio to min speed
-
firePowerLimitExceededEvent
private void firePowerLimitExceededEvent(double currentPower, double maxPower) Fire power limit exceeded event.- Parameters:
currentPower- current power in kWmaxPower- max available power in kW
-
fireStateChangeEvent
Fire state change event.- Parameters:
oldState- previous statenewState- new state
-
fireStoneWallApproachEvent
private void fireStoneWallApproachEvent(double stoneWallMargin) Fire stone wall approach event.- Parameters:
stoneWallMargin- margin to stone wall
-
fireStartupCompleteEvent
private void fireStartupCompleteEvent()Fire startup complete event. -
fireShutdownCompleteEvent
private void fireShutdownCompleteEvent()Fire shutdown complete event. -
acknowledgeTrip
public void acknowledgeTrip()Acknowledge a tripped compressor to allow restart. -
resetDynamicState
public void resetDynamicState()Reset all dynamic simulation state. -
builder
Creates a new Builder for constructing a Compressor with a fluent API.Example usage:
Compressor comp = Compressor.builder("K-100").inletStream(feed).outletPressure(50.0, "bara") .polytropicEfficiency(0.75).speed(8000).build();- Parameters:
name- the name of the compressor- Returns:
- a new Builder instance
-