Source code for kappa_sdk.wellbore.wellbore_pipe_section
from typing import Optional
default_casing_thickness = 0.01  # 1cm
[docs]
class WellborePipeSection:
[docs]
    def __init__(self, name: Optional[str], length: float, inner_diameter: float, roughness: float, thickness: Optional[float] = None, outer_diameter: Optional[float] = None) -> None:
        self.__name = name
        self.__length = length
        self.__inner_diameter = inner_diameter
        self.__outer_diameter = inner_diameter + 2 * default_casing_thickness if outer_diameter is None else outer_diameter
        self.__thickness = (self.outer_diameter - self.inner_diameter) / 2 if thickness is None else thickness
        self.__roughness = roughness 
    @property
    def name(self) -> Optional[str]:
        """Gets the name of this :class:`WellborePipeSection`."""
        return self.__name
    @property
    def length(self) -> float:
        """Gets the length of this :class:`WellborePipeSection`."""
        return self.__length
    @property
    def inner_diameter(self) -> float:
        """Gets the inner diameter of this :class:`WellborePipeSection`."""
        return self.__inner_diameter
    @property
    def thickness(self) -> float:
        """Gets the thickness of this :class:`WellborePipeSection`."""
        return self.__thickness
    @property
    def roughness(self) -> float:
        """Gets the roughness of this :class:`WellborePipeSection`."""
        return self.__roughness
    @property
    def outer_diameter(self) -> float:
        return self.__outer_diameter