Linepipe Tools#

Pipe Class#

class pysubsea.linepipe_tools.Pipe(*, outer_diameter=0.0, wall_thickness=0.0, corrosion_allowance=0.0, coating_thicknesses=None, youngs_modulus=0.0, poisson_ratio=0.0, water_density=0.0, content_density=0.0, steel_density=0.0, coating_densities=None)[source]#

Bases: object

Class representing a pipeline section with geometric and material properties. Supports both scalar and array inputs for calculations.

Parameters:
  • outer_diameter (float or array-like, optional) – Outer diameter of the pipe. Default is 0.

  • wall_thickness (float or array-like, optional) – Wall thickness of the pipe. Default is 0.

  • corrosion_allowance (float or array-like, optional) – Corrosion allowance. Default is 0.

  • coating_thicknesses (array-like, optional) – Radial thicknesses, either one value per pipe with shape (n_pipes,) or layer values with shape (n_pipes, n_layers), ordered from steel outward. Requires a scalar or one-dimensional outer diameter and one row per pipe for multi-layer input. Use zero thickness for absent layers. Omitted thicknesses represent an uncoated pipe.

  • youngs_modulus (float or array-like, optional) – Young’s modulus of the material. Default is 0.

  • poisson_ratio (float or array-like, optional) – Poisson’s ratio of the material. Default is 0.

  • water_density (float or array-like, optional) – Density of water. Default is 0.

  • steel_density (float or array-like, optional) – Density of steel. Default is 0.

  • content_density (float or array-like, optional) – Density of the pipe content. Default is 0.

  • coating_densities (array-like, optional) – Density per pipe with shape (n_pipes,), applied to every coating layer, or layer densities with shape (n_pipes, n_layers). A scalar applies to all pipes and layers; a column (n_pipes, 1) is also accepted. May be omitted for geometry-only calculations or zero-thickness coatings; required for weights when any coating thickness is positive.

Input Parameters#

Pipe.outer_diameter#

Outer diameter input for the pipe, supplied as a scalar or array-like value and stored as a NumPy array. Optional. Default value is 0.

Pipe.wall_thickness#

Steel wall thickness of the pipe, supplied as a scalar or array-like input and stored as a NumPy array. Optional. Default value is 0.

Pipe.corrosion_allowance#

Corrosion allowance input for the pipe, supplied as a scalar or array-like value and stored as a NumPy array. Optional. Default value is 0.

Pipe.coating_thicknesses#

Coating thickness input for the pipe, supplied as an array-like value and stored as a NumPy array. Multiple layers are ordered from steel outward; omitted values represent an uncoated pipe. Optional. Default value is an empty array.

Pipe.youngs_modulus#

Young’s modulus input for the pipe material, supplied as a scalar or array-like value and stored as a NumPy array. Optional. Default value is 0.

Pipe.poisson_ratio#

Poisson’s ratio input for the pipe material, supplied as a scalar or array-like value and stored as a NumPy array. Optional. Default value is 0.

Pipe.water_density#

Water density input, supplied as a scalar or array-like value and stored as a NumPy array. Optional. Default value is 0.

Pipe.content_density#

Pipe~content density input, supplied as a scalar or array-like value and stored as a NumPy array. Optional. Default value is 0.

Pipe.steel_density#

Steel density input, supplied as a scalar or array-like value and stored as a NumPy array. Optional. Default value is 0.

Pipe.coating_densities#

Coating density input, supplied as a scalar or array-like value and stored as a NumPy array when provided. Optional. Default value is 0.

Diameter Outputs#

Pipe.inner_diameter()[source]#

Calculate the pipe inner diameter.

Returns:

inner_diameter – Inner diameter of the pipe.

Return type:

np.ndarray

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> wall_thickness = [0.0127, 0.0159]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     wall_thickness=wall_thickness
... )
>>> pipe.inner_diameter()
array([0.2477, 0.2921])
Pipe.mid_diameter()[source]#

Calculate the pipe mid diameter.

Returns:

mid_diameter – Mid diameter of the pipe.

Return type:

np.ndarray

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> wall_thickness = [0.0127, 0.0159]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     wall_thickness=wall_thickness
... )
>>> pipe.mid_diameter()
array([0.2604, 0.308 ])
Pipe.total_outer_diameter()[source]#

Calculate the total outer diameter of steel and coating.

Returns:

total_outer_diameter – Total outer diameter of steel and coating.

Return type:

