Class ControlValveSizing_simple

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

public class ControlValveSizing_simple extends ControlValveSizing
Provides simplified methods for sizing production chokes and control valves.

This class implements production choke sizing formulas commonly used in oil and gas production. For gas flow, it uses a modified Perkins/Sachdeva approach with proper compressibility handling. For liquid flow, it uses the standard Kv formula.

The gas sizing formula is:

Cv = Q_std / (27.66 * P1 * Y * sqrt(1 / (MW * T * Z)))

where Q_std is standard volumetric flow (Sm³/h), P1 is inlet pressure (bara), Y is expansion factor, MW is molecular weight (g/mol), T is temperature (K), and Z is compressibility factor.

Author:
esol
See Also:
  • Field Details

    • Cd

      private double Cd
      Discharge coefficient for production chokes (typical value).
  • Constructor Details

    • ControlValveSizing_simple

      public ControlValveSizing_simple()

      Constructor for ControlValveSizing_simple.

    • ControlValveSizing_simple

      public ControlValveSizing_simple(ValveMechanicalDesign valveMechanicalDesign)

      Constructor for ControlValveSizing_simple.

      Parameters:
      valveMechanicalDesign - a ValveMechanicalDesign object
  • Method Details

    • getCd

      public double getCd()
      Get the discharge coefficient.
      Returns:
      discharge coefficient Cd
    • setCd

      public void setCd(double Cd)
      Set the discharge coefficient.
      Parameters:
      Cd - discharge coefficient (typically 0.6-0.95)
    • 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
      Overrides:
      calcKv in class ControlValveSizing
      Parameters:
      percentOpening - valve opening percentage (0-100)
      Returns:
      the calculated Kv value
    • calculateFlowRateFromValveOpening

      public double calculateFlowRateFromValveOpening(double Kv, double valveOpening, StreamInterface inletStream, StreamInterface outletStream)
      Calculates the flow rate through a control valve based on the valve opening, Kv, and inlet/outlet streams.
      Parameters:
      Kv - Flow coefficient (for 100% opening)
      valveOpening - Opening fraction of the valve (0.0 - 1.0)
      inletStream - Inlet stream to the valve
      outletStream - Outlet stream from the valve
      Returns:
      Calculated flow rate in m³/s
    • calculateMolarFlow

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

      calculateMolarFlow.

      Calculates flow rate from valve Kv using IEC 60534 formulas.

      Overrides:
      calculateMolarFlow in class ControlValveSizing
      Parameters:
      KvAdjusted - 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 Kv, double valveOpening, StreamInterface inletStream, StreamInterface outletStream)
      Calculates the required valve opening percentage for a given flow rate.

      This method inverts the flow calculation to determine what valve opening percentage is needed to achieve the specified flow rate Q, given the valve's Kv and the inlet/outlet conditions.

      Parameters:
      Q - Desired volumetric flow rate [m³/s]
      Kv - Flow coefficient at 100% opening
      valveOpening - Current valve opening percentage (not used in calculation)
      inletStream - Inlet stream to the valve
      outletStream - Outlet stream from the valve
      Returns:
      Required valve opening percentage (0-100)
    • findOutletPressureForFixedKv

      public double findOutletPressureForFixedKv(double Kv, double valveOpening, StreamInterface inletStream)
      Finds the outlet pressure for a given Kv, valve opening, and inlet stream.
      Parameters:
      Kv - Flow coefficient (for 100% opening)
      valveOpening - Opening fraction of the valve (0.0 - 1.0)
      inletStream - Inlet stream to the valve
      Returns:
      Outlet pressure (unit Pa)
    • 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.

      Overrides:
      calculateOutletPressure in class ControlValveSizing
      Parameters:
      KvAdjusted - the adjusted Kv (at current valve opening)
      inStream - inlet stream
      Returns:
      outlet pressure in Pa