Limit State Tools#
Material Strength Class#
- class pysubsea.limit_state_tools.MaterialStrength(*, outer_diameter=0.0, corroded_wall_thickness=0.0, material=None, smys=0.0, smts=0.0, temperature=0.0, material_strength_factor=0.0)[source]#
Bases:
objectBase class for DNV pipeline limit state calculations. Provides methods for temperature derating, yield and tensile strength, and characteristic material burst strength, supporting both scalar and array-based inputs.
- Parameters:
outer_diameter (float or array-like, optional) – The outer diameter of the pipeline.
corroded_wall_thickness (float or array-like, optional) – The corroded wall thickness of the pipeline.
material (float or array-like, optional) – Material types: 1 for ‘CMn’ or ‘13CR’, 2 for ‘22Cr’ or ‘25CR’.
smys (float or array-like, optional) – Specified minimum yield strengths.
smts (float or array-like, optional) – Specified minimum tensile strengths.
temperature (float or array-like, optional) – Temperatures for calculations.
material_strength_factor (float or array-like, optional) – Material strength factor.
Notes
All calculations are vectorized using NumPy for efficiency and flexibility.
Input Parameters#
- MaterialStrength.outer_diameter#
Outer diameter input for the pipe, supplied as a scalar or array-like value and stored as a NumPy array.
- MaterialStrength.corroded_wall_thickness#
Corroded wall thickness input, supplied as a scalar or array-like value and stored as a NumPy array.
- MaterialStrength.temperature#
Temperature input, supplied as a scalar or array-like value and stored as a NumPy array.
- MaterialStrength.material#
Material type input. Values identify the supported material groups and are stored as a NumPy array. Material types: 1 for ‘CMn’ or ‘13CR’, 2 for ‘22Cr’ or ‘25CR’.
- MaterialStrength.material_strength_factor#
Material strength factor input, supplied as a scalar or array-like value and stored as a NumPy array.
- MaterialStrength.smys#
Specified minimum yield strength input, supplied as a scalar or array-like value and stored as a NumPy array.
- MaterialStrength.smts#
Specified minimum tensile strength input, supplied as a scalar or array-like value and stored as a NumPy array.
Material Property Outputs#
- MaterialStrength.yield_stress()[source]#
Calculate the yield stress of a material.
- Returns:
yield_stress – The yield stress values of the materials at the given temperatures and strength factor.
- Return type:
np.ndarray
Examples
>>> materials = np.array([1, 1, 2, 2]) >>> smys = np.array([450.0E+06, 450.0E+06, 550.0E+06, 550.0E+06]) >>> temperatures = np.array([80.0, 110.0, 80.0, 110.0]) >>> material_strength_factor = np.array([0.96, 0.96, 0.96, 0.96]) >>> dnv = MaterialStrength( ... material=materials, ... smys=smys, ... temperature=temperatures, ... material_strength_factor=material_strength_factor ... ) >>> dnv.yield_stress() array([4.1472e+08, 3.9936e+08, 4.6080e+08, 4.3680e+08])
- MaterialStrength.tensile_strength()[source]#
Calculate the tensile strength of a material.
- Returns:
tensile_strength – The tensile strength values of the materials at the given temperatures and strength factor.
- Return type:
np.ndarray
Examples
>>> materials = np.array([1, 1, 2, 2]) >>> smts = np.array([485.0E+06, 485.0E+06, 590.0E+06, 590.0E+06]) >>> temperatures = np.array([80.0, 110.0, 80.0, 110.0]) >>> material_strength_factor = np.array([0.96, 0.96, 0.96, 0.96]) >>> dnv = MaterialStrength( ... material=materials, ... smts=smts, ... temperature=temperatures, ... material_strength_factor=material_strength_factor ... ) >>> dnv.tensile_strength() array([4.4832e+08, 4.3296e+08, 4.9920e+08, 4.7520e+08])
- MaterialStrength.temperature_derating_stress()[source]#
Calculate the temperature derating stress of a material.
- Returns:
temperature_derated_stress – The derating stress values for the given materials and temperatures.
- Return type:
np.ndarray
- Raises:
ValueError – If a material is not supported.
Examples
>>> materials = np.array([1, 1, 2, 2]) >>> temperatures = np.array([80.0, 110.0, 80.0, 110.0]) >>> dnv = MaterialStrength( ... material=materials, ... temperature=temperatures ... ) >>> dnv.temperature_derating_stress() array([18000000., 34000000., 70000000., 95000000.])
Burst Strength Outputs#
- MaterialStrength.characteristic_material_burst_strength()[source]#
Calculate the characteristic material burst strength.
- Returns:
characteristic_burst_strength – The characteristic material burst strength values at the given temperatures and strength factor.
- Return type:
np.ndarray
Examples
>>> materials = np.array([1, 1, 2, 2]) >>> smys = np.array([450.0E+06, 450.0E+06, 550.0E+06, 550.0E+06]) >>> smts = np.array([600.0E+06, 600.0E+06, 700.0E+06, 700.0E+06]) >>> temperatures = np.array([80.0, 110.0, 80.0, 110.0]) >>> material_strength_factor = np.array([0.96, 0.96, 0.96, 0.96]) >>> dnv = MaterialStrength( ... material=materials, ... smys=smys, ... smts=smts, ... temperature=temperatures, ... material_strength_factor=material_strength_factor ... ) >>> dnv.characteristic_material_burst_strength() array([4.1472e+08, 3.9936e+08, 4.6080e+08, 4.3680e+08])
Limit States Class#
- class pysubsea.limit_state_tools.LimitStates(*, outer_diameter=0.0, corroded_wall_thickness=0.0, material=None, smys=0.0, smts=0.0, temperature=0.0, material_strength_factor=0.0)[source]#
Bases:
MaterialStrengthClass for DNV pipeline burst pressure limit state calculations.
Extends MaterialStrength to provide burst pressure calculations for corroded pipelines according to DNV standards, using material, geometric, and strength properties.
- Parameters:
outer_diameter (float or array-like, optional) – The outer diameter of the pipeline.
corroded_wall_thickness (float or array-like, optional) – The corroded wall thickness of the pipeline.
material (float or array-like, optional) – Material types: 1 for ‘CMn’ or ‘13CR’, 2 for ‘22Cr’ or ‘25CR’.
smys (float or array-like, optional) – Specified minimum yield strengths.
smts (float or array-like, optional) – Specified minimum tensile strengths.
temperature (float or array-like, optional) – Temperatures for calculations.
material_strength_factor (float or array-like, optional) – Material strength factor.
Notes
All parameters are passed to the parent class MaterialStrength.
Input Parameters#
- LimitStates.outer_diameter#
Outer diameter input for the pipe, supplied as a scalar or array-like value and stored as a NumPy array.
- LimitStates.corroded_wall_thickness#
Corroded wall thickness input, supplied as a scalar or array-like value and stored as a NumPy array.
- LimitStates.temperature#
Temperature input, supplied as a scalar or array-like value and stored as a NumPy array.
- LimitStates.material#
Material type input. Values identify the supported material groups and are stored as a NumPy array. Material types: 1 for ‘CMn’ or ‘13CR’, 2 for ‘22Cr’ or ‘25CR’.
- LimitStates.material_strength_factor#
Material strength factor input, supplied as a scalar or array-like value and stored as a NumPy array.
- LimitStates.smys#
Specified minimum yield strength input, supplied as a scalar or array-like value and stored as a NumPy array.
- LimitStates.smts#
Specified minimum tensile strength input, supplied as a scalar or array-like value and stored as a NumPy array.
Burst Pressure Outputs#
- LimitStates.burst_pressure()[source]#
Calculate the burst pressure of a pipeline.
- Returns:
burst_pressure – The burst pressure values of the pipeline.
- Return type:
np.ndarray
- Raises:
ValueError – If a material is not supported.
Examples
>>> outer_diameter = np.array([0.2731, 0.3239, 0.2731, 0.3239]) >>> corroded_wall_thickness = np.array([0.0097, 0.0129, 0.0097, 0.0129]) >>> materials = np.array([1, 1, 2, 2]) >>> smys = np.array([450.0E+06, 450.0E+06, 550.0E+06, 550.0E+06]) >>> smts = np.array([600.0E+06, 600.0E+06, 700.0E+06, 700.0E+06]) >>> temperatures = np.array([80.0, 110.0, 80.0, 110.0]) >>> material_strength_factor = np.array([0.96, 0.96, 0.96, 0.96]) >>> dnv = LimitStates( ... outer_diameter=outer_diameter, ... corroded_wall_thickness=corroded_wall_thickness, ... material=materials, ... smys=smys, ... smts=smts, ... temperature=temperatures, ... material_strength_factor=material_strength_factor ... ) >>> dnv.burst_pressure() array([35270393.70222808, 38255444.18258572, 39189326.33580898, 41841892.07470313])