mf6rtm package

Subpackages

Subpackages:

Module contents

The MF6RTM (Modflow 6 Reactive Transport Model) package is a Python package for reactive transport modeling via the MODFLOW 6 and PhreeqcRM APIs.

class mf6rtm.Mf6API(wd, dll)

Bases: ModflowApi

property grid_type: str

Grid type of the ModFlow6 model

class mf6rtm.Mf6RTM(wd, mf6api, phreeqcbmi)

Bases: object

get_saturation_from_mf6()

Get the saturation

Parameters:

(modflowapi) (mf6)

Returns:

array

Return type:

dict[Any, ndarray]

get_time_units_from_mf6()

Function to get the time units from mf6

Return type:

str

is_reactive_tstep()

Check if the current timestep should be reactive based on configuration.

Returns:

True if current timestep should be reactive, False otherwise

Return type:

bool

print_warning_user_active()

Prints a warning if reaction timing is set to ‘user’.

set_emulator_output_add_variables()

Add emulator target and feature variables to the output.

Updates selected_output with variables defined in the configuration. Defaults to empty lists if not provided.

selected_output.target_var

Target variables for emulator training.

Type:

list of str

selected_output.feat_var

Feature variables for emulator training.

Type:

list of str

Return type:

None

set_emulator_training()

Configure emulator training output.

Reads emulator_training_data from the configuration. If enabled, sets up emulator output variables; otherwise disables training data.

ml_output

Whether emulator training data output is enabled.

Type:

bool

Return type:

None

set_kiter()
Return type:

int

set_time_conversion()

Function to set the time conversion factor

Return type:

None

solve()

Solve the model

Return type:

bool

class mf6rtm.PhreeqcBMI(yaml='mf6rtm.yaml')

Bases: BMIPhreeqcRM

get_grid_to_map()

Function to get grid to map

set_scalar(var_name, value)
mf6rtm.run_cmd(cwd=None)

Console entrypoint compatibility wrapper.

When used as a console script the entrypoint calls mf6rtm:run_cmd with no arguments. Allow cwd to be optional and default to the current working directory.

Return type:

None

mf6rtm.solve(wd, reactive=None, nthread=1, libname=None)

Wrapper to prepare and call solve functions

Return type:

bool