mf6rtm package
Subpackages
Subpackages:
- mf6rtm.config package
- mf6rtm.io package
- Submodules
- mf6rtm.io.externalio module
RegeneratorRegenerator.add_m0_to_config()Regenerator.generate_equilibrium_phases_blocks()Regenerator.generate_exchange_phases_blocks()Regenerator.generate_kinetic_phases_blocks()Regenerator.generate_new_script()Regenerator.get_postfix_block()Regenerator.get_solution_blocks()Regenerator.read_external_files()Regenerator.read_phinp()Regenerator.regenerate_from_external_files()Regenerator.update_yaml()Regenerator.validate_external_files()Regenerator.write_new_script()
SelectedOutput
- Module contents
- mf6rtm.mup3d package
- Submodules
- mf6rtm.mup3d.base module
BlockChemStressEquilibriumPhasesExchangePhasesGasPhaseKineticPhasesMup3dMup3d.nameMup3d.wdMup3d.charge_offsetMup3d.databaseMup3d.solutionsMup3d.init_tempMup3d.equilibrium_phasesMup3d.kinetic_phasesMup3d.exchange_phasesMup3d.surfaces_phasesMup3d.postfixMup3d.phreeqc_rmMup3d.init_conc_array_phreeqcMup3d.sconcMup3d.phinpMup3d.componentsMup3d.fixed_componentsMup3d.nlayMup3d.nrowMup3d.ncolMup3d.nxyzMup3d.grid_shapeMup3d.generate_phreeqc_script()Mup3d.get_componenth2o()Mup3d.get_config()Mup3d.initialize()Mup3d.initialize_chem_stress()Mup3d.load_mup3d()Mup3d.run()Mup3d.save_config()Mup3d.save_mup3d()Mup3d.set_charge_offset()Mup3d.set_chem_stress()Mup3d.set_componenth2o()Mup3d.set_config()Mup3d.set_database()Mup3d.set_equilibrium_phases()Mup3d.set_exchange_phases()Mup3d.set_fixed_components()Mup3d.set_initial_temp()Mup3d.set_phases()Mup3d.set_postfix()Mup3d.set_reaction_temp()Mup3d.set_wd()Mup3d.write_external_files_layered()Mup3d.write_internal_parameters()Mup3d.write_simulation()
SolutionsSurfacesworking_dir()
- Module contents
Mup3dMup3d.nameMup3d.wdMup3d.charge_offsetMup3d.databaseMup3d.solutionsMup3d.init_tempMup3d.equilibrium_phasesMup3d.kinetic_phasesMup3d.exchange_phasesMup3d.surfaces_phasesMup3d.postfixMup3d.phreeqc_rmMup3d.init_conc_array_phreeqcMup3d.sconcMup3d.phinpMup3d.componentsMup3d.fixed_componentsMup3d.nlayMup3d.nrowMup3d.ncolMup3d.nxyzMup3d.grid_shapeMup3d.generate_phreeqc_script()Mup3d.get_componenth2o()Mup3d.get_config()Mup3d.initialize()Mup3d.initialize_chem_stress()Mup3d.load_mup3d()Mup3d.run()Mup3d.save_config()Mup3d.save_mup3d()Mup3d.set_charge_offset()Mup3d.set_chem_stress()Mup3d.set_componenth2o()Mup3d.set_config()Mup3d.set_database()Mup3d.set_equilibrium_phases()Mup3d.set_exchange_phases()Mup3d.set_fixed_components()Mup3d.set_initial_temp()Mup3d.set_phases()Mup3d.set_postfix()Mup3d.set_reaction_temp()Mup3d.set_wd()Mup3d.write_external_files_layered()Mup3d.write_internal_parameters()Mup3d.write_simulation()
- mf6rtm.simulation package
- Submodules
- mf6rtm.simulation.discretization module
- mf6rtm.simulation.mf6api module
- mf6rtm.simulation.phreeqcbmi module
- mf6rtm.simulation.solver module
- Module contents
- mf6rtm.utils package
- Submodules
- mf6rtm.utils.utils module
add_charge_flag_to_species_in_solution()concentration_l_to_m3()concentration_m3_to_l()concentration_to_massrate()concentration_volbulk_to_volwater()fill_missing_minerals()flatten_list()generate_equ_phases_block()generate_exchange_block()generate_kinetics_block()generate_solution_block()generate_surface_block()get_compound_names()get_indices()handle_block()map_species_property_to_grid()parse_equilibriums_dataframe()parse_kinetics_dataframe()prep_bins()rearrange_copy_blocks()solution_csv_to_dict()solution_df_to_dict()surfaces_csv_to_dict()
- Module contents
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_outputwith 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_datafrom 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