Scenario#

class Scenario(title=None, comments='', num_cells=None, geometry_data=None, geometry_format=GeometryFormat.RADIUS_LIST, cavern_height=None, floor_depth=None, ullage_standoff=40, insolubles_ratio=0.04, units=Units.FT_IN_BBL, defaults=<factory>, advanced=<factory>, stages=None)[source]#

Bases: object

A SANSMIC scenario definition used to run a simulation.

Summary

from_dict(opts)

Create a new object from a dictionary of options.

new_simulation([prefix, verbosity, ...])

Create a new Simulator object.

new_stage([pos])

Add a new stage in the optionally-specified pos position, and create it based on keyword arguments.

to_dict([keep_empty])

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

cavern_height

The total cavern height.

comments

Comments about the scenario

floor_depth

The depth from surface datum of the floor.

geometry_data

The geometry data in a list or list of lists, or a filename.

geometry_format

The format for the geometry data.

insolubles_ratio

The volume ratio of insoluble material within the salt.

num_cells

Number of cells to use in the model.

stages

The activity stages to simulate.

title

General title for the scenario.

ullage_standoff

The standoff distance of the lowest brine interface depth.

units

The units used in describing the scenario.

defaults

Default values for a subset of stage attributes, see StageDefinition.valid_default_keys.

advanced

Advanced and/or uncommonly used options

Details

classmethod from_dict(opts)[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

new_simulation(prefix='temp', verbosity=0, generate_tst_file=True, generate_out_file=False)[source]#

Create a new Simulator object.

Parameters:
  • prefix (str) – The prefix to use when creating output files, by default temp.

  • verbosity (int) – A verbosity level to pass to the C++ model, by default 0.

  • generate_tst_file (bool, optional) – Generate an old-style .TST file, by default True

  • generate_out_file (bool, optional) – Generate an old-style .OUT file, by default False

new_stage(pos=None, **kwargs)[source]#

Add a new stage in the optionally-specified pos position, and create it based on keyword arguments. Passes existing defaults unless a separate defaults dictionary is passed as one of the keyword arguments.

Parameters:
  • pos (int or None, keyword only) – The position in the stages list to insert the stage, by default None which will append to the end.

  • kwargs (keyword arguments) – Any valid keyword argument for a StageDefinition object

Returns:

new stage created from the keyword arguments. It will have been added into the stage list in the proper position.

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

advanced: AdvancedOptions#

Advanced and/or uncommonly used options

cavern_height: float = None#

The total cavern height.

comments: str = ''#

Comments about the scenario

defaults: Dict[str, int | float | str]#

Default values for a subset of stage attributes, see StageDefinition.valid_default_keys.

floor_depth: float = None#

The depth from surface datum of the floor.

geometry_data: List[float] | List[List[float]] | str = None#

The geometry data in a list or list of lists, or a filename.

geometry_format: GeometryFormat = 0#

The format for the geometry data.

insolubles_ratio: float = 0.04#

The volume ratio of insoluble material within the salt.

num_cells: int = None#

Number of cells to use in the model.

stages: List[StageDefinition] = None#

The activity stages to simulate.

title: str = None#

General title for the scenario.

ullage_standoff: float = 40#

The standoff distance of the lowest brine interface depth.

units: Units = 1#

The units used in describing the scenario.