np.ndarray

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> coating_thicknesses = [
...     [0.0003, 0.0002, 0.006, 0.0120, 0.006],
...     [0.0003, 0.0002, 0.006, 0.0615, 0.006]
... ]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     coating_thicknesses=coating_thicknesses
... )
>>> pipe.total_outer_diameter()
array([0.3221, 0.4719])
Pipe.outer_diameter_to_wall_thickness_ratio()[source]#

Calculate the outer-diameter-to-wall-thickness ratio (D/t).

Returns:

outer_diameter_to_wall_thickness_ratio – Outer diameter divided by wall thickness.

Return type:

np.ndarray

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> wall_thickness = [0.0127, 0.0159]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     wall_thickness=wall_thickness
... )
>>> pipe.outer_diameter_to_wall_thickness_ratio()
array([21.50393701, 20.37106918])

Radius Ouputs#

Pipe.outer_radius()[source]#

Calculate the radius at the outer surface of the steel pipe wall.

Returns:

outer_radius – Outer radius of the steel pipe.

Return type:

np.ndarray

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> pipe = Pipe(outer_diameter=outer_diameter)
>>> pipe.outer_radius()
array([0.13655, 0.16195])
Pipe.mid_radius()[source]#

Calculate the radius at the middle of the pipe wall.

Returns:

mid_radius – Radius at the middle of the pipe wall.

Return type:

np.ndarray

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> wall_thickness = [0.0127, 0.0159]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     wall_thickness=wall_thickness
... )
>>> pipe.mid_radius()
array([0.1302, 0.154 ])
Pipe.inner_radius()[source]#

Calculate the radius at the inner surface of the pipe wall.

Returns:

inner_radius – Inner radius of the pipe.

Return type:

np.ndarray

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> wall_thickness = [0.0127, 0.0159]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     wall_thickness=wall_thickness
... )
>>> pipe.inner_radius()
array([0.12385, 0.14605])

Thickness Outputs#

Pipe.wall_thickness_corroded()[source]#

Calculate the corroded wall thickness.

Returns:

corroded_wall_thickness – Corroded wall thickness of the pipe.

Return type:

np.ndarray

Examples

>>> wall_thickness = [0.0127, 0.0159]
>>> corrosion_allowance = [0.003, 0.003]
>>> pipe = Pipe(
...     wall_thickness=wall_thickness,
...     corrosion_allowance=corrosion_allowance
... )
>>> pipe.wall_thickness_corroded()
array([0.0097, 0.0129])
Pipe.total_coating_thickness()[source]#

Calculate the combined radial coating thickness.

Returns:

total_coating_thickness – Sum of the layer thicknesses per pipe.

Return type:

np.ndarray

Examples

>>> coating_thicknesses = [
...     [0.0003, 0.0002, 0.006, 0.0120, 0.006],
...     [0.0003, 0.0002, 0.006, 0.0615, 0.006]
... ]
>>> pipe = Pipe(
...     coating_thicknesses=coating_thicknesses
... )
>>> pipe.total_coating_thickness()
array([0.0245, 0.074 ])
>>> Pipe(coating_thicknesses=[0.0032, 0.0032]).total_coating_thickness()
array([0.0032, 0.0032])

Cross-Section Outputs#

Pipe.inner_area()[source]#

Calculate the pipe inner area.

Returns:

inner_area – Inner area of the pipe.

Return type:

np.ndarray

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> wall_thickness = [0.0127, 0.0159]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     wall_thickness=wall_thickness
... )
>>> pipe.inner_area()
array([0.04818833, 0.06701206])
Pipe.outer_area()[source]#

Calculate the pipe outer area.

Returns:

outer_area – Outer area of the pipe.

Return type:

np.ndarray

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter
... )
>>> pipe.outer_area()
array([0.05857783, 0.08239707])
Pipe.steel_area()[source]#

Calculate the steel cross-sectional area.

Returns:

steel_area – Steel cross-sectional area.

Return type:

np.ndarray

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> wall_thickness = [0.0127, 0.0159]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     wall_thickness=wall_thickness
... )
>>> pipe.steel_area()
array([0.0103895 , 0.01538501])
Pipe.coating_areas()[source]#

Calculate the annular area of each coating layer.

Returns:

coating_areas – Areas ordered from steel outward, with a final layer axis.

Return type:

np.ndarray

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> coating_thicknesses = [
...     [0.0003, 0.0002, 0.006, 0.0120, 0.006],
...     [0.0003, 0.0002, 0.006, 0.0615, 0.006]
... ]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     coating_thicknesses=coating_thicknesses
... )
>>> pipe.coating_areas()
array([[0.00025767, 0.0001721 , 0.00527976, 0.01123811, 0.00595834],
       [0.00030555, 0.00020402, 0.00623732, 0.07697405, 0.00878201]])
