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.
The total cavern height.
Comments about the scenario
The depth from surface datum of the floor.
The geometry data in a list or list of lists, or a filename.
The format for the geometry data.
The volume ratio of insoluble material within the salt.
Number of cells to use in the model.
The activity stages to simulate.
General title for the scenario.
The standoff distance of the lowest brine interface depth.
The units used in describing the scenario.
Default values for a subset of stage attributes, see
StageDefinition.valid_default_keys
.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:
- 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:
- 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()
- advanced: AdvancedOptions#
Advanced and/or uncommonly used options
- defaults: Dict[str, int | float | str]#
Default values for a subset of stage attributes, see
StageDefinition.valid_default_keys
.
- 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.
- stages: List[StageDefinition] = None#
The activity stages to simulate.