Source code for kappa_sdk.wellbore.wellbore_pipe
from typing import List
from ..wellbore_pipe_type_enum import WellborePipeTypeEnum
from .wellbore_pipe_section import WellborePipeSection
[docs]
class WellborePipe:
"""Class representing a pipe within a wellbore.
A pipe can be a casing, tubing, or open hole, and consists
of one or more sections.
"""
def __init__(self, pipe_type: WellborePipeTypeEnum, sections: List[WellborePipeSection]) -> None:
self.__type = pipe_type
self.__sections = sections
@property
def type(self) -> WellborePipeTypeEnum:
"""Gets the type of this :class:`WellborePipe`."""
return self.__type
@property
def sections(self) -> List[WellborePipeSection]:
"""Gets the sections of this :class:`WellborePipe`."""
return self.__sections
def is_empty(self) -> bool:
return len(self.__sections) == 0