>>> Pipe(outer_diameter=[1.0, 2.0], coating_thicknesses=[0.1, 0.2]).coating_areas().shape
(2,)
Pipe.total_coating_area()[source]#

Calculate the combined cross-sectional area of all coating layers.

Returns:

total_coating_area – Area between the coated and steel outer diameters per pipe.

Return type:

np.ndarray

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> coating_thicknesses = [
...     [0.0003, 0.0002, 0.006, 0.0120, 0.006],
...     [0.0003, 0.0002, 0.006, 0.0615, 0.006]
... ]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     coating_thicknesses=coating_thicknesses
... )
>>> pipe.total_coating_area()
array([0.02290598, 0.09250294])
Pipe.total_outer_area()[source]#

Calculate the outer area of steel and coating.

Returns:

total_outer_area – Outer area of steel and coating.

Return type:

np.ndarray

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> coating_thicknesses = [
...     [0.0003, 0.0002, 0.006, 0.0120, 0.006],
...     [0.0003, 0.0002, 0.006, 0.0615, 0.006]
... ]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     coating_thicknesses=coating_thicknesses
... )
>>> pipe.total_outer_area()
array([0.08148381, 0.17490001])

Moment of Inertia Outputs#

Pipe.area_moment_inertia()[source]#

Calculate the area moment inertia.

Returns:

area_moment_inertia – Area moment inertia.

Return type:

np.ndarray

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> wall_thickness = [0.0127, 0.0159]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     wall_thickness=wall_thickness
... )
>>> pipe.area_moment_inertia()
array([8.82710601e-05, 1.82921605e-04])
Pipe.polar_moment_inertia()[source]#

Calculate the polar moment of inertia of the pipe cross-section.

Returns:

polar_moment_inertia – Polar moment of inertia of the pipe cross-section.

Return type:

np.ndarray

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> wall_thickness = [0.0127, 0.0159]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     wall_thickness=wall_thickness
... )
>>> pipe.polar_moment_inertia()
array([0.00017654, 0.00036584])

Section Modulus Outputs#

Pipe.section_modulus()[source]#

Calculate the section modulus of the steel pipe about its mid-wall diameter.

Returns:

section_modulus – Elastic section modulus of the pipe.

Return type:

np.ndarray

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> wall_thickness = [0.0127, 0.0159]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     wall_thickness=wall_thickness
... )
>>> pipe.section_modulus()
array([0.000677..., 0.001187...])

Material Property Outputs#

Pipe.shear_modulus()[source]#

Calculate the shear modulus assuming an isotropic material.

Returns:

shear_modulus – Shear modulus of the material.

Return type:

np.ndarray

Examples

>>> youngs_modulus = [207.0e+09, 207.0e+09]
>>> poisson_ratio = [0.3, 0.3]
>>> pipe = Pipe(
...     youngs_modulus=youngs_modulus,
...     poisson_ratio=poisson_ratio
... )
>>> pipe.shear_modulus()
array([7.96153846e+10, 7.96153846e+10])

Density Outputs#

Pipe.equivalent_coating_density()[source]#

Calculate the area-weighted equivalent density of the coating.

Returns:

equivalent_coating_density – Sum of density times layer area divided by total coating area. A scalar pipe returns a scalar; pipe arrays return one value per pipe.

Return type:

np.ndarray or np.float64

Raises:

ValueError – If any pipe has zero coating area, or densities are missing, non-finite, negative, or incompatible with the coating shape.

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> coating_thicknesses = [
...     [0.0003, 0.0002, 0.006, 0.0120, 0.006],
...     [0.0003, 0.0002, 0.006, 0.0615, 0.006]
... ]
>>> coating_densities = [
...     [1500, 900, 900, 650, 900],
...     [1500, 900, 900, 650, 900]
... ]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     coating_thicknesses=coating_thicknesses,
...     coating_densities=coating_densities
... )
>>> pipe.equivalent_coating_density()
array([784.09479921, 693.95053762])
>>> Pipe(
...     outer_diameter=[1.0, 2.0],
...     coating_thicknesses=[[0.1, 0.2], [0.2, 0.3]],
...     coating_densities=[1000.0, 1200.0],
... ).equivalent_coating_density()
array([1000., 1200.])

Stiffness Outputs#

Pipe.axial_stiffness()[source]#

Calculate the axial stiffness.

Returns:

axial_stiffness – Axial stiffness of the pipe.

Return type:

