Class ExpanderCapacityStrategy

java.lang.Object
neqsim.process.equipment.capacity.ExpanderCapacityStrategy
All Implemented Interfaces:
EquipmentCapacityStrategy

public class ExpanderCapacityStrategy extends Object implements EquipmentCapacityStrategy
Capacity strategy for expander equipment.

This strategy evaluates expander capacity based on multiple constraints including:

  • Power generation (compared to design power)
  • Speed limits (minimum and maximum)
  • Pressure ratio limits
  • Flow rate limits
Version:
1.0
Author:
NeqSim Development Team
  • Field Details

    • DEFAULT_MAX_POWER_RATIO

      public static final double DEFAULT_MAX_POWER_RATIO
      Default maximum power ratio (fraction of design).
      See Also:
    • DEFAULT_MIN_SPEED_RATIO

      public static final double DEFAULT_MIN_SPEED_RATIO
      Default minimum speed ratio.
      See Also:
    • DEFAULT_MAX_SPEED_RATIO

      public static final double DEFAULT_MAX_SPEED_RATIO
      Default maximum speed ratio.
      See Also:
    • DEFAULT_DESIGN_SPEED

      private static final double DEFAULT_DESIGN_SPEED
      Default design speed in RPM.
      See Also:
    • DEFAULT_MAX_PRESSURE_RATIO

      private static final double DEFAULT_MAX_PRESSURE_RATIO
      Default max pressure ratio for turboexpanders.
      See Also:
    • maxPowerRatio

      private double maxPowerRatio
    • minSpeedRatio

      private double minSpeedRatio
    • maxSpeedRatio

      private double maxSpeedRatio
  • Constructor Details

    • ExpanderCapacityStrategy

      public ExpanderCapacityStrategy()
      Default constructor.
    • ExpanderCapacityStrategy

      public ExpanderCapacityStrategy(double maxPowerRatio, double minSpeedRatio, double maxSpeedRatio)
      Constructor with custom constraints.
      Parameters:
      maxPowerRatio - maximum power ratio (e.g., 1.1 for 110% of design)
      minSpeedRatio - minimum speed ratio
      maxSpeedRatio - maximum speed ratio
  • Method Details

    • supports

      public boolean supports(ProcessEquipmentInterface equipment)
      Checks if this strategy supports the given equipment.
      Specified by:
      supports in interface EquipmentCapacityStrategy
      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:
      getPriority in interface EquipmentCapacityStrategy
      Returns:
      the priority value (higher = more preferred)
    • getName

      public String getName()
      Gets a descriptive name for this strategy.
      Specified by:
      getName in interface EquipmentCapacityStrategy
      Returns:
      strategy name
    • getEquipmentClass

      public Class<? extends ProcessEquipmentInterface> getEquipmentClass()
      Gets the equipment class this strategy handles.
      Specified by:
      getEquipmentClass in interface EquipmentCapacityStrategy
      Returns:
      the equipment class
    • evaluateCapacity

      public double evaluateCapacity(ProcessEquipmentInterface equipment)
      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:
      evaluateCapacity in interface EquipmentCapacityStrategy
      Parameters:
      equipment - the equipment to evaluate
      Returns:
      capacity utilization as a fraction
    • evaluateMaxCapacity

      public double evaluateMaxCapacity(ProcessEquipmentInterface equipment)
      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:
      evaluateMaxCapacity in interface EquipmentCapacityStrategy
      Parameters:
      equipment - the equipment to evaluate
      Returns:
      maximum capacity
    • getConstraints

      public Map<String, CapacityConstraint> getConstraints(ProcessEquipmentInterface equipment)
      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:
      getConstraints in interface EquipmentCapacityStrategy
      Parameters:
      equipment - the equipment to get constraints for
      Returns:
      map of constraint name to CapacityConstraint
    • getViolations

      public List<CapacityConstraint> getViolations(ProcessEquipmentInterface equipment)
      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:
      getViolations in interface EquipmentCapacityStrategy
      Parameters:
      equipment - the equipment to check
      Returns:
      list of violated constraints
    • getBottleneckConstraint

      public CapacityConstraint getBottleneckConstraint(ProcessEquipmentInterface equipment)
      Gets the bottleneck constraint (highest utilization).
      Specified by:
      getBottleneckConstraint in interface EquipmentCapacityStrategy
      Parameters:
      equipment - the equipment to evaluate
      Returns:
      the constraint with highest utilization, or null if none
    • isWithinHardLimits

      public boolean isWithinHardLimits(ProcessEquipmentInterface equipment)
      Checks if the equipment is operating within all hard limits.
      Specified by:
      isWithinHardLimits in interface EquipmentCapacityStrategy
      Parameters:
      equipment - the equipment to check
      Returns:
      true if no hard limits are violated
    • isWithinSoftLimits

      public boolean isWithinSoftLimits(ProcessEquipmentInterface equipment)
      Checks if the equipment is operating within all soft limits (design values).
      Specified by:
      isWithinSoftLimits in interface EquipmentCapacityStrategy
      Parameters:
      equipment - the equipment to check
      Returns:
      true if no soft limits are violated
    • getAvailableMargin

      public double getAvailableMargin(ProcessEquipmentInterface equipment)
      Gets the available margin before hitting the bottleneck constraint.
      Specified by:
      getAvailableMargin in interface EquipmentCapacityStrategy
      Parameters:
      equipment - the equipment to evaluate
      Returns:
      available margin as a fraction (0.2 = 20% headroom)
    • setMaxPowerRatio

      public void setMaxPowerRatio(double maxPowerRatio)
      Sets the maximum power ratio.
      Parameters:
      maxPowerRatio - the maximum power ratio
    • setMinSpeedRatio

      public void setMinSpeedRatio(double minSpeedRatio)
      Sets the minimum speed ratio.
      Parameters:
      minSpeedRatio - the minimum speed ratio
    • setMaxSpeedRatio

      public void setMaxSpeedRatio(double maxSpeedRatio)
      Sets the maximum speed ratio.
      Parameters:
      maxSpeedRatio - the maximum speed ratio