Class PipeCapacityStrategy
java.lang.Object
neqsim.process.equipment.capacity.PipeCapacityStrategy
- All Implemented Interfaces:
EquipmentCapacityStrategy
Capacity strategy for pipe and pipeline equipment.
This strategy evaluates pipe capacity based on multiple constraints including:
- Superficial velocity (erosional velocity limits)
- Pressure drop (allowable DP)
- Liquid holdup (for multiphase)
- Flow regime stability
- Version:
- 1.0
- Author:
- NeqSim Development Team
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleDefault maximum erosional velocity ratio.static final doubleDefault maximum gas velocity (m/s).static final doubleDefault maximum liquid velocity (m/s).static final doubleDefault maximum multiphase velocity (m/s).private doubleprivate doubleprivate doubleprivate double -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.PipeCapacityStrategy(double maxGasVelocity, double maxLiquidVelocity, double maxMultiphaseVelocity) Constructor with custom velocity limits. -
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.private doubleGets the applicable maximum velocity based on flow type.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 erosional velocity ratio.doubleGets the maximum gas velocity.doubleGets the maximum liquid velocity.doubleGets the maximum multiphase velocity.getName()Gets a descriptive name for this strategy.intGets the priority of this strategy.private doublegetSuperficialVelocity(ProcessEquipmentInterface equipment) Gets the superficial velocity from the pipe.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).voidsetMaxErosionalRatio(double maxErosionalRatio) Sets the maximum erosional velocity ratio.voidsetMaxGasVelocity(double maxGasVelocity) Sets the maximum gas velocity.voidsetMaxLiquidVelocity(double maxLiquidVelocity) Sets the maximum liquid velocity.voidsetMaxMultiphaseVelocity(double maxMultiphaseVelocity) Sets the maximum multiphase velocity.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_MAX_GAS_VELOCITY
public static final double DEFAULT_MAX_GAS_VELOCITYDefault maximum gas velocity (m/s).- See Also:
-
DEFAULT_MAX_LIQUID_VELOCITY
public static final double DEFAULT_MAX_LIQUID_VELOCITYDefault maximum liquid velocity (m/s).- See Also:
-
DEFAULT_MAX_MULTIPHASE_VELOCITY
public static final double DEFAULT_MAX_MULTIPHASE_VELOCITYDefault maximum multiphase velocity (m/s).- See Also:
-
DEFAULT_MAX_EROSIONAL_RATIO
public static final double DEFAULT_MAX_EROSIONAL_RATIODefault maximum erosional velocity ratio.- See Also:
-
maxGasVelocity
private double maxGasVelocity -
maxLiquidVelocity
private double maxLiquidVelocity -
maxMultiphaseVelocity
private double maxMultiphaseVelocity -
maxErosionalRatio
private double maxErosionalRatio
-
-
Constructor Details
-
PipeCapacityStrategy
public PipeCapacityStrategy()Default constructor. -
PipeCapacityStrategy
public PipeCapacityStrategy(double maxGasVelocity, double maxLiquidVelocity, double maxMultiphaseVelocity) Constructor with custom velocity limits.- Parameters:
maxGasVelocity- maximum gas velocity in m/smaxLiquidVelocity- maximum liquid velocity in m/smaxMultiphaseVelocity- maximum multiphase velocity in m/s
-
-
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
-
getSuperficialVelocity
Gets the superficial velocity from the pipe.- Parameters:
equipment- the pipe equipment- Returns:
- superficial velocity in m/s
-
getApplicableMaxVelocity
Gets the applicable maximum velocity based on flow type.- Parameters:
equipment- the pipe equipment- Returns:
- maximum velocity in m/s
-
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
-
getMaxGasVelocity
public double getMaxGasVelocity()Gets the maximum gas velocity.- Returns:
- maximum gas velocity in m/s
-
setMaxGasVelocity
public void setMaxGasVelocity(double maxGasVelocity) Sets the maximum gas velocity.- Parameters:
maxGasVelocity- maximum gas velocity in m/s
-
getMaxLiquidVelocity
public double getMaxLiquidVelocity()Gets the maximum liquid velocity.- Returns:
- maximum liquid velocity in m/s
-
setMaxLiquidVelocity
public void setMaxLiquidVelocity(double maxLiquidVelocity) Sets the maximum liquid velocity.- Parameters:
maxLiquidVelocity- maximum liquid velocity in m/s
-
getMaxMultiphaseVelocity
public double getMaxMultiphaseVelocity()Gets the maximum multiphase velocity.- Returns:
- maximum multiphase velocity in m/s
-
setMaxMultiphaseVelocity
public void setMaxMultiphaseVelocity(double maxMultiphaseVelocity) Sets the maximum multiphase velocity.- Parameters:
maxMultiphaseVelocity- maximum multiphase velocity in m/s
-
getMaxErosionalRatio
public double getMaxErosionalRatio()Gets the maximum erosional velocity ratio.- Returns:
- maximum erosional velocity ratio
-
setMaxErosionalRatio
public void setMaxErosionalRatio(double maxErosionalRatio) Sets the maximum erosional velocity ratio.- Parameters:
maxErosionalRatio- maximum erosional velocity ratio
-