StageDefinition#

class StageDefinition(title=None, simulation_mode=None, solver_timestep=None, save_frequency=None, injection_duration=None, rest_duration=None, inner_tbg_inside_diam=None, inner_tbg_outside_diam=None, outer_csg_inside_diam=None, outer_csg_outside_diam=None, brine_injection_sg=None, brine_injection_depth=None, brine_production_depth=None, brine_injection_rate=0, set_initial_conditions=None, set_cavern_sg=None, brine_interface_depth=None, product_injection_rate=0.0, product_injection_depth=None, product_production_depth=None, stop_condition=StopCondition.DURATION, stop_value=0, defaults=None, blanket_depth=<property object>, brine_injection_height=<property object>, brine_production_height=<property object>, brine_interface_height=<property object>)[source]#

Bases: object

Defines a SANSMIC simulation stage which is an injection period followed by a rest period.

Summary

from_dict(opts[, defaults])

Create a new object from a dictionary of options.

to_dict([keep_empty])

Convert the object's data to a dictionary of options.

validate()

Validate that all required options have been selected.

blanket_depth

Alias for brine_interface_depth

brine_injection_depth

The depth below surface/ZDP where the end of the injection string/casing/tubing is positioned.

brine_injection_height

Height above floor where brine is injected.

brine_injection_rate

The meaning of this field is based on the type of data that is provided (a value of 0 means off).

brine_injection_sg

The water/brine injection specific gravity.

brine_interface_depth

Set the initial oil-brine interface or blanket level.

brine_interface_height

Height above floor where interface starts.

brine_production_depth

The depth below surface/ZDP where the end of the production string/casing/tubing is positioned.

brine_production_height

Height above floor where brine is produced.

defaults

injection_duration

The duration of the injection phase of the stage.

inner_tbg_inside_diam

The inner tubing inner diameter (ID).

inner_tbg_outside_diam

The inner tubing outer diameter (OD).

outer_csg_inside_diam

The outer tubing/casing inner diameter (ID).

outer_csg_outside_diam

The outer tubing/casing outer diameter (OD).

product_injection_depth

The depth below surface/ZDP where the product injection string -- or casing or chimney bottom -- is positioned; a value 0 or None sets this to the roof of the cavern.

product_injection_rate

Either a constant rate of product injection or a file with an injection schedule, by default 0.

product_production_depth

The depth below surface/ZDP where the product production string -- or casing or chimney bottom -- is positioned; a value 0 or None sets this to the roof of the cavern.

rest_duration

The duration of the post-injection rest phase of the stage.

save_frequency

The save frequency in number of timesteps, or one of "hourly", "daily", or "bystage", by default "bystage".

set_cavern_sg

Set the initial specific gravity for all brine-filled cells of the cavern to this value.

set_initial_conditions

Unlink initial cavern brine gravity and interface level from previous stage.

simulation_mode

The simulation mode used in this stage.

solver_timestep

The solver timestep in hours.

stop_condition

Set an additional stop condition for the stage, see StopCondition.

stop_value

If the stop_condition is not DURATION, then the depth or volume value.

title

Title for the stage.

valid_default_keys

Details

classmethod from_dict(opts, defaults=None)[source]#

Create a new object from a dictionary of options.

This method differs from the __init__ constructor by automatically converting non-underscore characters - e.g., - or . or `` `` to underscores and changing keys to lower-case prior to creating the object.

See also: to_dict()

Parameters:

opts (dict) – The initialization values

Returns:

the new stage

Return type:

StageDefinition

to_dict(keep_empty=False)[source]#

Convert the object’s data to a dictionary of options.

This method differs from the asdict() method by automatically converting underscore characters to hyphens for a more readable dictionary. Specifically used when creating TOML, JSON and YAML files.

See also: from_dict()

Parameters:

keep_empty (bool) – Keep values set to None and set them to ""

Returns:

the options dictionary

Return type:

dict

validate()[source]#

Validate that all required options have been selected.

Raises:
  • TypeError – if there are missing or misconfigured options

  • ValueError – if timing options are invalid

property blanket_depth: float#

Alias for brine_interface_depth

brine_injection_depth: float = None#

The depth below surface/ZDP where the end of the injection string/casing/tubing is positioned.

property brine_injection_height: float#

Height above floor where brine is injected. The brine_injection_depth will be a negative value if set using this property.

brine_injection_rate: float | str = 0#

The meaning of this field is based on the type of data that is provided (a value of 0 means off).

brine_injection_sg: float = None#

The water/brine injection specific gravity.

brine_interface_depth: float = None#

Set the initial oil-brine interface or blanket level. By default None, which will link to the previous stage (as will a value of 0).

property brine_interface_height: float#

Height above floor where interface starts. The brine_interface_depth will be a negative value if set using this property.

brine_production_depth: float = None#

The depth below surface/ZDP where the end of the production string/casing/tubing is positioned.

property brine_production_height: float#

Height above floor where brine is produced. The brine_production_depth will be a negative value if set using this property.

defaults: dataclasses.InitVar[Dict[str, Any]] = None#
injection_duration: float = None#

The duration of the injection phase of the stage.

inner_tbg_inside_diam: float = None#

The inner tubing inner diameter (ID).

inner_tbg_outside_diam: float = None#

The inner tubing outer diameter (OD).

outer_csg_inside_diam: float = None#

The outer tubing/casing inner diameter (ID).

outer_csg_outside_diam: float = None#

The outer tubing/casing outer diameter (OD).

product_injection_depth: float = None#

The depth below surface/ZDP where the product injection string – or casing or chimney bottom – is positioned; a value 0 or None sets this to the roof of the cavern.

product_injection_rate: float | str = 0.0#

Either a constant rate of product injection or a file with an injection schedule, by default 0.

product_production_depth: float = None#

The depth below surface/ZDP where the product production string – or casing or chimney bottom – is positioned; a value 0 or None sets this to the roof of the cavern.

rest_duration: float = None#

The duration of the post-injection rest phase of the stage.

save_frequency: int | Literal['hourly', 'daily', 'bystage'] = None#

The save frequency in number of timesteps, or one of “hourly”, “daily”, or “bystage”, by default “bystage”.

set_cavern_sg: float = None#

Set the initial specific gravity for all brine-filled cells of the cavern to this value.

set_initial_conditions: bool = None#

Unlink initial cavern brine gravity and interface level from previous stage. Automatically set to True for the first stage added to a model.

simulation_mode: SimulationMode = None#

The simulation mode used in this stage.

solver_timestep: float = None#

The solver timestep in hours.

stop_condition: StopCondition = 0#

Set an additional stop condition for the stage, see StopCondition.

stop_value: float = 0#

If the stop_condition is not DURATION, then the depth or volume value.

title: str = None#

Title for the stage.

valid_default_keys = ['solver_timestep', 'save_frequency', 'inner_tbg_inside_diam', 'inner_tbg_outside_diam', 'outer_csg_inside_diam', 'outer_csg_outside_diam']#