np.ndarray

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> wall_thickness = [0.0127, 0.0159]
>>> youngs_modulus = [207.0e+09, 207.0e+09]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     wall_thickness=wall_thickness,
...     youngs_modulus=youngs_modulus
... )
>>> pipe.axial_stiffness()
array([2.15062613e+09, 3.18469656e+09])
Pipe.bending_stiffness()[source]#

Calculate the bending stiffness.

Returns:

bending_stiffness – Bending stiffness.

Return type:

np.ndarray

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> wall_thickness = [0.0127, 0.0159]
>>> youngs_modulus = [207.0e+09, 207.0e+09]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     wall_thickness=wall_thickness,
...     youngs_modulus=youngs_modulus
... )
>>> pipe.bending_stiffness()
array([18272109.437121..., 37864772.21769765])
Pipe.torsional_stiffness()[source]#

Calculate the torsional stiffness of the pipe.

Returns:

torsional_stiffness – Torsional stiffness of the pipe.

Return type:

np.ndarray

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> wall_thickness = [0.0127, 0.0159]
>>> youngs_modulus = [207.0e+09, 207.0e+09]
>>> poisson_ratio = [0.3, 0.3]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     wall_thickness=wall_thickness,
...     youngs_modulus=youngs_modulus,
...     poisson_ratio=poisson_ratio
... )
>>> pipe.torsional_stiffness()
array([14055468.79778538, 29126747.85976743])

Weight Outputs#

Pipe.steel_weight()[source]#

Calculate the steel weight per unit length.

Returns:

steel_weight – Steel weight per unit length.

Return type:

np.ndarray

Examples

>>> pipe = Pipe(
...     outer_diameter=[0.2731, 0.3239],
...     wall_thickness=[0.0127, 0.0159],
...     steel_density=[7850.0, 7850.0]
... )
>>> pipe.steel_weight()
array([ 799.83500198, 1184.41403646])
Pipe.coating_weights()[source]#

Calculate each coating layer’s weight per unit length.

Returns:

coating_weights – Weights with the same shape as coating_areas().

Return type:

np.ndarray

Raises:

ValueError – If positive coating thicknesses were supplied without densities, or densities are non-finite, negative, or incompatible.

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> coating_thicknesses = [
...     [0.0003, 0.0002, 0.006, 0.0120, 0.006],
...     [0.0003, 0.0002, 0.006, 0.0615, 0.006]
... ]
>>> coating_densities = [
...     [1500, 900, 900, 650, 900],
...     [1500, 900, 900, 650, 900]
... ]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     coating_thicknesses=coating_thicknesses,
...     coating_densities=coating_densities
... )
>>> pipe.coating_weights()
array([[  3.79050498,   1.51897486,  46.6007511 ,  71.63786376,
         52.59013718],
       [  4.49481242,   1.80069783,  55.05244034, 490.67490851,
         77.51263813]])
>>> Pipe(
...     outer_diameter=[1.0, 2.0],
...     coating_thicknesses=[[0.1, 0.2], [0.2, 0.3]],
...     coating_densities=[1000.0, 1200.0],
... ).coating_weights().shape
(2, 2)
Pipe.total_coating_weight()[source]#

Calculate the coating weight per unit length.

Returns:

total_coating_weight – Coating weight per unit length.

Return type:

np.ndarray

Raises:

ValueError – If positive coating thicknesses were supplied without densities, or densities are non-finite, negative, or incompatible.

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> coating_thicknesses = [
...     [0.0003, 0.0002, 0.006, 0.0120, 0.006],
...     [0.0003, 0.0002, 0.006, 0.0615, 0.006]
... ]
>>> coating_densities = [
...     [1500, 900, 900, 650, 900],
...     [1500, 900, 900, 650, 900]
... ]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     coating_thicknesses=coating_thicknesses,
...     coating_densities=coating_densities
... )
>>> pipe.total_coating_weight()
array([176.13823189, 629.53549723])
Pipe.content_weight()[source]#

Calculate the pipe-content weight per unit length.

Returns:

content_weight – Pipe-content weight per unit length.

Return type:

np.ndarray

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> wall_thickness = [0.0127, 0.0159]
>>> content_density = [1025.0, 1025.0]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     wall_thickness=wall_thickness,
...     content_density=content_density
... )
>>> pipe.content_weight()
array([484.39754703, 673.61699555])
Pipe.water_displaced_weight()[source]#

Calculate the weight of displaced water per unit length.

Returns:

water_displaced_weight – Displaced-water weight per unit length.

Return type:

np.ndarray

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> coating_thicknesses = [
...     [0.0003, 0.0002, 0.006, 0.0120, 0.006],
...     [0.0003, 0.0002, 0.006, 0.0615, 0.006]
... ]
>>> water_density = [1025.0, 1025.0]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     coating_thicknesses=coating_thicknesses,
...     water_density=water_density
... )
>>> pipe.water_displaced_weight()
array([ 819.08952452, 1758.12551508])
Pipe.submerged_weight()[source]#

