Class RhonePoulencVelocity
- All Implemented Interfaces:
Serializable
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 | 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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumService type for Rhone-Poulenc velocity calculation. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleOptional custom C-factor (overrides service type default if positive).private doubleOptional custom exponent (overrides service type default if positive).private static final longSerialization version UID.private RhonePoulencVelocity.ServiceTypeThe selected service type.private static final double[]Tabulated gas density values (kg/m3) from the standard Rhone-Poulenc curve for corrosive gas service.private static final double[]Tabulated gas density values (kg/m3) from the standard Rhone-Poulenc curve for non-corrosive gas service.private static final double[]Tabulated maximum velocity values (m/s) corresponding to the density points for corrosive gas service.private static final double[]Tabulated maximum velocity values (m/s) corresponding to the density points for non-corrosive gas service.private booleanWhether to use tabulated data with log-log interpolation (true) or power-law formula. -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a RhonePoulencVelocity calculator with default non-corrosive gas settings.RhonePoulencVelocity(RhonePoulencVelocity.ServiceType serviceType) Construct a RhonePoulencVelocity calculator with the specified service type. -
Method Summary
Modifier and TypeMethodDescriptionGet description of the Rhone-Poulenc velocity method and its current parameters.doubleGet the currently effective C-factor.doubleGet the currently effective density exponent.doublegetMaxVelocity(double gasDensity) Calculate the maximum allowable gas velocity using the Rhone-Poulenc power-law formula.static doublegetMaxVelocityCorrosive(double gasDensity) Static convenience method to calculate Rhone-Poulenc maximum velocity for corrosive gas service using the power-law formula.doublegetMaxVelocityInterpolated(double gasDensity) Calculate the maximum allowable gas velocity using log-log interpolation of tabulated Rhone-Poulenc curve data points.static doublegetMaxVelocityNonCorrosive(double gasDensity) Static convenience method to calculate Rhone-Poulenc maximum velocity for non-corrosive gas service using the power-law formula.Get the service type.booleanCheck whether tabulated interpolation is enabled.private doublelogLogInterpolate(double[] xTable, double[] yTable, double x) Perform log-log interpolation between tabulated data points.voidsetCustomCFactor(double cFactor) Set a custom C-factor that overrides the service type default.voidsetCustomExponent(double exponent) Set a custom density exponent that overrides the service type default.voidsetServiceType(RhonePoulencVelocity.ServiceType serviceType) Set the service type.voidsetUseInterpolation(boolean useInterpolation) Set whether to use tabulated interpolation or power-law formula.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
TABLE_DENSITY_NON_CORROSIVE
private static final double[] TABLE_DENSITY_NON_CORROSIVETabulated 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_CORROSIVETabulated 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_CORROSIVETabulated 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_CORROSIVETabulated maximum velocity values (m/s) corresponding to the density points for corrosive gas service. Used for log-log interpolation. -
serviceType
The selected service type. -
useInterpolation
private boolean useInterpolationWhether to use tabulated data with log-log interpolation (true) or power-law formula. -
customCFactor
private double customCFactorOptional custom C-factor (overrides service type default if positive). -
customExponent
private double customExponentOptional custom exponent (overrides service type default if positive).
-
-
Constructor Details
-
RhonePoulencVelocity
public RhonePoulencVelocity()Construct a RhonePoulencVelocity calculator with default non-corrosive gas settings. -
RhonePoulencVelocity
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 valuesx- 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
Get the service type.- Returns:
- the configured service type
-
setServiceType
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
Get description of the Rhone-Poulenc velocity method and its current parameters.- Returns:
- descriptive string including service type, C-factor, and exponent
-