Full API Reference

This page is a detailed reference guide to ALFAsim-SDK API. It includes a catalog of all supported CaseDescription and ALFAcase capabilities.

Case

class CaseDescription

Definitions

class CaseDescription
    name: Optional[str]
    physics: PhysicsDescription⠀
    time_options: TimeOptionsDescription⠀
    numerical_options: NumericalOptionsDescription⠀
    ipr_models: IPRModelsDescription⠀
    pvt_models: PvtModelsDescription⠀
    tracers: TracersDescription⠀
    outputs: CaseOutputDescription⠀
    pipes: List[PipeDescription]
    nodes: List[NodeDescription]
    wells: List[WellDescription]
    materials: List[MaterialDescription]
    walls: List[WallDescription]

Options

class PhysicsDescription

Definitions

class PhysicsDescription
    hydrodynamic_model: HydrodynamicModelType⠀
    simulation_regime: SimulationRegimeType⠀
    energy_model: EnergyModel⠀
    solids_model: SolidsModelType⠀
    initial_condition_strategy: InitialConditionStrategyType⠀
    restart_filepath: Optional[Path]
    keep_former_results: bool
    keep_former_results: bool
    emulsion_model: EmulsionModelType⠀
    flash_model: FlashModel⠀
    correlations_package: CorrelationPackageType
hydrodynamic_model: HydrodynamicModelType⠀
simulation_regime: SimulationRegimeType⠀
energy_model: EnergyModel⠀
solids_model: SolidsModelType⠀
initial_condition_strategy: InitialConditionStrategyType⠀
restart_filepath: string    # optional
keep_former_results: boolean
keep_former_results: number
emulsion_model: EmulsionModelType⠀
flash_model: FlashModel⠀
correlations_package: CorrelationPackageType
class TimeOptionsDescription

Definitions

class TimeOptionsDescription
    stop_on_steady_state: bool
    stop_on_steady_state: bool
    initial_time: Scalar⠀
    final_time: Scalar⠀
    initial_timestep: Scalar⠀
    minimum_timestep: Scalar⠀
    maximum_timestep: Scalar⠀
    restart_autosave_frequency: Scalar⠀
    minimum_time_for_steady_state_stop: Scalar
stop_on_steady_state: boolean
stop_on_steady_state: number
initial_time:
    value: number
    unit: string
final_time:
    value: number
    unit: string
initial_timestep:
    value: number
    unit: string
minimum_timestep:
    value: number
    unit: string
maximum_timestep:
    value: number
    unit: string
restart_autosave_frequency:
    value: number
    unit: string
minimum_time_for_steady_state_stop:
    value: number
    unit: string
class NumericalOptionsDescription

Definitions

class NumericalOptionsDescription
    nonlinear_solver_type: NonlinearSolverType⠀
    tolerance: float
    maximum_iterations: int
    maximum_timestep_change_factor: float
    maximum_cfl_value: float
    relaxed_tolerance: float
    divergence_tolerance: float
    friction_factor_evaluation_strategy: EvaluationStrategyType⠀
    simulation_mode: SimulationModeType⠀
    enable_solver_caching: bool
    enable_solver_caching: bool
    caching_rtol: float
    caching_atol: float
    always_repeat_timestep: bool
    always_repeat_timestep: bool
nonlinear_solver_type: NonlinearSolverType⠀
tolerance: number
maximum_iterations: number
maximum_timestep_change_factor: number
maximum_cfl_value: number
relaxed_tolerance: number
divergence_tolerance: number
friction_factor_evaluation_strategy: EvaluationStrategyType⠀
simulation_mode: SimulationModeType⠀
enable_solver_caching: boolean
enable_solver_caching: number
caching_rtol: number
caching_atol: number
always_repeat_timestep: boolean
always_repeat_timestep: number

Outputs

class CaseOutputDescription

Definitions

class CaseOutputDescription
    trends: List[TrendOutputDescription]
    trend_frequency: Scalar⠀
    profiles: List[ProfileOutputDescription]
    profile_frequency: Scalar
trends:
    - trend_output_description_schema⠀
trend_frequency:
    value: number
    unit: string
profiles:
    - profile_output_description_schema⠀
profile_frequency:
    value: number
    unit: string
class ProfileOutputDescription

Definitions

class ProfileOutputDescription
    curve_names: List[str]
    element_name: str
    location: OutputAttachmentLocation
curve_names:
    - str
element_name: string
location: OutputAttachmentLocation
class TrendOutputDescription

Definitions

class TrendOutputDescription
    curve_names: List[str]
    element_name: str
    position: Scalar⠀
    location: OutputAttachmentLocation
curve_names:
    - str
element_name: string
position:
    value: number
    unit: string
location: OutputAttachmentLocation

PVTs

class PvtModelsDescription

