Class BaseModel#

Inheritance Relationships#

Derived Type#

Class Documentation#

class BaseModel#

A base model class.

Subclassed by Model

Public Functions

bool get_is_running(void)#

Is this model currently running?

Returns:

running status

int get_num_stages(void)#

Get the current number of stages.

Returns:

the number of stages

int get_current_stage(void)#

Get the current stage number.

Returns:

the stage number

double get_current_time(void)#

Get the current time.

Returns:

the time

double get_current_volume(void)#

Get the current cavern volume (in bbl)

Returns:

the volume

vector<Stage> get_stages(void)#

Get the stages object.

Returns:

vector of all stage definitions

void set_verbosity_level(int verb)#

Set the verbosity output level for cout/cerr.

Parameters:

verb – the verbosity level

void set_use_tstfile(bool use_file)#

Choose whether the .TST file should be written.

Parameters:

use_file – the choice

void set_use_outfile(bool use_file)#

Choose whether the .OUT file should be written.

Parameters:

use_file – the choice

Results get_results(void)#

Get the compelte results object.

Returns:

Results

Results get_current_state(void)#

Get the single-timestep state of the model in a Results object.

Returns:

Results object with single timestep of data.

Protected Functions

void save_results(Results &new_results)#

Save results in a results object.

Parameters:
  • new_results – the object to add to

  • to_file – output to files as well

void write_version_info(ofstream &sout)#

Add header information to a file.

Parameters:

sout – the file to write to

void write_daily_column_header(ofstream &sout)#

Initialize the TST file.

void write_daily_summary(ofstream &sout, int stage, bool inject)#

Write data to the TST file.

Parameters:
  • stage – the stage number

  • inject – whether this is injection or workover

void write_daily_end_of_phase(ofstream &sout, const char *text)#

Write end of phase to the TST file.

Parameters:

text – what to use as a prefix

void write_simulation_init(ofstream &sout)#

Output a stage initialization summary to a log file.

Parameters:

sout – the output stream to write to

void write_stage_init(ofstream &sout)#

Output a stage initialization summary to a log file.

Parameters:

sout – the output stream to write to

void write_stage_summary(ofstream &sout)#

Output a stage completion summary to a log file.

Parameters:

sout – the output stream to write to

void write_simulation_summary(ofstream &sout)#

Output a stage completion summary to a log file.

Parameters:

sout – the output stream to write to

void write_detailed_results(ofstream &sout)#

Protected Attributes

string prefix#

output file prefix

Results results#

results object

vector<Stage> stages#

simulation stages

Salt *salt = NULL#

salt properties object pointer

JetModel *jet_model = NULL#

the jet model object pointer

PlumeRise *plume_rise = NULL#

plume rise model object pointer

bool b_is_injecting = true#

is the stage injecting or static?

bool b_is_running = false#

continue running the timestep?

bool b_use_outfile = false#

create and use an .OUT file?

bool b_use_tstfile = false#

create and use a .TST file?

double abserr = 1.0e-2#

ODE solver: absolute tolerance.

double C_cavAve = 0.0#

average cavern brine sg

double C_inj#

specific gravity of injected water

double days = 0.0#

time: current loop time, in days

double dt = 0.1#

timestep size (h)

double dz = 0.0#

height of each cell

double err_cfac = 1.0#

convergence level

double h_inj = 0.0#

height: injection string EOT

double h_insol = 0.0#

height: of top of insolubles

double h_obi = 0.0#

height: initial OBI/blanket level

double h_prd = 0.0#

height: production string EOT

double h_max = 0.0#

height: total cavern height

double L_jet = 0.0#

jet model: jet length

double Q_fOld = 0.0#

oil fill: last timestep

double Q_fTot = 0.0#

oil fill: total volume

double Q_iOld = 0.0#

injection: last timestep

double Q_iTot = 0.0#

injection: total volume

double Q_out = 0.0#

out flow: rate

double Q_outBPD = 0.0#

out flow: rate in BPD

double r_inj0 = 0.0#

jet model: injection point radius

double relerr = 1.0e-4#

ODE solver: relative tolerance.

double slctim = 0.0#
double t_tot = 0.0#

time: total time, in hours

double timet = 0.0#

time: total time, in days

double u_inj0 = 0.0#

jet model: injection point velocity

double V_insol = 0.0#

volume: insolubles in cavern

double V_insolVent = 0.0#

volume: insolubles vented out

double V_tot = 0.0#

volume: total volume

double V_ullage = 0.0#

volume: ullage available

double V_usable = 0.0#

volume: total usable

double volRemoved = 0.0#

volume: volume salt removed

int injCell = 0#

cell containing the injection EOT

int izbs = 0#

current OBI cell index

int jetPlumeCell = 0#

cell containing top of plume

int n_nodes = 0#

number of nodes

int obiCell = 0#

cell containing the interface

int prodCell = 0#

production string EOT cell

int stageNum = 0#

the current stage number

int stepNum = 0#

current step number

int verbosity = 0#

verbosity setting for output

vector<double> akd_prt#

AKD for printing.

vector<double> amd_prt#

AMD for printing.

vector<double> C_cav#

cavern brine sg vector

vector<double> C_plume#

plume concentration vector

vector<double> C_tmp#

concentration

vector<double> ca_prt#

CA for printing.

vector<double> dC#

change in concentration between steps

vector<double> dr_prt#

delta radius (for output)

vector<double> f_dis_prt#

dissolution factor (for output)

vector<double> h_cav#

cell elevations from floor

vector<double> phi#

wall angle of the cell

vector<double> r_cav#

current cavern radius

vector<double> r_cav0#

initial cavern radius

vector<double> r_plume#

plume radius vector

vector<double> rcscr#
vector<double> tanTheta#

the tangent of the wall angle

vector<double> u_plume#

plume velocity vector

vector<double> V_injSigned#
vector<double> V_saltRemove#

volume salt removed

vector<double> x_incl#

wall angle factor

vector<double> z_cav#

cell measured depths

vector<int> f_disType#

dissolution regime indicator