Class CompressorCapacityStrategy
java.lang.Object
neqsim.process.equipment.capacity.CompressorCapacityStrategy
- All Implemented Interfaces:
EquipmentCapacityStrategy
Capacity strategy for compressor equipment.
This strategy evaluates compressor capacity based on multiple constraints including:
- Speed limits (min/max RPM)
- Power limits (driver rated power)
- Surge margin (minimum flow)
- Stonewall margin (maximum flow)
- Discharge temperature limits
- Polytropic head limits
- Version:
- 1.0
- Author:
- NeqSim Development Team
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleDefault maximum discharge temperature (200°C).static final doubleDefault minimum stonewall margin (5%).static final doubleDefault minimum surge margin (10%).private doubleprivate doubleprivate double -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.CompressorCapacityStrategy(double minSurgeMargin, double minStonewallMargin, double maxDischargeTemp) Constructor with custom constraints. -
Method Summary
Modifier and TypeMethodDescriptiondoubleevaluateCapacity(ProcessEquipmentInterface equipment) Evaluates the current capacity utilization of the equipment.doubleevaluateMaxCapacity(ProcessEquipmentInterface equipment) Evaluates the maximum capacity of the equipment.getBottleneckConstraint(ProcessEquipmentInterface equipment) Gets the bottleneck constraint (highest utilization).getConstraints(ProcessEquipmentInterface equipment) Gets all capacity constraints for this equipment.Class<? extends ProcessEquipmentInterface> Gets the equipment class this strategy handles.doubleGets the maximum discharge temperature.private doublegetMaxPower(Compressor comp) Gets the maximum power for a compressor.doubleGets the minimum stonewall margin.doubleGets the minimum surge margin.getName()Gets a descriptive name for this strategy.intGets the priority of this strategy.getViolations(ProcessEquipmentInterface equipment) Gets the list of constraint violations for this equipment.booleanisWithinHardLimits(ProcessEquipmentInterface equipment) Checks if the equipment is operating within all hard limits.booleanisWithinSoftLimits(ProcessEquipmentInterface equipment) Checks if the equipment is operating within all soft limits (design values).voidsetMaxDischargeTemp(double maxDischargeTemp) Sets the maximum discharge temperature.voidsetMinStonewallMargin(double minStonewallMargin) Sets the minimum stonewall margin.voidsetMinSurgeMargin(double minSurgeMargin) Sets the minimum surge margin.booleansupports(ProcessEquipmentInterface equipment) Checks if this strategy supports the given equipment.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EquipmentCapacityStrategy
getAvailableMargin
-
Field Details
-
DEFAULT_MIN_SURGE_MARGIN
public static final double DEFAULT_MIN_SURGE_MARGINDefault minimum surge margin (10%).- See Also:
-
DEFAULT_MIN_STONEWALL_MARGIN
public static final double DEFAULT_MIN_STONEWALL_MARGINDefault minimum stonewall margin (5%).- See Also:
-
DEFAULT_MAX_DISCHARGE_TEMP
public static final double DEFAULT_MAX_DISCHARGE_TEMPDefault maximum discharge temperature (200°C).- See Also:
-
minSurgeMargin
private double minSurgeMargin -
minStonewallMargin
private double minStonewallMargin -
maxDischargeTemp
private double maxDischargeTemp
-
-
Constructor Details
-
CompressorCapacityStrategy
public CompressorCapacityStrategy()Default constructor. -
CompressorCapacityStrategy
public CompressorCapacityStrategy(double minSurgeMargin, double minStonewallMargin, double maxDischargeTemp) Constructor with custom constraints.- Parameters:
minSurgeMargin- minimum surge margin as fractionminStonewallMargin- minimum stonewall margin as fractionmaxDischargeTemp- maximum discharge temperature in Celsius
-
-
Method Details
-
supports
Checks if this strategy supports the given equipment.- Specified by:
supportsin interfaceEquipmentCapacityStrategy- Parameters:
equipment- the equipment to check- Returns:
- true if this strategy can evaluate the equipment
-
getPriority
public int getPriority()Gets the priority of this strategy.When multiple strategies support the same equipment, the one with higher priority is used. Default priority is 0. Use positive values for more specific strategies.
- Specified by:
getPriorityin interfaceEquipmentCapacityStrategy- Returns:
- the priority value (higher = more preferred)
-
getName
Gets a descriptive name for this strategy.- Specified by:
getNamein interfaceEquipmentCapacityStrategy- Returns:
- strategy name
-
getEquipmentClass
Gets the equipment class this strategy handles.- Specified by:
getEquipmentClassin interfaceEquipmentCapacityStrategy- Returns:
- the equipment class
-
evaluateCapacity
Evaluates the current capacity utilization of the equipment.Returns a value between 0 and 1+ where:
- 0.0 = no load
- 1.0 = at design capacity
- >1.0 = over capacity
- Specified by:
evaluateCapacityin interfaceEquipmentCapacityStrategy- Parameters:
equipment- the equipment to evaluate- Returns:
- capacity utilization as a fraction
-
evaluateMaxCapacity
Evaluates the maximum capacity of the equipment.Returns the maximum capacity in the equipment's natural units (e.g., flow rate, power, duty).
- Specified by:
evaluateMaxCapacityin interfaceEquipmentCapacityStrategy- Parameters:
equipment- the equipment to evaluate- Returns:
- maximum capacity
-
getMaxPower
Gets the maximum power for a compressor.Tries to get max power from driver first, then from mechanical design.
- Parameters:
comp- the compressor- Returns:
- maximum power in kW, or 0 if not available
-
getConstraints
Gets all capacity constraints for this equipment.Returns a map of constraint name to constraint object. The constraints include both the current value and the design/limit values.
- Specified by:
getConstraintsin interfaceEquipmentCapacityStrategy- Parameters:
equipment- the equipment to get constraints for- Returns:
- map of constraint name to CapacityConstraint
-
getViolations
Gets the list of constraint violations for this equipment.Returns only the constraints that are currently violated (utilization > 1.0 or outside limits).
- Specified by:
getViolationsin interfaceEquipmentCapacityStrategy- Parameters:
equipment- the equipment to check- Returns:
- list of violated constraints
-
getBottleneckConstraint
Gets the bottleneck constraint (highest utilization).- Specified by:
getBottleneckConstraintin interfaceEquipmentCapacityStrategy- Parameters:
equipment- the equipment to evaluate- Returns:
- the constraint with highest utilization, or null if none
-
isWithinHardLimits
Checks if the equipment is operating within all hard limits.- Specified by:
isWithinHardLimitsin interfaceEquipmentCapacityStrategy- Parameters:
equipment- the equipment to check- Returns:
- true if no hard limits are violated
-
isWithinSoftLimits
Checks if the equipment is operating within all soft limits (design values).- Specified by:
isWithinSoftLimitsin interfaceEquipmentCapacityStrategy- Parameters:
equipment- the equipment to check- Returns:
- true if no soft limits are violated
-
getMinSurgeMargin
public double getMinSurgeMargin()Gets the minimum surge margin.- Returns:
- minimum surge margin as fraction
-
setMinSurgeMargin
public void setMinSurgeMargin(double minSurgeMargin) Sets the minimum surge margin.- Parameters:
minSurgeMargin- minimum surge margin as fraction
-
getMinStonewallMargin
public double getMinStonewallMargin()Gets the minimum stonewall margin.- Returns:
- minimum stonewall margin as fraction
-
setMinStonewallMargin
public void setMinStonewallMargin(double minStonewallMargin) Sets the minimum stonewall margin.- Parameters:
minStonewallMargin- minimum stonewall margin as fraction
-
getMaxDischargeTemp
public double getMaxDischargeTemp()Gets the maximum discharge temperature.- Returns:
- maximum discharge temperature in Celsius
-
setMaxDischargeTemp
public void setMaxDischargeTemp(double maxDischargeTemp) Sets the maximum discharge temperature.- Parameters:
maxDischargeTemp- maximum discharge temperature in Celsius
-