Calculate the submerged weight per unit length.

Returns:

submerged_weight – Submerged weight per unit length.

Return type:

np.ndarray

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> wall_thickness = [0.0127, 0.0159]
>>> coating_thicknesses = [
...     [0.0003, 0.0002, 0.006, 0.0120, 0.006],
...     [0.0003, 0.0002, 0.006, 0.0615, 0.006]
... ]
>>> water_density = [1025.0, 1025.0]
>>> steel_density = [7850.0, 7850.0]
>>> content_density = [1025.0, 1025.0]
>>> coating_densities = [
...     [1500, 900, 900, 650, 900],
...     [1500, 900, 900, 650, 900]
... ]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     wall_thickness=wall_thickness,
...     coating_thicknesses=coating_thicknesses,
...     water_density=water_density,
...     steel_density=steel_density,
...     content_density=content_density,
...     coating_densities=coating_densities,
... )
>>> pipe.submerged_weight()
array([641.28125638, 729.44101417])

Mass Outputs#

Pipe.mass()[source]#

Calculate total mass per unit length.

Includes steel, coatings, and contents, but not hydrodynamic added mass.

Returns:

mass – Mass per unit length.

Return type:

np.ndarray or np.float64

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> wall_thickness = [0.0127, 0.0159]
>>> coating_thicknesses = [
...     [0.0003, 0.0002, 0.006, 0.0120, 0.006],
...     [0.0003, 0.0002, 0.006, 0.0615, 0.006]
... ]
>>> steel_density = [7850.0, 7850.0]
>>> content_density = [1025.0, 1025.0]
>>> coating_densities = [
...     [1500, 900, 900, 650, 900],
...     [1500, 900, 900, 650, 900]
... ]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     wall_thickness=wall_thickness,
...     coating_thicknesses=coating_thicknesses,
...     steel_density=steel_density,
...     content_density=content_density,
...     coating_densities=coating_densities,
... )
>>> pipe.mass()
array([148.91106158, 253.65213921])
Pipe.specific_mass()[source]#

Calculate total mass per unit length divided by total outer area.

Includes steel, coatings, and contents, but not hydrodynamic added mass.

Returns:

specific_mass – Equivalent density.

Return type:

np.ndarray or np.float64

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> wall_thickness = [0.0127, 0.0159]
>>> coating_thicknesses = [
...     [0.0003, 0.0002, 0.006, 0.0120, 0.006],
...     [0.0003, 0.0002, 0.006, 0.0615, 0.006]
... ]
>>> steel_density = [7850.0, 7850.0]
>>> content_density = [1025.0, 1025.0]
>>> coating_densities = [
...     [1500, 900, 900, 650, 900],
...     [1500, 900, 900, 650, 900]
... ]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     wall_thickness=wall_thickness,
...     coating_thicknesses=coating_thicknesses,
...     steel_density=steel_density,
...     content_density=content_density,
...     coating_densities=coating_densities,
... )
>>> pipe.specific_mass()
array([1827.49260687, 1450.26943219])
Pipe.specific_mass_ratio()[source]#

Calculate specific mass divided by water density.

Includes steel, coatings, and contents, but not hydrodynamic added mass. Equivalent to pipe mass divided by displaced-water mass per unit length.

Returns:

specific_mass_ratio – Dimensionless mass ratio, one value per pipe.

Return type:

np.ndarray or np.float64

Examples

>>> outer_diameter = [0.2731, 0.3239]
>>> wall_thickness = [0.0127, 0.0159]
>>> coating_thicknesses = [
...     [0.0003, 0.0002, 0.006, 0.0120, 0.006],
...     [0.0003, 0.0002, 0.006, 0.0615, 0.006]
... ]
>>> water_density = [1025.0, 1025.0]
>>> steel_density = [7850.0, 7850.0]
>>> content_density = [1025.0, 1025.0]
>>> coating_densities = [
...     [1500, 900, 900, 650, 900],
...     [1500, 900, 900, 650, 900]
... ]
>>> pipe = Pipe(
...     outer_diameter=outer_diameter,
...     wall_thickness=wall_thickness,
...     coating_thicknesses=coating_thicknesses,
...     water_density=water_density,
...     steel_density=steel_density,
...     content_density=content_density,
...     coating_densities=coating_densities,
... )
>>> pipe.specific_mass_ratio()
array([1.78291962, 1.41489701])