# modflow-org/modflow6-examples architecture

> Architecture diagram of the GitHub repository modflow-org/modflow6-examples, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/modflow-org/modflow6-examples
- Repository: https://github.com/modflow-org/modflow6-examples

## Overview

MODFLOW 6 Examples is a collection of FloPy-based scenario scripts that build, run, and post-process groundwater-flow, transport, heat-transport, and particle-tracking models. Users select an example script; the scripts produce model inputs and results such as plots. The README documents these shared capabilities, while sampled scripts show model construction, execution, and plotting. Individual scenarios are largely independent. Some unsampled scripts are represented by their exact paths; the graph does not infer calls between them. The documentation-table script is included as a repository core module, not as part of the modeling workflow.

Main entry points: [`scripts`](https://github.com/modflow-org/modflow6-examples/tree/develop/scripts) (Flow Scenarios)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_flow["Groundwater Flow"]
  node_flow_examples["Flow Scenarios"]
  node_csub["Compaction<br/>[ex-gwf-csub-p03.py]"]
  node_curvilinear["Curvilinear Grids"]
  node_curvilinear90["Rotated Grid"]
  node_radialflow["Radial Flow<br/>[ex-gwf-rad-disu.py]"]
  node_sagehen["Sagehen Basin<br/>[ex-gwf-sagehen.py]"]
  node_sfr["Stream Routing<br/>[ex-gwf-sfr-p01b.py]"]
end

subgraph group_transport["Transport Models"]
  node_transport_examples["Transport Scenarios"]
  node_adv_schemes["Advection Schemes"]
  node_coupled_domains["Coupled Domains"]
  node_hecht["Hecht Mendez"]
  node_synthetic_valley["Synthetic Valley"]
end

subgraph group_heat["Heat Transport"]
  node_heat_examples["Heat Scenarios"]
  node_geotherm["Geothermal Flow<br/>[ex-gwe-geotherm.py]"]
  node_radialheat["Radial Heat<br/>[ex-gwe-radial.py]"]
end

subgraph group_particles["Particle Tracking"]
  node_prt_examples["Particle Tracking"]
  node_prt01["MP7 Scenario 1<br/>[ex-prt-mp7-p01.py]"]
  node_prt02["Refined Grid<br/>[ex-prt-mp7-p02.py]"]
  node_prt04["MP7 Scenario 4<br/>[ex-prt-mp7-p04.py]"]
end

subgraph group_support["Example Support"]
  node_doc_tables["Documentation Tables"]
end

node_user(("Example User"))
node_mf6{{"MODFLOW 6"}}
node_model_outputs["Model Results"]

node_user -->|"selects scenario"| node_flow_examples
node_user -->|"selects scenario"| node_transport_examples
node_user -->|"selects scenario"| node_heat_examples
node_user -->|"selects scenario"| node_prt_examples
node_flow_examples -.->|"runs models"| node_mf6
node_transport_examples -.->|"runs models"| node_mf6
node_heat_examples -->|"runs models"| node_mf6
node_prt_examples -->|"runs models"| node_mf6
node_flow_examples -.->|"post-processes results"| node_model_outputs
node_transport_examples -.->|"post-processes results"| node_model_outputs
node_heat_examples -->|"plots results"| node_model_outputs
node_prt_examples -->|"plots results"| node_model_outputs

click node_flow_examples "https://github.com/modflow-org/modflow6-examples/tree/develop/scripts"
click node_csub "https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-gwf-csub-p03.py"
click node_curvilinear "https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-gwf-curvilinear.py"
click node_curvilinear90 "https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-gwf-curvilinear-90.py"
click node_radialflow "https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-gwf-rad-disu.py"
click node_sagehen "https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-gwf-sagehen.py"
click node_sfr "https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-gwf-sfr-p01b.py"
click node_transport_examples "https://github.com/modflow-org/modflow6-examples/tree/develop/scripts"
click node_adv_schemes "https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-gwt-adv-schemes.py"
click node_coupled_domains "https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-gwt-gwtgwt-p10.py"
click node_hecht "https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-gwt-hecht-mendez.py"
click node_synthetic_valley "https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-gwt-synthetic-valley.py"
click node_heat_examples "https://github.com/modflow-org/modflow6-examples/tree/develop/scripts"
click node_geotherm "https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-gwe-geotherm.py"
click node_radialheat "https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-gwe-radial.py"
click node_prt_examples "https://github.com/modflow-org/modflow6-examples/tree/develop/scripts"
click node_prt01 "https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-prt-mp7-p01.py"
click node_prt02 "https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-prt-mp7-p02.py"
click node_prt04 "https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-prt-mp7-p04.py"
click node_doc_tables "https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/create-doc-tables.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_flow_examples,node_csub,node_curvilinear,node_curvilinear90,node_radialflow,node_sagehen,node_sfr,node_user toneBlue
class node_transport_examples,node_adv_schemes,node_coupled_domains,node_hecht,node_synthetic_valley toneAmber
class node_heat_examples,node_geotherm,node_radialheat toneMint
class node_prt_examples,node_prt01,node_prt02,node_prt04 toneRose
class node_doc_tables,node_mf6,node_model_outputs toneIndigo
```

## Components

### Groundwater Flow

- [Flow Scenarios](https://github.com/modflow-org/modflow6-examples/tree/develop/scripts): `scripts`
- [Compaction](https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-gwf-csub-p03.py): `scripts/ex-gwf-csub-p03.py`
- [Curvilinear Grids](https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-gwf-curvilinear.py): `scripts/ex-gwf-curvilinear.py`
- [Rotated Grid](https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-gwf-curvilinear-90.py): `scripts/ex-gwf-curvilinear-90.py`
- [Radial Flow](https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-gwf-rad-disu.py): `scripts/ex-gwf-rad-disu.py`
- [Sagehen Basin](https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-gwf-sagehen.py): `scripts/ex-gwf-sagehen.py`
- [Stream Routing](https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-gwf-sfr-p01b.py): `scripts/ex-gwf-sfr-p01b.py`

### Transport Models

- [Transport Scenarios](https://github.com/modflow-org/modflow6-examples/tree/develop/scripts): `scripts`
- [Advection Schemes](https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-gwt-adv-schemes.py): `scripts/ex-gwt-adv-schemes.py`
- [Coupled Domains](https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-gwt-gwtgwt-p10.py): `scripts/ex-gwt-gwtgwt-p10.py`
- [Hecht Mendez](https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-gwt-hecht-mendez.py): `scripts/ex-gwt-hecht-mendez.py`
- [Synthetic Valley](https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-gwt-synthetic-valley.py): `scripts/ex-gwt-synthetic-valley.py`

### Heat Transport

- [Heat Scenarios](https://github.com/modflow-org/modflow6-examples/tree/develop/scripts): `scripts`
- [Geothermal Flow](https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-gwe-geotherm.py): `scripts/ex-gwe-geotherm.py`
- [Radial Heat](https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-gwe-radial.py): `scripts/ex-gwe-radial.py`

### Particle Tracking

- [Particle Tracking](https://github.com/modflow-org/modflow6-examples/tree/develop/scripts): `scripts`
- [MP7 Scenario 1](https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-prt-mp7-p01.py): `scripts/ex-prt-mp7-p01.py`
- [Refined Grid](https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-prt-mp7-p02.py): `scripts/ex-prt-mp7-p02.py`
- [MP7 Scenario 4](https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/ex-prt-mp7-p04.py): `scripts/ex-prt-mp7-p04.py`

### Example Support

- [Documentation Tables](https://github.com/modflow-org/modflow6-examples/blob/develop/scripts/create-doc-tables.py): `scripts/create-doc-tables.py`

### Other components

- **Example User**
- **MODFLOW 6**
- **Model Results**

## Connections

- Example User → Flow Scenarios: selects scenario
- Example User → Transport Scenarios: selects scenario
- Example User → Heat Scenarios: selects scenario
- Example User → Particle Tracking: selects scenario
- Flow Scenarios → MODFLOW 6: runs models
- Transport Scenarios → MODFLOW 6: runs models
- Heat Scenarios → MODFLOW 6: runs models (evidence: `scripts/ex-gwe-radial.py`)
- Particle Tracking → MODFLOW 6: runs models (evidence: `scripts/ex-prt-mp7-p02.py`)
- Flow Scenarios → Model Results: post-processes results
- Transport Scenarios → Model Results: post-processes results
- Heat Scenarios → Model Results: plots results (evidence: `scripts/ex-gwe-radial.py`)
- Particle Tracking → Model Results: plots results (evidence: `scripts/ex-prt-mp7-p02.py`)
