MODFLOW-NWT Architecture#
Scope#
This page documents the software architecture of the modflownwt
flow backend as it is used from the project and simulation layers.
Architecture role#
modflow_nwt is the legacy MODFLOW-family flow backend in HydroModPy:
it is planned as one
("flow", "modflow_nwt")run by the simulation layer,it is dispatched through
solver.modflow_nwt.adapters.flow,it reuses the shared MODFLOW-family execution lifecycle in
solver.modflow_common.flow_adapter_helpers,it stays colocated with the
MT3DMSandMODPATHecosystem that depends on the same flow outputs.
Code path#
The shortest code-reading path for one flow/modflow_nwt run is:
hydromodpy/project/facade.pyhydromodpy/simulation/planning/planner.pyhydromodpy/simulation/execution/runner.pyhydromodpy/solver/modflow_nwt/adapters/flow.pyhydromodpy/solver/modflow_common/flow_adapter_helpers.pyhydromodpy/solver/modflow_nwt/nwt/nwt_solver.py
Main packages and responsibilities#
hydromodpy/solver/modflow_nwt/adapters/flow.pyowns only the backend-specific bridge from one genericProcessRunto oneModflowNwtinstance.hydromodpy/solver/modflow_common/flow_adapter_helpers.pyowns the shared MODFLOW-family execution lifecycle used by bothmodflownwtandmodflow6.hydromodpy/solver/modflow_commoncentralizes grid context, temporal discretization, routing helpers, runtime arrays, and raster export shared by both MODFLOW-family backends.hydromodpy/solver/modflow_nwt/nwt/nwt_config.pyvalidates the[modflownwt.*]configuration tree.hydromodpy/solver/modflow_nwt/nwt/flow_to_modflow_adapter.pytranslates HydroModPy runtime state into package-ready MODFLOW inputs.hydromodpy/solver/modflow_nwt/nwt/nwt_solver.pyowns concrete FloPy model creation, execution, and output shaping.hydromodpy/solver/modflow_nwt/modpathandhydromodpy/solver/modflow_nwt/mt3dmsstay next to the flow backend because they depend on the same legacy file contracts.
Mesh contract#
modflownwt currently stays on the structured sgrid path only.
process_simulation explicitly rejects runtime Gmsh meshes with this
backend, so [mesh_catchment] and [mesh_input] must be paired with
modflow6 or boussinesq instead.