Class RhonePoulencVelocity

java.lang.Object
neqsim.process.equipment.pipeline.RhonePoulencVelocity
All Implemented Interfaces:
Serializable

public class RhonePoulencVelocity extends Object implements Serializable
Rhone-Poulenc maximum velocity calculation for gas pipes.

The Rhone-Poulenc curves are empirical correlations widely used in the European oil and gas industry for determining maximum allowable gas velocities in pipes to prevent erosion and vibration. They relate maximum velocity to gas density through a power-law relationship.

The general correlation is:

$$V_{max} = C \cdot \rho^{-n}$$

where:

  • $V_{max}$ is the maximum allowable velocity in m/s
  • $\rho$ is the gas density in kg/m3
  • $C$ is the service-dependent constant
  • $n$ is the density exponent (nominally 0.44)

The class supports multiple service types with different velocity limits:

Service type parameters for Rhone-Poulenc velocity calculation
Service Type C Factor V_max upper (m/s) V_min lower (m/s)
Non-corrosive gas 60 60 3
Corrosive gas (CO2/H2S) 30 30 2

Alternatively, the class provides tabulated data points from the standard Rhone-Poulenc curves with log-log interpolation for higher accuracy.

Comparison with API RP 14E: The API RP 14E formula uses $V_e = C / \sqrt{\rho}$ (exponent = 0.5), while Rhone-Poulenc uses an exponent of approximately 0.44, giving a less aggressive velocity reduction at higher densities.

Version:
1.0
Author:
Even Solbraa
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serialization version UID.
      See Also:
    • TABLE_DENSITY_NON_CORROSIVE

      private static final double[] TABLE_DENSITY_NON_CORROSIVE
      Tabulated gas density values (kg/m3) from the standard Rhone-Poulenc curve for non-corrosive gas service. Used for log-log interpolation.
    • TABLE_VELOCITY_NON_CORROSIVE

      private static final double[] TABLE_VELOCITY_NON_CORROSIVE
      Tabulated maximum velocity values (m/s) corresponding to the density points for non-corrosive gas service. Used for log-log interpolation.
    • TABLE_DENSITY_CORROSIVE

      private static final double[] TABLE_DENSITY_CORROSIVE
      Tabulated gas density values (kg/m3) from the standard Rhone-Poulenc curve for corrosive gas service. Used for log-log interpolation.
    • TABLE_VELOCITY_CORROSIVE

      private static final double[] TABLE_VELOCITY_CORROSIVE
      Tabulated maximum velocity values (m/s) corresponding to the density points for corrosive gas service. Used for log-log interpolation.
    • serviceType

      private RhonePoulencVelocity.ServiceType serviceType
      The selected service type.
    • useInterpolation

      private boolean useInterpolation
      Whether to use tabulated data with log-log interpolation (true) or power-law formula.
    • customCFactor

      private double customCFactor
      Optional custom C-factor (overrides service type default if positive).
    • customExponent

      private double customExponent
      Optional custom exponent (overrides service type default if positive).
  • Constructor Details

    • RhonePoulencVelocity

      public RhonePoulencVelocity()
      Construct a RhonePoulencVelocity calculator with default non-corrosive gas settings.
    • RhonePoulencVelocity

      public RhonePoulencVelocity(RhonePoulencVelocity.ServiceType serviceType)
      Construct a RhonePoulencVelocity calculator with the specified service type.
      Parameters:
      serviceType - the gas service type determining velocity limits
  • Method Details

    • getMaxVelocity

      public double getMaxVelocity(double gasDensity)
      Calculate the maximum allowable gas velocity using the Rhone-Poulenc power-law formula.

      The formula is: $V_{max} = C \cdot \rho^{-n}$, bounded by upper and lower velocity limits.

      Parameters:
      gasDensity - gas density in kg/m3 (must be positive)
      Returns:
      maximum allowable velocity in m/s
      Throws:
      IllegalArgumentException - if gasDensity is not positive
    • getMaxVelocityInterpolated

      public double getMaxVelocityInterpolated(double gasDensity)
      Calculate the maximum allowable gas velocity using log-log interpolation of tabulated Rhone-Poulenc curve data points.

      This method provides higher accuracy than the power-law approximation by interpolating between standard data points from the published Rhone-Poulenc curves.

      Parameters:
      gasDensity - gas density in kg/m3 (must be positive)
      Returns:
      maximum allowable velocity in m/s
      Throws:
      IllegalArgumentException - if gasDensity is not positive
    • logLogInterpolate

      private double logLogInterpolate(double[] xTable, double[] yTable, double x)
      Perform log-log interpolation between tabulated data points.

      If the input value is outside the table range, log-log extrapolation is used based on the nearest two data points, bounded by the service type velocity limits.

      Parameters:
      xTable - array of x values (must be sorted ascending)
      yTable - array of corresponding y values
      x - the x value to interpolate at
      Returns:
      interpolated y value
    • getMaxVelocityNonCorrosive

      public static double getMaxVelocityNonCorrosive(double gasDensity)
      Static convenience method to calculate Rhone-Poulenc maximum velocity for non-corrosive gas service using the power-law formula.
      Parameters:
      gasDensity - gas density in kg/m3
      Returns:
      maximum allowable velocity in m/s
    • getMaxVelocityCorrosive

      public static double getMaxVelocityCorrosive(double gasDensity)
      Static convenience method to calculate Rhone-Poulenc maximum velocity for corrosive gas service using the power-law formula.
      Parameters:
      gasDensity - gas density in kg/m3
      Returns:
      maximum allowable velocity in m/s
    • getServiceType

      public RhonePoulencVelocity.ServiceType getServiceType()
      Get the service type.
      Returns:
      the configured service type
    • setServiceType

      public void setServiceType(RhonePoulencVelocity.ServiceType serviceType)
      Set the service type.
      Parameters:
      serviceType - the service type to use
    • isUseInterpolation

      public boolean isUseInterpolation()
      Check whether tabulated interpolation is enabled.
      Returns:
      true if using log-log interpolation of tabulated data
    • setUseInterpolation

      public void setUseInterpolation(boolean useInterpolation)
      Set whether to use tabulated interpolation or power-law formula.
      Parameters:
      useInterpolation - true to use log-log interpolation, false for power-law formula
    • setCustomCFactor

      public void setCustomCFactor(double cFactor)
      Set a custom C-factor that overrides the service type default.
      Parameters:
      cFactor - custom C-factor (use negative value to revert to service type default)
    • getEffectiveCFactor

      public double getEffectiveCFactor()
      Get the currently effective C-factor.
      Returns:
      the C-factor in use (custom if set, otherwise service type default)
    • setCustomExponent

      public void setCustomExponent(double exponent)
      Set a custom density exponent that overrides the service type default.
      Parameters:
      exponent - custom exponent (use negative value to revert to service type default)
    • getEffectiveExponent

      public double getEffectiveExponent()
      Get the currently effective density exponent.
      Returns:
      the exponent in use (custom if set, otherwise service type default)
    • getDescription

      public String getDescription()
      Get description of the Rhone-Poulenc velocity method and its current parameters.
      Returns:
      descriptive string including service type, C-factor, and exponent