Class ControlValveSizing

java.lang.Object
neqsim.process.mechanicaldesign.valve.ControlValveSizing
All Implemented Interfaces:
Serializable, ControlValveSizingInterface
Direct Known Subclasses:
ControlValveSizing_IEC_60534, ControlValveSizing_simple

public class ControlValveSizing extends Object implements ControlValveSizingInterface, Serializable
Provides methods for sizing control valves for liquids and gases according to standard equations.
Author:
esol
See Also:
  • Field Details

    • valveMechanicalDesign

      ValveMechanicalDesign valveMechanicalDesign
    • KV_TO_CV_FACTOR

      private static final double KV_TO_CV_FACTOR
      See Also:
    • SECONDS_PER_HOUR

      private static final double SECONDS_PER_HOUR
      See Also:
    • MAX_BISECTION_ITERATIONS

      private static final int MAX_BISECTION_ITERATIONS
      See Also:
    • MAX_VALVE_OPENING_PERCENTAGE

      private static final double MAX_VALVE_OPENING_PERCENTAGE
      See Also:
    • xT

      double xT
    • allowChoked

      boolean allowChoked
  • Constructor Details

    • ControlValveSizing

      public ControlValveSizing()

      Constructor for ControlValveSizing.

    • ControlValveSizing

      public ControlValveSizing(ValveMechanicalDesign valveMechanicalDesign)

      Constructor for ControlValveSizing.

      Parameters:
      valveMechanicalDesign - a ValveMechanicalDesign object
  • Method Details

    • getValveMechanicalDesign

      public ValveMechanicalDesign getValveMechanicalDesign()

      Getter for the field valveMechanicalDesign.

      Returns:
      a ValveMechanicalDesign object
    • getxT

      public double getxT()

      Getter for the field xT.

      Specified by:
      getxT in interface ControlValveSizingInterface
      Returns:
      a double
    • setxT

      public void setxT(double xT)

      setxT.

      Specified by:
      setxT in interface ControlValveSizingInterface
      Parameters:
      xT - a double
    • isAllowChoked

      public boolean isAllowChoked()

      isAllowChoked.

      Specified by:
      isAllowChoked in interface ControlValveSizingInterface
      Returns:
      a boolean
    • setAllowChoked

      public void setAllowChoked(boolean allowChoked)

      setAllowChoked.

      Specified by:
      setAllowChoked in interface ControlValveSizingInterface
      Parameters:
      allowChoked - a boolean
    • calcValveSize

      public Map<String,Object> calcValveSize(double percentOpening)
      Calculates the valve size based on the fluid properties and operating conditions.
      Specified by:
      calcValveSize in interface ControlValveSizingInterface
      Parameters:
      percentOpening - a double
      Returns:
      a Map object
    • calcKv

      public double calcKv(double percentOpening)

      calcKv.

      Calculates valve flow coefficient Kv using simplified formulas:

      • For liquids: Kv = Q / sqrt(deltaP / SG) where SG = rho/1000
      • For gases: Uses simplified IEC 60534 formula with expansion factor
      Parameters:
      percentOpening - valve opening percentage (0-100)
      Returns:
      the calculated Kv value
    • calculateFlowRateFromValveOpening

      public double calculateFlowRateFromValveOpening(double actualKv, StreamInterface inletStream, StreamInterface outletStream)

      calculateFlowRateFromValveOpening.

      Calculates the flow rate through a control valve based on the valve opening, Kv, and inlet/outlet streams.

      Specified by:
      calculateFlowRateFromValveOpening in interface ControlValveSizingInterface
      Parameters:
      actualKv - a double
      inletStream - a StreamInterface object
      outletStream - a StreamInterface object
      Returns:
      a double
    • calculateMolarFlow

      public double calculateMolarFlow(double actualKv, StreamInterface inStream, StreamInterface outStream)

      calculateMolarFlow.

      Calculates flow rate from valve Kv using IEC 60534 formulas.

      Parameters:
      actualKv - the valve flow coefficient at the current opening
      inStream - inlet stream
      outStream - outlet stream
      Returns:
      volumetric flow rate in m3/s
    • calculateValveOpeningFromFlowRate

      public double calculateValveOpeningFromFlowRate(double Q, double actualKv, StreamInterface inletStream, StreamInterface outletStream)

      calculateValveOpeningFromFlowRate.

      Calculates the required valve opening fraction for a given flow rate, Kv, and inlet/outlet streams.

      Specified by:
      calculateValveOpeningFromFlowRate in interface ControlValveSizingInterface
      Parameters:
      Q - a double
      actualKv - a double
      inletStream - a StreamInterface object
      outletStream - a StreamInterface object
      Returns:
      a double
    • findOutletPressureForFixedKv

      public double findOutletPressureForFixedKv(double actualKv, StreamInterface inletStream)

      findOutletPressureForFixedKv.

      Finds the outlet pressure for a given Kv, valve opening, and inlet stream.

      Specified by:
      findOutletPressureForFixedKv in interface ControlValveSizingInterface
      Parameters:
      actualKv - a double
      inletStream - a StreamInterface object
      Returns:
      a double
    • calculateOutletPressure

      public double calculateOutletPressure(double KvAdjusted, StreamInterface inStream)

      calculateOutletPressure.

      Calculates outlet pressure for a given Kv and inlet conditions using IEC 60534 formulas. Uses bisection search for gas valves due to the complex relationship between Kv and pressure.

      Parameters:
      KvAdjusted - the adjusted Kv (at current valve opening)
      inStream - inlet stream
      Returns:
      outlet pressure in Pa
    • Kv_to_Cv

      private double Kv_to_Cv(double Kv)
    • Cv_to_Kv

      private double Cv_to_Kv(double Cv)