MODFLOW 6 Architecture#
Scope#
This page documents the software architecture of the modflow6
flow backend as it is used from the project and simulation layers.
Architecture role#
modflow6 is the modern MODFLOW-family backend in HydroModPy:
it is planned as one
("flow", "modflow6")run by the simulation layer,it is dispatched through
solver.modflow6.adapters.flow,it reuses the shared MODFLOW-family execution lifecycle in
solver.modflow_common.flow_adapter_helpers,it builds the concrete numerical model in
hydromodpy.solver.modflow6.
Code path#
The shortest code-reading path for one flow/modflow6 run is:
hydromodpy/project/facade.pyhydromodpy/simulation/planning/planner.pyhydromodpy/simulation/execution/runner.pyhydromodpy/solver/modflow6/adapters/flow.pyhydromodpy/solver/modflow_common/flow_adapter_helpers.pyhydromodpy/solver/modflow6/modflow6.py
Main packages and responsibilities#
hydromodpy/solver/modflow6/adapters/flow.pyowns only the backend-specific bridge from one genericProcessRunto oneModflow6instance.hydromodpy/solver/modflow_common/flow_adapter_helpers.pyowns the shared flow lifecycle once a concrete MODFLOW-family solver object exists: preprocessing, compatibility pickle, processing, and postprocessing.hydromodpy/solver/modflow_commoncentralizes grid context, temporal discretization, routing helpers, runtime arrays, and raster export shared by both MODFLOW-family backends.hydromodpy/solver/modflow6/modflow6_config.pyvalidates the[modflow6.*]configuration tree.hydromodpy/solver/modflow6/property_mapping.pyresolves HydroModPy flow properties into MF6-ready arrays.hydromodpy/solver/modflow6/flow_to_modflow_adapter.pytranslates the normalized runtime payload into FloPy package inputs.hydromodpy/solver/modflow6/modflow6.pyowns concrete FloPy model creation, execution, and output shaping.hydromodpy/solver/modflow6/postprocess.pyanddiagnostics.pyread solver outputs back into HydroModPy products.
Mesh contract#
modflow6 is the MODFLOW-family backend currently compatible with both:
the structured
sgridpath,runtime Gmsh meshes injected through
[mesh_catchment]or[mesh_input]inprocess_simulation.
That makes it the bridge between the shared MODFLOW postprocess/tooling stack and the newer runtime catchment-mesh workflow.