cylinder#

class py_fatigue.geometry.cylinder.HollowCylinder(initial_depth: float[float], outer_diameter: float[float], thickness: float[float], height: float[float], crack_position: str, width_to_depth_ratio: float[float] = 2.0)#

Class to initalise and store the crack geometry data on a hollow cylindrical section.

The crack is assumed to maintain its width to depth ratio.

>>> # Example drawing of a hollow cylinder with external crack
>>> #        ┌────────────────────────────────────────┐
>>> #        │              ▄▄▄▀▀▀▀▀▀▀▚▄▄▖            │
>>> #        │          ▗▄▀▀             ▝▀▚▄         │
>>> #        │        ▄▀▘                    ▀▖       │
>>> #        │       ▞    crack front         ▝▀▖     │
>>> #        │     ▗▀     │      ▄▄▄▖           ▝▖    │
>>> #        │    ▗███▄▖<─┘  ▗▟▀▀   ▀▀▚▖         ▐    │
>>> #        │    ▟█████▖   ▟▘         ▀▙         ▌   │
>>> #        │2c─>███████   ▌       r_i ▐         ▐   │
>>> #        │    ███████   ▌     ↑<───>▐         ▐   │
>>> #        │    ▜█████▘   ▜▖    │    ▄▛         ▌   │
>>> #        │   │▝███▀▘│    ▝▜▄▄ │ ▄▄▞▘         ▐    │
>>> #        │   │ ▝▄   │        ▀│▀▘           ▗▘    │
>>> #        │   │   ▚  │      r_o│           ▗▄▘     │
>>> #        │   │    ▚▄│         │          ▗▘       │
>>> #        │   │   a  ▀▚▄▖      ↓       ▄▞▀▘        │
>>> #        │   │<────>│  ▝▀▀▚▄▄▄▄▄▄▄▄▀▀▀            │
>>> #        └────────────────────────────────────────┘
>>> #
Parameters:
  • initial_depth (float) – The initial depth of the crack.

  • outer_diameter (float) – The outer diameter of the part.

  • thickness (float) – The thickness of the part.

  • height (float) – The height of the part.

  • crack_position (float) – The position of the crack on the part.

  • width_to_depth_ratio (float) – The ratio of the width to the depth of the crack.

classmethod thickness_validator(v: float[float], values: dict) float[float]#

Validate the thickness of the part.

classmethod crack_position_validator(v: str) str#

Validate the crack position string.

property geometry_factor: ndarray#

Get the geometric factor. This should be a function of the crack size. The default value is 1.0.

plot(fig: Figure | None = None, ax: Axes | None = None, **kwargs: dict) tuple#

Plot the crack front on a hollow cylinder.

Parameters:
  • fig (matplotlib.figure.Figure, optional) – The figure to plot on.

  • ax (matplotlib.axes.Axes, optional) – The axis to plot on.

  • **kwargs (dict) – Keyword arguments to pass to the matplotlib plot function.

Returns:

  • fig (matplotlib.figure.Figure) – The figure that was plotted on.

  • ax (matplotlib.axes.Axes)

class py_fatigue.geometry.cylinder.Cylinder(initial_depth: float[float], diameter: float[float], height: float[float])#

Class to initalise and store the crack geometry data on a cylindrical section.

Parameters:
  • diameter (float) – The outer diameter of the part.

  • height (float) – The height of the part.

property geometry_factor: ndarray#

Get the geometric factor. This should be a function of the crack size. The default value is an empty.

py_fatigue.geometry.cylinder.f_hol_cyl_01(crack_depth: float, crack_geometry: Dict[str, float])#

Calculate the crack geometry factor for a hollow cylinder with an external crack.

Parameters:
  • crack_depth (float) – The crack depth.

  • outer_diameter (float) – The outer diameter of the part.

  • thickness (float) – The thickness of the part.

  • height (float) – The height of the part.

Returns:

The crack size factor.

Return type:

float