'''
This module provides classes and functions for upheaval buckling calculations
for subsea pipelines.
**Features:**
- The `PropType` class calculates the properties of natural prop-type imperfections.
- All calculations are vectorized using NumPy for efficiency.
.. raw:: html
<hr style="height:6px; background-color:#888; border:none; margin:1.5em 0;" />
'''
import numpy as np
[docs]
class PropType: # pylint: disable=too-many-instance-attributes, too-many-arguments
"""
Class for calculating the properties of natural prop-type imperfections.
Parameters
----------
bending_stiffness : float or array-like, optional
Bending stiffness for the condition of interest.
submerged_weight : float or array-like, optional
Submerged weight for the condition of interest.
propped_shape_height: float or array-like, optional
Imperfection height for the condition of interest.
euler_wave_number : int, optional
Euler wave number for the condition of interest. Default is 1 (first wave).
Common values are pinned-pinned: m=1,2,3,...; fixed-fixed: m=2,3,4,...;
"""
def __init__(
self,
*,
bending_stiffness=0.0,
submerged_weight=0.0,
propped_shape_height=0.0,
euler_wave_number=1
):
"""
Initialize with bending stiffness, submerged weight, and imperfection height.
"""
self.bending_stiffness = np.asarray(bending_stiffness, dtype = float)
self.submerged_weight = np.asarray(submerged_weight, dtype = float)
self.propped_shape_height = np.asarray(propped_shape_height, dtype = float)
self.euler_wave_number = np.asarray(euler_wave_number, dtype = float)
[docs]
def propped_type_length(self):
"""
Compute natural prop-type imperfection length.
Returns
-------
length : np.ndarray
Natural prop-type imperfection length.
Examples
--------
>>> prop = PropType(
... bending_stiffness=[18272109.437121, 37864772.21769765],
... submerged_weight=[695.39794758, 1029.76124826],
... propped_shape_height=[0.5, 0.5]
... )
>>> prop.propped_type_length()
array([62.372..., 67.839...])
"""
length = 2.0 * (
72.0 * self.bending_stiffness * self.propped_shape_height / self.submerged_weight
) ** 0.25
return length
[docs]
def propped_shape_buckling_force(self):
"""
Compute propped shape buckling force.
The equation used is:
``P = 4 * (EI * Ws / h)^(1/2)``
where:
- ``P`` is the propped-shape buckling force,
- ``EI`` is the bending stiffness,
- ``Ws`` is the submerged weight, and
- ``h`` is the propped-shape imperfection height.
Returns
-------
propped_shape_buckling_force : np.ndarray
Propped shape lateral buckling force.
Examples
--------
>>> prop = PropType(
... bending_stiffness=[18272109.437121, 37864772.21769765],
... submerged_weight=[695.39794758, 1029.76124826],
... propped_shape_height=[0.5, 0.5]
... )
>>> prop.propped_shape_buckling_force()
array([ 637655.3903..., 1117019.9655...])
"""
return (
4.0
* (self.bending_stiffness * self.submerged_weight / self.propped_shape_height) ** 0.5
)
[docs]
def euler_buckling_force(self):
"""
Compute Euler buckling force using wave-number index ``m``.
The expression used is:
``Pm = m^2 * pi^2 * EI / L^2``
where ``L`` is the natural prop-type imperfection length from
:meth:`propped_type_length` and ``m`` is taken from ``euler_wave_number``.
Common values of ``m`` by boundary condition are:
- pinned-pinned: ``m = 1, 2, 3, ...``
- fixed-fixed: ``m = 2, 2.861, 3, 4, ...``
Returns
-------
euler_buckling_force : np.ndarray
Euler critical buckling force, ``Pm``.
Examples
--------
>>> prop = PropType(
... bending_stiffness=[18272109.4, 18272109.4, 37864772.2, 37864772.2],
... submerged_weight=[695.4, 695.4, 1029.8, 1029.8],
... propped_shape_height=[0.5, 0.5, 0.5, 0.5],
... euler_wave_number=[1, 2, 1, 2],
... )
>>> np.round(prop.euler_buckling_force(), 4)
array([ 46355.3848, 185421.5391, 81204.9721, 324819.8885])
"""
length = self.propped_type_length()
return (
self.euler_wave_number ** 2
* (np.pi ** 2 * self.bending_stiffness)
/ (length) ** 2
)