Holds a PVT which is used by the simulator to obtain fluid characteristics, such as density and viscosity, given a certain pressure and temperature.

This class is a holder for the different ways the user can enter PVT information in the application.

Parameters
  • PvtModelCorrelationDescription] correlations (Dict[str,) – Standard black-oil correlations found in the literature. The user can tune the parameters used by the correlations.

  • compositions (Dict[str, PvtModelCompositionalDescription]) – Molar fluid compositions with molecular weights and densities for each component. It be light components and/or heavy fractions to be lumped into pseudo-components.

  • tables (Dict[str, Union[str, Path]]) –

    Load a complete PVT table obtained (usually) from lab results and generated by various software. Currently the user can import the table directly from a .tab file or a .alfatable file.

    The table parameter must be filled with a dictionary where the keys informs the name of the PVT and the values informs Path to a file with the Pvt model.

    • The value which holds the Path can be either relative or absolute.

    • The name of the pvt model from the Path can contains a ‘pipe’ character in order to select one of the multiples PVT tables in the same .tab file.

    Example

    Absolute Path, using MyPvtModel

    >>> Path("/home/user/my_file.tab|MyPvtModel")
    

    Relative Path, using MyPvtModel

    >>> Path("./my_file.tab|MyPvtModel")
    

  • table_parameters (Dict[str, PvtModelTableParametersDescription]) –

    INTERNAL USE ONLY

    This attribute is populated when exporting a Study to a CaseDescription, and it holds a model representation of a PVT originated from a (.tab / .alfatable) file.

    Their usage is directly related to the export of a CaseDescription to a .alfacase/.alfatable file, where the original PVT file cannot be guaranteed to exist therefore the only reproducible way to recreate the PVT is trough the PvtModelTableParametersDescription.

Definitions

class PvtModelsDescription
    default_model: Optional[str]
    tables: Dict[str, Union[str, pathlib.Path]]
    correlations: Dict[str, PvtModelCorrelationDescription]
    compositions: Dict[str, PvtModelCompositionalDescription]
default_model: string    # optional
tables:
    string: string | Path
correlations:
    string: pvt_model_correlation_description_schema⠀
compositions:
    string: pvt_model_compositional_description_schema

Examples

PvtModelsDescription(
    default_model="PVT1",
    tables={
        'PVT1': Path('./my_tab_file.tab')
    },
)
pvt_models:
    default_model: PVT1
    tables:
        PVT1: ./my_tab_file.tab
class PvtModelCorrelationDescription
oil_density_std :

default: Scalar(850.0, “kg/m3”)

gas_density_std:

default: Scalar(0.9, “kg/m3”)

rs_sat:

default: Scalar(150.0, “sm3/sm3”)

pvt_correlation_package:

default: CorrelationPackage.Standing

Definitions

class PvtModelCorrelationDescription
    oil_density_std: Scalar⠀
    gas_density_std: Scalar⠀
    rs_sat: Scalar⠀
    pvt_correlation_package: CorrelationPackage
oil_density_std:
    value: number
    unit: string
gas_density_std:
    value: number
    unit: string
rs_sat:
    value: number
    unit: string
pvt_correlation_package: CorrelationPackage

Examples

PvtModelCorrelationDescription(
    default_model="PVT1",
)
some_value:
    some_other_value: fooo
class PvtModelTableParametersDescription
Variables
  • pressure_values (ndarray(shape=(M,1))) – Array like of sorted pressure values (m number of entries). [Pa]

  • temperature_values (ndarray(shape=(N,1))) – Array like of sorted temperature values (n number of entries). [K]

  • table_variables (List[ndarray(shape=(MxN,1))]) – List of array like values for each property such as densities, specific heats, enthalpies, etc.

  • variable_names (List[str]) – List of property names

PVT Compositional

class PvtModelCompositionalDescription
Variables
  • equation_of_state_type (Scalar) – default: Scalar(850.0, “kg/m3”)

  • surface_tension_model_type (Scalar) – default: Scalar(0.9, “kg/m3”)

  • viscosity_model (Scalar) – default: Scalar(150.0, “sm3/sm3”)

  • heavy_components (List[HeavyComponentDescription]) – default: []

  • light_components (List[LightComponentDescription]) – default: []

  • FluidDescription] fluids (Dict[str,) – default: {}

Definitions

class PvtModelCompositionalDescription
    equation_of_state_type: EquationOfStateType⠀
    surface_tension_model_type: SurfaceTensionType⠀
    viscosity_model: PVTCompositionalViscosityModel⠀
    heavy_components: List[HeavyComponentDescription]
    light_components: List[LightComponentDescription]
    fluids: Dict[str, FluidDescription]
equation_of_state_type: EquationOfStateType⠀
surface_tension_model_type: SurfaceTensionType⠀
viscosity_model: PVTCompositionalViscosityModel⠀
heavy_components:
    - heavy_component_description_schema⠀
light_components:
    - light_component_description_schema⠀
fluids:
    string: fluid_description_schema
class HeavyComponentDescription

Definitions

class HeavyComponentDescription
    name: str
    scn: int
    MW: Scalar⠀
    rho: Scalar
name: string
scn: number
MW:
    value: number
    unit: string
rho:
    value: number
    unit: string
class LightComponentDescription

Definitions

class LightComponentDescription
    name: str
    Pc: Scalar⠀
    Tc: Scalar⠀
    Vc: Scalar⠀
    omega: Scalar⠀
    MW: Scalar⠀
    Tb: Scalar⠀
    Parachor: Scalar⠀
    B_parameter: Scalar⠀
    Cp_0: Scalar⠀
    Cp_1: Scalar⠀
    Cp_2: Scalar⠀
    Cp_3: Scalar⠀
    Cp_4: Scalar
name: string
Pc:
    value: number
    unit: string
Tc:
    value: number
    unit: string
Vc:
    value: number
    unit: string
omega:
    value: number
    unit: string
MW:
    value: number
    unit: string
Tb:
    value: number
    unit: string
Parachor:
    value: number
    unit: string
B_parameter:
    value: number
    unit: string
Cp_0:
    value: number
    unit: string
Cp_1:
    value: number
    unit: string
Cp_2:
    value: number
    unit: string
Cp_3:
    value: number
    unit: string
Cp_4:
    value: number
    unit: string
class FluidDescription

Definitions

class FluidDescription
    composition: List[CompositionDescription]
    fraction_pairs: List[BipDescription]
composition:
    - composition_description_schema⠀
fraction_pairs:
    - bip_description_schema
class CompositionDescription
Variables

Component (str) –

Name of the component available created on:

PvtModelCompositionalDescription.light_components PvtModelCompositionalDescription.heavy_components

..note:: CompositionDescription can only refer to components created from the same PvtModelCompositionalDescription

Definitions

class CompositionDescription
    component: str
    molar_fraction: Scalar⠀
    reference_enthalpy: Scalar
component: string
molar_fraction:
    value: number
    unit: string
reference_enthalpy:
    value: number
    unit: string
class BipDescription

Definitions

class BipDescription
    component_1: str
    component_2: str
    value: float
component_1: string
component_2: string
value: number

IPR

class IPRModelsDescription
Variables

Union[str, IPRDescription]] tables (Dict[str,) – A dictionary with the name of the IPR and the instance of the IPR Model.

Definitions

class IPRModelsDescription
    linear_models: Dict[str, LinearIPRDescription]
    table_models: Dict[str, TableIPRDescription]
linear_models:
    string: linear_ipr_description_schema⠀
table_models:
    string: table_ipr_description_schema
class LinearIPRDescription

Definitions

class LinearIPRDescription
    well_index_phase: WellIndexPhaseType⠀
    min_pressure_difference: Scalar⠀
    well_index: Scalar
well_index_phase: WellIndexPhaseType⠀
min_pressure_difference:
    value: number
    unit: string
well_index:
    value: number
    unit: string
class TableIPRDescription

Definitions

class TableIPRDescription
    well_index_phase: WellIndexPhaseType⠀
    table: IPRCurveDescription
well_index_phase: WellIndexPhaseType⠀
table: ipr_curve_description_schema
class IPRCurveDescription

Definitions

class IPRCurveDescription
    pressure_difference: Array⠀
    flow_rate: Array
pressure_difference:
    values: [number]
    unit: string
flow_rate:
    values: [number]
    unit: string

Tracer

class TracersDescription

Definitions

class TracersDescription
    constant_coefficients: Dict[str, TracerModelConstantCoefficientsDescription]
constant_coefficients:
    string: tracer_model_constant_coefficients_description_schema
class TracerModelConstantCoefficientsDescription

Definitions

class TracerModelConstantCoefficientsDescription
    partition_coefficients: Dict[str, Scalar]
partition_coefficients:
    string:
        value: number
        unit: string

Initial Conditions

class InitialConditionsDescription

Definitions

class InitialConditionsDescription
    pressures: InitialPressuresDescription⠀
    volume_fractions: InitialVolumeFractionsDescription⠀
    tracers_mass_fractions: InitialTracersMassFractionsDescription⠀
    velocities: InitialVelocitiesDescription⠀
    temperatures: InitialTemperaturesDescription⠀
    fluid: Optional[str]
class InitialPressuresDescription

Definitions

class InitialPressuresDescription
    position_input_type: TableInputType⠀
    table_x: ReferencedPressureContainerDescription⠀
    table_y: ReferencedPressureContainerDescription⠀
    table_length: PressureContainerDescription
class ReferencedPressureContainerDescription

Definitions

class ReferencedPressureContainerDescription
    reference_coordinate: Scalar⠀
    positions: Array⠀
    pressures: Array
reference_coordinate:
    value: number
    unit: string
positions:
    values: [number]
    unit: string
pressures:
    values: [number]
    unit: string
class PressureContainerDescription

Definitions

class PressureContainerDescription
    positions: Array⠀
    pressures: Array
positions:
    values: [number]
    unit: string
pressures:
    values: [number]
    unit: string
class InitialVolumeFractionsDescription

Definitions

class ReferencedVolumeFractionsContainerDescription

Definitions

class ReferencedVolumeFractionsContainerDescription
    reference_coordinate: Scalar⠀
    positions: Array⠀
    fractions: Dict[str, Array]
reference_coordinate:
    value: number
    unit: string
positions:
    values: [number]
    unit: string
fractions:
    string:
        values: [number]
        unit: string
class VolumeFractionsContainerDescription

Definitions

class VolumeFractionsContainerDescription
    positions: Array⠀
    fractions: Dict[str, Array]
positions:
    values: [number]
    unit: string
fractions:
    string:
        values: [number]
        unit: string
class InitialTracersMassFractionsDescription

Definitions

class ReferencedTracersMassFractionsContainerDescription

Definitions

class ReferencedTracersMassFractionsContainerDescription
    reference_coordinate: Scalar⠀
    positions: Array⠀
    tracers_mass_fractions: List[Array]
reference_coordinate:
    value: number
    unit: string
positions:
    values: [number]
    unit: string
tracers_mass_fractions:
    - Array
class TracersMassFractionsContainerDescription

Definitions

class TracersMassFractionsContainerDescription
    positions: Array⠀
    tracers_mass_fractions: List[Array]
positions:
    values: [number]
    unit: string
tracers_mass_fractions:
    - Array
class InitialVelocitiesDescription

Definitions

class InitialVelocitiesDescription
    position_input_type: TableInputType⠀
    table_x: ReferencedVelocitiesContainerDescription⠀
    table_y: ReferencedVelocitiesContainerDescription⠀
    table_length: VelocitiesContainerDescription
class ReferencedVelocitiesContainerDescription

Definitions

class ReferencedVelocitiesContainerDescription
    reference_coordinate: Scalar⠀
    positions: Array⠀
    velocities: Dict[str, Array]
reference_coordinate:
    value: number
    unit: string
positions:
    values: [number]
    unit: string
velocities:
    string:
        values: [number]
        unit: string
class VelocitiesContainerDescription

Definitions

class VelocitiesContainerDescription
    positions: Array⠀
    velocities: Dict[str, Array]
positions:
    values: [number]
    unit: string
velocities:
    string:
        values: [number]
        unit: string
class InitialTemperaturesDescription

Definitions

class InitialTemperaturesDescription
    position_input_type: TableInputType⠀
    table_x: ReferencedTemperaturesContainerDescription⠀
    table_y: ReferencedTemperaturesContainerDescription⠀
    table_length: TemperaturesContainerDescription
class ReferencedTemperaturesContainerDescription

Definitions

class ReferencedTemperaturesContainerDescription
    reference_coordinate: Scalar⠀
    positions: Array⠀
    temperatures: Array
reference_coordinate:
    value: number
    unit: string
positions:
    values: [number]
    unit: string
temperatures:
    values: [number]
    unit: string
class TemperaturesContainerDescription

Definitions

class TemperaturesContainerDescription
    positions: Array⠀
    temperatures: Array
positions:
    values: [number]
    unit: string
temperatures:
    values: [number]
    unit: string

Pipe

class PipeDescription

Definitions

class PipeDescription
    name: str
    source: str
    target: str
    source_port: Optional[WellConnectionPort⠀]
    target_port: Optional[WellConnectionPort⠀]
    pvt_model: Optional[str]
    profile: ProfileDescription⠀
    equipment: EquipmentDescription⠀
    environment: EnvironmentDescription⠀
    segments: PipeSegmentsDescription⠀
    initial_conditions: InitialConditionsDescription
name: string
source: string
target: string
source_port: well_connection_port_schema⠀  # optional
target_port: well_connection_port_schema⠀  # optional
pvt_model: string    # optional
profile: profile_description_schema⠀
equipment: equipment_description_schema⠀
environment: environment_description_schema⠀
segments: pipe_segments_description_schema⠀
initial_conditions: initial_conditions_description_schema
class PipeSegmentsDescription

Definitions

class PipeSegmentsDescription
    start_positions: Array⠀
    diameters: Array⠀
    roughnesses: Array⠀
    wall_names: Optional[List[str]]
start_positions:
    values: [number]
    unit: string
diameters:
    values: [number]
    unit: string
roughnesses:
    values: [number]
    unit: string
wall_names:     # optional
    - str

Node

class NodeDescription

Definitions

class NodeDescription
    name: str
    node_type: NodeCellType⠀
    pvt_model: Optional[str]
    pressure_properties: PressureNodePropertiesDescription⠀
    mass_source_properties: MassSourceNodePropertiesDescription⠀
    internal_properties: InternalNodePropertiesDescription⠀
    separator_properties: SeparatorNodePropertiesDescription
name: string
node_type: NodeCellType⠀
pvt_model: string    # optional
pressure_properties: pressure_node_properties_description_schema⠀
mass_source_properties: mass_source_node_properties_description_schema⠀
internal_properties: internal_node_properties_description_schema⠀
separator_properties: separator_node_properties_description_schema
class PressureNodePropertiesDescription

Definitions

class PressureNodePropertiesDescription
    pressure: Scalar⠀
    temperature: Scalar⠀
    fluid: Optional[str]
    tracer_mass_fraction: Array⠀
    split_type: MassInflowSplitType⠀
    mass_fractions: Dict[str, Scalar]
    volume_fractions: Dict[str, Scalar]
    gas_liquid_ratio: Scalar⠀
    gas_oil_ratio: Scalar⠀
    water_cut: Scalar
pressure:
    value: number
    unit: string
temperature:
    value: number
    unit: string
fluid: string    # optional
tracer_mass_fraction:
    values: [number]
    unit: string
split_type: MassInflowSplitType⠀
mass_fractions:
    string:
        value: number
        unit: string
volume_fractions:
    string:
        value: number
        unit: string
gas_liquid_ratio:
    value: number
    unit: string
gas_oil_ratio:
    value: number
    unit: string
water_cut:
    value: number
    unit: string
class MassSourceNodePropertiesDescription

Definitions

class MassSourceNodePropertiesDescription
    fluid: Optional[str]
    tracer_mass_fraction: Array⠀
    temperature: Scalar⠀
    source_type: MassSourceType⠀
    volumetric_flow_rates_std: Dict[str, Scalar]
    mass_flow_rates: Dict[str, Scalar]
    total_mass_flow_rate: Scalar⠀
    water_cut: Scalar⠀
    gas_oil_ratio: Scalar
fluid: string    # optional
tracer_mass_fraction:
    values: [number]
    unit: string
temperature:
    value: number
    unit: string
source_type: MassSourceType⠀
volumetric_flow_rates_std:
    string:
        value: number
        unit: string
mass_flow_rates:
    string:
        value: number
        unit: string
total_mass_flow_rate:
    value: number
    unit: string
water_cut:
    value: number
    unit: string
gas_oil_ratio:
    value: number
    unit: string
class InternalNodePropertiesDescription

Definitions

class InternalNodePropertiesDescription
    fluid: Optional[str]
fluid: string    # optional
class SeparatorNodePropertiesDescription
Variables

overall_heat_transfer_coefficient

η such that the overall heat transferred to the separator is

Q = η A (T_amb - T_sep)

Definitions

class SeparatorNodePropertiesDescription
    environment_temperature: Scalar⠀
    geometry: SeparatorGeometryType⠀
    length: Scalar⠀
    overall_heat_transfer_coefficient: Scalar⠀
    radius: Scalar⠀
    nozzles: Dict[str, Scalar]
    initial_phase_volume_fractions: Dict[str, Scalar]
environment_temperature:
    value: number
    unit: string
geometry: SeparatorGeometryType⠀
length:
    value: number
    unit: string
overall_heat_transfer_coefficient:
    value: number
    unit: string
radius:
    value: number
    unit: string
nozzles:
    string:
        value: number
        unit: string
initial_phase_volume_fractions:
    string:
        value: number
        unit: string

Well

class WellDescription

Definitions

class WellDescription
    name: str
    pvt_model: Optional[str]
    stagnant_fluid: Optional[str]
    profile: ProfileDescription⠀
    casing: CasingDescription⠀
    annulus: AnnulusDescription⠀
    formation: FormationDescription⠀
    top_node: str
    bottom_node: str
    environment: EnvironmentDescription⠀
    initial_conditions: InitialConditionsDescription⠀
    equipment: EquipmentDescription
name: string
pvt_model: string    # optional
stagnant_fluid: string    # optional
profile: profile_description_schema⠀
casing: casing_description_schema⠀
annulus: annulus_description_schema⠀
formation: formation_description_schema⠀
top_node: string
bottom_node: string
environment: environment_description_schema⠀
initial_conditions: initial_conditions_description_schema⠀
equipment: equipment_description_schema
class CasingDescription

Definitions

class CasingDescription
    casing_sections: List[CasingSectionDescription]
    tubings: List[TubingDescription]
    packers: List[PackerDescription]
    open_holes: List[OpenHoleDescription]
class CasingSectionDescription

Definitions

class CasingSectionDescription
    name: str
    hanger_depth: Scalar⠀
    settings_depth: Scalar⠀
    hole_diameter: Scalar⠀
    outer_diameter: Scalar⠀
    inner_diameter: Scalar⠀
    inner_roughness: Scalar⠀
    material: Optional[str]
    top_of_filler: Scalar⠀
    filler_material: Optional[str]
    material_above_filler: Optional[str]
name: string
hanger_depth:
    value: number
    unit: string
settings_depth:
    value: number
    unit: string
hole_diameter:
    value: number
    unit: string
outer_diameter:
    value: number
    unit: string
inner_diameter:
    value: number
    unit: string
inner_roughness:
    value: number
    unit: string
material: string    # optional
top_of_filler:
    value: number
    unit: string
filler_material: string    # optional
material_above_filler: string    # optional
class TubingDescription

Definitions

class TubingDescription
    name: str
    length: Scalar⠀
    outer_diameter: Scalar⠀
    inner_diameter: Scalar⠀
    inner_roughness: Scalar⠀
    material: Optional[str]
name: string
length:
    value: number
    unit: string
outer_diameter:
    value: number
    unit: string
inner_diameter:
    value: number
    unit: string
inner_roughness:
    value: number
    unit: string
material: string    # optional
class PackerDescription

Definitions

class PackerDescription
    name: str
    position: Scalar⠀
    material_above: Optional[str]
name: string
position:
    value: number
    unit: string
material_above: string    # optional
class OpenHoleDescription

Definitions

class OpenHoleDescription
    name: str
    length: Scalar⠀
    diameter: Scalar⠀
    inner_roughness: Scalar
name: string
length:
    value: number
    unit: string
diameter:
    value: number
    unit: string
inner_roughness:
    value: number
    unit: string
class AnnulusDescription

Definitions

class AnnulusDescription
    has_annulus_flow: bool
    has_annulus_flow: bool
    pvt_model: Optional[str]
    initial_conditions: InitialConditionsDescription⠀
    gas_lift_valve_equipment: Dict[str, GasLiftValveEquipmentDescription]
    top_node: str
has_annulus_flow: boolean
has_annulus_flow: number
pvt_model: string    # optional
initial_conditions: initial_conditions_description_schema⠀
gas_lift_valve_equipment:
    string: gas_lift_valve_equipment_description_schema⠀
top_node: string
class GasLiftValveEquipmentDescription

Definitions

class GasLiftValveEquipmentDescription
    position: Scalar⠀
    diameter: Scalar⠀
    valve_type: ValveType⠀
    delta_p_min: Scalar⠀
    discharge_coeff: Scalar
position:
    value: number
    unit: string
diameter:
    value: number
    unit: string
valve_type: ValveType⠀
delta_p_min:
    value: number
    unit: string
discharge_coeff:
    value: number
    unit: string
class FormationDescription

Definitions

class FormationDescription
    reference_y_coordinate: Scalar⠀
    layers: List[FormationLayerDescription]
reference_y_coordinate:
    value: number
    unit: string
layers:
    - formation_layer_description_schema
class FormationLayerDescription

Definitions

class FormationLayerDescription
    name: str
    start: Scalar⠀
    material: Optional[str]
name: string
start:
    value: number
    unit: string
material: string    # optional

Material

class MaterialDescription

Definitions

class MaterialDescription
    name: str
    material_type: MaterialType⠀
    density: Scalar⠀
    thermal_conductivity: Scalar⠀
    heat_capacity: Scalar⠀
    inner_emissivity: Scalar⠀
    outer_emissivity: Scalar⠀
    expansion: Scalar⠀
    viscosity: Scalar
name: string
material_type: MaterialType⠀
density:
    value: number
    unit: string
thermal_conductivity:
    value: number
    unit: string
heat_capacity:
    value: number
    unit: string
inner_emissivity:
    value: number
    unit: string
outer_emissivity:
    value: number
    unit: string
expansion:
    value: number
    unit: string
viscosity:
    value: number
    unit: string

Wall

class WallDescription

Definitions

class WallDescription
    name: str
    inner_roughness: Scalar⠀
    wall_layer_container: List[WallLayerDescription]
name: string
inner_roughness:
    value: number
    unit: string
wall_layer_container:
    - wall_layer_description_schema
class WallLayerDescription

Used for defining the default walls.

Variables
  • thickness (Scalar) –

  • material_name (str) –

  • has_annulus_flow (bool) –

Definitions

class WallLayerDescription
    thickness: Scalar⠀
    material_name: str
    has_annulus_flow: bool
    has_annulus_flow: bool
thickness:
    value: number
    unit: string
material_name: string
has_annulus_flow: boolean
has_annulus_flow: number

Profile

class ProfileDescription

Describe a pipe by either length and inclination or by X and Y coordinates.

Variables
  • LengthAndElevation (Optional[XAndYDescription]) – A list of points with the length and elevation. The first item MUST always be (0, 0), otherwise a ValueError is raised.

  • XAndY (Optional[LengthAndElevationDescription]) – A list of points (X, Y), describing the coordinates.

Note

x_and_y and length_and_elevation are mutually exclusive.

Definitions

class ProfileDescription
    x_and_y: Optional[XAndYDescription]
    length_and_elevation: Optional[LengthAndElevationDescription]
x_and_y: x_and_y_description_schema⠀  # optional
length_and_elevation: length_and_elevation_description_schema⠀  # optional
class XAndYDescription

Describe a pipe with a sequence of coordinates.

Definitions

class XAndYDescription
    x: Optional[Array]
    y: Optional[Array]
x:     # optional
    values: [number]
    unit: string
y:     # optional
    values: [number]
    unit: string
class LengthAndElevationDescription

Describe a pipe with length and elevation.

Definitions

class LengthAndElevationDescription
    length: Optional[Array]
    elevation: Optional[Array]
length:     # optional
    values: [number]
    unit: string
elevation:     # optional
    values: [number]
    unit: string

Environment

class EnvironmentDescription

Definitions

class EnvironmentDescription
    thermal_model: PipeThermalModelType⠀
    position_input_mode: PipeThermalPositionInput⠀
    reference_y_coordinate: Scalar⠀
    md_properties_table: List[EnvironmentPropertyDescription]
    tvd_properties_table: List[EnvironmentPropertyDescription]
thermal_model: PipeThermalModelType⠀
position_input_mode: PipeThermalPositionInput⠀
reference_y_coordinate:
    value: number
    unit: string
md_properties_table:
    - environment_property_description_schema⠀
tvd_properties_table:
    - environment_property_description_schema
class EnvironmentPropertyDescription

Definitions

class EnvironmentPropertyDescription
    position: Scalar⠀
    temperature: Scalar⠀
    type: PipeEnvironmentHeatTransferCoefficientModelType⠀
    heat_transfer_coefficient: Scalar⠀
    overall_heat_transfer_coefficient: Scalar⠀
    fluid_velocity: Scalar
position:
    value: number
    unit: string
temperature:
    value: number
    unit: string
type: PipeEnvironmentHeatTransferCoefficientModelType⠀
heat_transfer_coefficient:
    value: number
    unit: string
overall_heat_transfer_coefficient:
    value: number
    unit: string
fluid_velocity:
    value: number
    unit: string

Equipment

class EquipmentDescription

Definitions

class EquipmentDescription
    mass_sources: Dict[str, MassSourceEquipmentDescription]
    pumps: Dict[str, PumpEquipmentDescription]
    valves: Dict[str, ValveEquipmentDescription]
    reservoir_inflows: Dict[str, ReservoirInflowEquipmentDescription]
    heat_sources: Dict[str, HeatSourceEquipmentDescription]
    compressors: Dict[str, CompressorEquipmentDescription]
class MassSourceEquipmentDescription

Definitions

class MassSourceEquipmentDescription
    fluid: Optional[str]
    tracer_mass_fraction: Array⠀
    temperature: Scalar⠀
    source_type: MassSourceType⠀
    volumetric_flow_rates_std: Dict[str, Scalar]
    mass_flow_rates: Dict[str, Scalar]
    total_mass_flow_rate: Scalar⠀
    water_cut: Scalar⠀
    gas_oil_ratio: Scalar⠀
    position: Scalar
fluid: string    # optional
tracer_mass_fraction:
    values: [number]
    unit: string
temperature:
    value: number
    unit: string
source_type: MassSourceType⠀
volumetric_flow_rates_std:
    string:
        value: number
        unit: string
mass_flow_rates:
    string:
        value: number
        unit: string
total_mass_flow_rate:
    value: number
    unit: string
water_cut:
    value: number
    unit: string
gas_oil_ratio:
    value: number
    unit: string
position:
    value: number
    unit: string
class PumpEquipmentDescription

Definitions

class PumpEquipmentDescription
    position: Scalar⠀
    type: PumpType⠀
    pressure_boost: Scalar⠀
    thermal_efficiency: Scalar⠀
    table: TablePumpDescription⠀
    speed_curve: SpeedCurveDescription⠀
    speed_curve_interpolation_type: InterpolationType⠀
    flow_direction: FlowDirection
position:
    value: number
    unit: string
type: PumpType⠀
pressure_boost:
    value: number
    unit: string
thermal_efficiency:
    value: number
    unit: string
table: table_pump_description_schema⠀
speed_curve: speed_curve_description_schema⠀
speed_curve_interpolation_type: InterpolationType⠀
flow_direction: FlowDirection
class ValveEquipmentDescription

Definitions

class ValveEquipmentDescription
    position: Scalar⠀
    type: ValveType⠀
    diameter: Scalar⠀
    flow_direction: FlowDirection⠀
    opening_type: ValveOpeningType⠀
    opening: Scalar⠀
    opening_curve_interpolation_type: InterpolationType⠀
    opening_curve: OpeningCurveDescription⠀
    cv_table: CvTableDescription
position:
    value: number
    unit: string
type: ValveType⠀
diameter:
    value: number
    unit: string
flow_direction: FlowDirection⠀
opening_type: ValveOpeningType⠀
opening:
    value: number
    unit: string
opening_curve_interpolation_type: InterpolationType⠀
opening_curve: opening_curve_description_schema⠀
cv_table: cv_table_description_schema
class ReservoirInflowEquipmentDescription

Definitions

class ReservoirInflowEquipmentDescription
    pressure: Scalar⠀
    temperature: Scalar⠀
    fluid: Optional[str]
    tracer_mass_fraction: Array⠀
    split_type: MassInflowSplitType⠀
    mass_fractions: Dict[str, Scalar]
    volume_fractions: Dict[str, Scalar]
    gas_liquid_ratio: Scalar⠀
    gas_oil_ratio: Scalar⠀
    water_cut: Scalar⠀
    start: Scalar⠀
    length: Scalar⠀
    productivity_ipr: Optional[str]
    injectivity_ipr: Optional[str]
pressure:
    value: number
    unit: string
temperature:
    value: number
    unit: string
fluid: string    # optional
tracer_mass_fraction:
    values: [number]
    unit: string
split_type: MassInflowSplitType⠀
mass_fractions:
    string:
        value: number
        unit: string
volume_fractions:
    string:
        value: number
        unit: string
gas_liquid_ratio:
    value: number
    unit: string
gas_oil_ratio:
    value: number
    unit: string
water_cut:
    value: number
    unit: string
start:
    value: number
    unit: string
length:
    value: number
    unit: string
productivity_ipr: string    # optional
injectivity_ipr: string    # optional
class HeatSourceEquipmentDescription

Definitions

class HeatSourceEquipmentDescription
    start: Scalar⠀
    length: Scalar⠀
    power: Scalar
start:
    value: number
    unit: string
length:
    value: number
    unit: string
power:
    value: number
    unit: string
class CompressorEquipmentDescription

Definitions

class CompressorEquipmentDescription
    position: Scalar⠀
    speed_curve: SpeedCurveDescription⠀
    reference_pressure: Scalar⠀
    reference_temperature: Scalar⠀
    constant_speed: Scalar⠀
    compressor_type: CompressorSpeedType⠀
    speed_curve_interpolation_type: InterpolationType⠀
    flow_direction: FlowDirection⠀
    table: CompressorPressureTableDescription
position:
    value: number
    unit: string
speed_curve: speed_curve_description_schema⠀
reference_pressure:
    value: number
    unit: string
reference_temperature:
    value: number
    unit: string
constant_speed:
    value: number
    unit: string
compressor_type: CompressorSpeedType⠀
speed_curve_interpolation_type: InterpolationType⠀
flow_direction: FlowDirection⠀
table: compressor_pressure_table_description_schema
class SpeedCurveDescription

Definitions

class SpeedCurveDescription
    time: Array⠀
    speed: Array
time:
    values: [number]
    unit: string
speed:
    values: [number]
    unit: string
class CompressorPressureTableDescription
Variables

corrected_mass_flow_rate_entries – Equivalent to m * (T/T_ref)**0.5 / (P/P_ref)

Definitions

class CompressorPressureTableDescription
    speed_entries: Array⠀
    corrected_mass_flow_rate_entries: Array⠀
    pressure_ratio_table: Array⠀
    isentropic_efficiency_table: Array
speed_entries:
    values: [number]
    unit: string
corrected_mass_flow_rate_entries:
    values: [number]
    unit: string
pressure_ratio_table:
    values: [number]
    unit: string
isentropic_efficiency_table:
    values: [number]
    unit: string

Tables

class TablePumpDescription

Definitions

class TablePumpDescription
    speeds: Array⠀
    void_fractions: Array⠀
    flow_rates: Array⠀
    pressure_boosts: Array
speeds:
    values: [number]
    unit: string
void_fractions:
    values: [number]
    unit: string
flow_rates:
    values: [number]
    unit: string
pressure_boosts:
    values: [number]
    unit: string
class CvTableDescription

Definitions

class CvTableDescription
    opening: Array⠀
    flow_coefficient: Array
opening:
    values: [number]
    unit: string
flow_coefficient:
    values: [number]
    unit: string
class OpeningCurveDescription

Definitions

class OpeningCurveDescription
    time: Array⠀
    opening: Array
time:
    values: [number]
    unit: string
opening:
    values: [number]
    unit: string