πŸ’§ IGW-NET Β· Quick Tutorial 31 of 31

Tutorial 31: Variable-Density Flow & Realtime Multi-Species Transport (SEAWAT / MODFLOW-6)

Simulate coupled flow and reactive transport with density effects (saltwater intrusion, brine plumes) using SEAWAT or MODFLOW-6. Covers realtime multi-species transport with transient flow β€” the transient-flow counterpart to Tutorial 30.

IGW-NET Tutorial 31 Prereq: MAGNET4WATER account, completed Tutorial 5 (Contaminant Transport) 13 sections

This tutorial covers

  1. Overview β€” Why Density Flow Matters
  2. Concept β€” Coupled Flow and Transport
  3. Enable Density Flow in Solver Options
  4. SEAWAT Solver Parameters
  5. MODFLOW-6 Solver Parameters
  6. Benchmark β€” The Henry Problem
  7. Real-World Case Study β€” Salinas Valley
  8. Realtime Multi-Species Transport

1Overview β€” Why Density Flow Matters

Most groundwater models assume water has constant density β€” one kg/mΒ³ worth of freshwater anywhere. But in coastal aquifers, brine pockets, or around dense contaminant plumes, density differences drive flow on their own. Freshwater floats on saltwater. Dense plumes sink. Pumping near a coast can pull a saltwater wedge inland.

The physics: Without density coupling, a groundwater model assumes hydraulic head drives all flow. With density coupling, the pressure contribution from denser fluid also drives flow β€” independently of any external gradient. SEAWAT and MODFLOW-6 solve this by iterating between a flow solver and a transport solver at every time step: flow gives velocities β†’ transport updates concentrations β†’ concentrations update fluid density β†’ density feeds back into flow. The coupling can be explicit (one-step lag) or iterative (Picard convergence per step).

What this tutorial covers

You'll learn how to:

  • Enable Density Flow in IGW-NET via the Solver Options dialog
  • Choose between SEAWAT V4 (older USGS, 2012) and MODFLOW-6 density solvers
  • Run the classic Henry Problem benchmark for saltwater intrusion
  • Work with a real-world case (Salinas Valley, California) showing pumping-induced intrusion
  • Use the Realtime Multi-Species Transport interface (coupled with transient flow) β€” contrasted with the post-analysis alternative in Tutorial 30
  • Assign species properties per zone via ZoneAttr

How this fits with other tutorials

This tutorial sits at the top of the transport stack. If you're new to contaminant transport in IGW-NET, walk this path in order:

  1. Tutorial 1 β€” Steady 2D Flow for basic model setup
  2. Tutorial 5 β€” Contaminant Transport for single-species transport
  3. Tutorial 29 β€” MT3D Advection Solvers for engine choice
  4. Tutorial 30 β€” MT3DMS Multi-Species (Post-Analysis) for steady-flow reactive chains
  5. This tutorial β€” for transient-flow, density-coupled, realtime reactive transport

You'll also want Tutorial 17 β€” Monte Carlo Transport if uncertainty quantification matters for your problem.

For conceptual background, see the IGW-NET Users' Reference Manual β€” particularly chapters on transport and variable-density flow. The Pinder Beginner's Manual has a gentler introduction to the underlying physics.
Prerequisite software knowledge: You should already be comfortable building a MODFLOW-based groundwater model in IGW-NET. If not, launch the live app at magnet4water.net/igwnet and work through Tutorials 1–5 first.

2Concept β€” Coupled Flow and Transport

Before touching the interface, understand what the solver actually does.

Variable-density flow is a two-way coupling

At every time step, the simulator alternates between solving flow and solving transport:

  1. Solve flow for a given density field β†’ produces heads and velocities
  2. Solve transport using those velocities β†’ produces updated concentrations
  3. Update density from the new concentration field (typically via a linear density–concentration law, e.g., +0.000714 kg/mΒ³ per ppm TDS)
  4. Go to step 1 with the new density field

Two coupling strategies

  • Explicit coupling (one-step lag) β€” flow and transport are solved once per time step with the density field from the previous step. Fast but can drift if density gradients are strong.
  • Iterative coupling (Picard) β€” the flow-transport cycle is repeated within each time step until density stops changing. Slower but stable for strong gradients.
Why the coupling matters for your timestep choice: The density change must be large enough during one timestep to actually induce flow changes (otherwise the coupling is trivial). But the timestep must be short enough that the flow field can be recalculated before the density changes too much. This is why variable-density simulations often have shorter timesteps than constant-density transport.

Two implementations in IGW-NET

EngineOriginStrengthsWeaknesses
SEAWAT V4USGS, 2012 (older but widely validated)Multiple coupling modes; proven on literature benchmarks; BCF/LPF package support; many flow solver choices (PCG, DE4, GMG, SIP, SOR)Legacy codebase; known instability on some configurations; less active maintenance
MODFLOW-6USGS, 2017+ (modern replacement)Cleaner architecture; XT3D dispersion; IMS6 solver; actively maintained; better convergence behaviorFewer legacy options; some specific features differ from classic SEAWAT
Practical guidance: Start with MODFLOW-6 unless you have a specific reason to use SEAWAT (legacy model comparison, publication reproducibility, specific coupling mode). MF6 tends to converge more reliably and is the direction USGS is maintaining.

3Enable Density Flow in Solver Options

Variable-density flow is not a default. You must explicitly turn it on, and you must make sure the flow and transport engines are compatible.

Step 1 β€” Open the Solver Options dialog

  • Expand Conceptual Model Tools and click DomainAttr
  • Switch to the Simulation Settings tab
  • Click Solver Options

Step 2 β€” Select the compatible engines

In the Solver Options dialog, check the following:

  1. Flow solver: select ModFlow (not the internal Magnet Flow solver β€” variable-density coupling requires MODFLOW).
  2. Transport solver: select MT3D. For background on why and when to switch from Magnet Transport to MT3D, see Tutorial 29 β€” MT3D Advection Solvers.
  3. Density Flow: check the box. Then click Edit SWT Solver to configure parameters.
Solver Options dialog with red circles highlighting ModFlow selected with Edit MF Solver MT3D selected with Edit MT3D Solver and Density Flow checkbox with Edit SWT Solver Starting Head set to 0 Max DEM+this value selected
The Solver Options dialog with density flow enabled. Three things are active: ModFlow (flow), MT3D (transport), and Density Flow (with its own SWT solver parameters). These three settings must all be consistent β€” selecting Magnet Flow or Magnet Transport will disable density coupling.
If "Density Flow" is greyed out, you haven't set ModFlow or MT3D as the engines. Density coupling is only available when both are active. The Starting Head value also needs to be set; use "Max DEM+this value" if you want the simulation to begin above the land surface for a wet initial condition.

4SEAWAT Solver Parameters

Click Edit SWT Solver in Solver Options to open the density-flow parameter dialog. At the top, select Mode: SEAWAT (the other option is MODFLOW-6, covered in the next section).

SEAWAT Solver dialog with Mode SEAWAT circled showing Advective transport solver using parameters from the MT3D Solver interface Flow solver SEAWAT supports BCF and LPF MODFLOW packages with PCG DE4 GMG SIP and SOR solvers Density flow parameters Flow and transport coupling explicit one-substep lag in transport Initial transport substep 0.01 days Conductance scheme for density calcs upstream Apply variable-density water table corrections Min density 0 Max density 0 Reference pressure head 0 meters Slope of density-pressure line 0 Density-concentration relationship Slope of density-concentration line 0.000714 Reference density 1000 Reference concentration 0
SEAWAT Solver parameters. The key fields are Flow/transport coupling mode, initial transport substep, density-concentration slope, and reference density. The default slope (0.000714 kg/mΒ³/ppm) and reference density (1000 kg/mΒ³) produce seawater density (β‰ˆ1024.99 kg/mΒ³) at 35,000 ppm β€” matches physical seawater.

Key parameters explained

  • Flow and transport coupling β€” "explicit (one-substep lag)" is the default and fastest. Switch to iterative if you see instability or strong density gradients.
  • Initial transport substep (days) β€” first substep MT3D tries. Leave at 0.01 unless you have stability problems.
  • Conductance scheme for density calcs β€” upstream (default) vs. central-in-space. Upstream is more stable; central-in-space is slightly more accurate for slow flows.
  • Apply variable-density water table corrections β€” enable this if your model has a free water table where density varies across the interface. Corrects for the hydrostatic pressure effect.
  • Density-concentration relationship β€” linear, defined by slope. 0.000714 kg/mΒ³ per ppm is the standard value for NaCl solutions.
  • Reference density / concentration β€” the baseline from which density is computed. Keep at 1000 kg/mΒ³ / 0 ppm for freshwater-at-0 as the zero point.
Alternative: provide a known (C, ρ) pair instead of the slope. Select the Known concentration radio and enter, e.g., 35000 ppm β†’ 1024.99 kg/mΒ³. IGW-NET will back-calculate the slope automatically. Useful when your lab data gives you one end-point rather than a slope.

5MODFLOW-6 Solver Parameters

MODFLOW-6 is the modern USGS replacement for SEAWAT. The interface offers cleaner density coupling and better numerical methods for dispersion.

SEAWAT Solver dialog with MODFLOW-6 mode selected circled showing Advective transport solver FDM standard finite-difference method FDM weighting scheme upstream Dispersion options Complete XT3D formulation Flow solver MODFLOW-6 requires the NPF package with the IMS6 solver Density flow parameters Flow and transport coupling explicit one-substep lag in transport Number of substeps 10 add off-diagonal terms to the right-hand IMS6 solver parameters
MODFLOW-6 mode in the same SEAWAT Solver dialog. Note the XT3D dispersion formulation option and the IMS6 solver. The density parameters (slope, reference density, reference concentration) work identically to SEAWAT mode.

What differs from SEAWAT

  • Advective transport solver β€” MF6 ships with FDM (standard finite-difference) by default. The MOC/MMOC/HMOC/ULTIMATE schemes available in classic MT3D are not in MF6's transport model.
  • Dispersion options β€” "Complete XT3D formulation" gives you proper anisotropic dispersion on unstructured grids. If you're doing 2D structured-grid work, this is overkill but harmless.
  • Number of substeps β€” controls how many flow-transport iterations happen per outer step. 10 is a reasonable default.
  • Off-diagonal terms to right-hand side β€” a numerical trick for reducing matrix asymmetry. Don't enable unless you have a specific convergence problem it solves.
  • IMS6 solver β€” MODFLOW-6's native iterative solver. Configure via ... button if defaults don't converge.
When MF6 is the right choice: unstructured grids, XT3D dispersion, or if you're starting fresh and want the actively-maintained engine. See Tutorial 21 β€” Unstructured Grid Setup for building unstructured models.

6Benchmark β€” The Henry Problem

The Henry Problem (Henry, 1964) is the standard validation case for saltwater intrusion simulators. Every variable-density code ever written has been run against it. It's the "Hello World" of coupled flow–transport.

Setup

  • A vertical slice of aquifer (2D cross-section)
  • Isotropic, homogeneous, confined
  • Constant freshwater flux on the inland (left) boundary
  • Seaward (right) boundary exposed to saltwater (35,000 ppm, density 1025 kg/mΒ³)
  • Top and bottom are no-flow

The expected result: a classical saltwater wedge intrudes from the seaward boundary, with its toe position determined by the freshwater flux rate. Higher flux β†’ wedge pushed back out to sea. Lower flux or pumping β†’ wedge migrates inland.

Henry Problem implemented in MAGNET showing the plan view of the model and a cross section in MODFLOW-6 mode with a colored plume representing the saltwater wedge intruding from the right seaward boundary Freshwater labeled on the left Saltwater on the right
Henry Problem as implemented in IGW-NET with MODFLOW-6. The colored zone is the saltwater wedge β€” notice how the interface is not a sharp line but a dispersive transition zone tilted by the buoyant gradient.
Running the Henry Problem yourself: build a rectangular domain with grid NX=22, 10 sublayers, set freshwater constant-head on the left, saltwater constant-head on the right, enable Density Flow with default SEAWAT or MF6 parameters, and simulate for ~0.1 days. The wedge develops within a few simulated hours.
Why this problem is still used in 2026: Henry's original solution was semi-analytical. It validates both the flow-transport coupling and the dispersive smoothing of the interface. If your variable-density code reproduces the Henry wedge toe position to within ~5%, you've validated the coupling. If not, something is wrong β€” usually the density slope, the coupling mode, or the timestep.

7Real-World Case Study β€” Salinas Valley

Henry's toy problem is nice, but the point is modeling real aquifers. Salinas Valley, California is a classic saltwater intrusion site: a coastal agricultural valley where decades of pumping have drawn seawater inland from Monterey Bay.

Google Maps terrain view of Salinas Valley California with model domain outlined in red showing Marina Salinas Monterey Bay Carmel Valley coastal cities stretching from Monterey Bay southeast through Gonzales Soledad King City to San Ardo with a yellow reference line following the valley axis
Salinas Valley, California. The red polygon marks the model domain; the yellow line is the valley axis. Saltwater intrusion is most severe in the Marina/Castroville area at the north end (Monterey Bay coast) and has progressed several kilometers inland since the 1940s due to agricultural pumping.

What the model shows

The Salinas Valley model is built the same way as any IGW-NET model β€” import a DEM, build a conceptual model, define zones, wells, and river boundaries. The difference is that it's run with Density Flow enabled so the saltwater wedge migrates realistically with pumping scenarios.

Scenarios to explore:

  • Baseline β€” current pumping; watch where the wedge equilibrates over decades
  • Reduced pumping β€” cut extraction by X%; see how fast the wedge retreats
  • Managed aquifer recharge β€” add injection wells inland of the coast; see the hydraulic barrier effect
For your own coastal problem: use DataNET to preprocess your DEM, geological layers, and boundary conditions, then import into IGW-NET via Tutorial 27 β€” DataNET Groundwater Model. The density-flow workflow is the same whether your grid came from DataNET or was built manually.

8Realtime Multi-Species Transport

Now the other major feature of this tutorial: Realtime Multi-Species Transport β€” reactive transport with multiple species, fully coupled with transient flow, inside the main simulation loop.

Realtime vs. Post-Analysis β€” which to use?

IGW-NET offers two ways to run multi-species reactive transport. Same chemistry options, same species definitions, but different execution contexts:

Realtime (this tutorial)Post-Analysis (Tutorial 30)
FlowTransient, coupled in each timestepSteady-state or snapshot from last flow step
When usedTransient flow driving reactive transport (pumping schedules, seasonal recharge, density coupling)Quick iteration on chemistry for a fixed flow field
Where configuredSolver Options (main simulation)Analysis Tools β†’ Post Analysis β†’ Multiple Species Transport
Cost per runHigher (re-solves flow every step)Lower (flow is reused)
Density couplingYes β€” can combine with SEAWAT/MF6No β€” uses pre-computed flow field
Rule of thumb: if the flow field is changing over the simulation (pumping schedules, seasonal variation, density feedback from the plume itself), use realtime. If you're iterating on reaction kinetics and the flow field is stable, use post-analysis β€” it's dramatically faster. See Tutorial 30 for the full post-analysis workflow.

What the two share

Both realtime and post-analysis use the same chemistry infrastructure:

  • Same processes: linear sorption, first-order sorption, dual-domain mass transfer
  • Same chemical reactions: first-order rate, zero-order, Monod kinetic, first-order chain
  • Same reaction model templates: BTEX Instant Aerobic, BTEX Kinetic with Multiple EAs, PCE Sequential Decay, PCE/TCE aerobic/anaerobic, Single-pair Instant EA/ED
Reaction Models listing BTEX Instant Aerobic Decay BTEX Kinetic Decay PCE Sequential Decay PCE/TCE decay aerobic anaerobic Single pair instantaneous EA/ED
Built-in reaction model templates — identical between realtime and post-analysis. Each template pre-configures species and their interactions (e.g., PCE Sequential Decay wires up the PCE→TCE→DCE→VC chain with stoichiometric yield coefficients).

9Configure Realtime Multi-Species

The interface is structurally the same as Tutorial 30's post-analysis dialog, but you access it from Solver Options, not from the Analysis menu.

Step 3 β€” Enable MT3D in Solver Options

You've already done this if you followed Section 3 above. If not: DomainAttr β†’ Simulation Settings β†’ Solver Options β†’ enable MT3D. Then click Edit MT3D Solver and configure the multi-species options within.

Step 4 β€” Choose Process / Reaction / Template

Exactly as in Tutorial 30, three dropdowns govern the chemistry:

Three overlapping Multiple Species Transport dialogs showing Processes dropdown with Linear sorption 1st-order sorption Dual-domain mass transfer options Chemical reactions dropdown with 1st-order rate reactions Zero-order reactions Monod kinetic reactions 1st-order chain reactions and Reaction models dropdown with BTEX Instant Aerobic Decay BTEX Kinetic Decay using Multiple EAs PCE Sequential Decay PCE/TCE Decay aerobic anaerobic Single pair instant EA/ED
Three dropdowns control the chemistry: Processes (transport mechanism), Chemical reactions (decay kinetics), and Reaction models (pre-built templates). These are the same choices as in Tutorial 30's post-analysis dialog.

Step 5 β€” Build/Edit defaults

Click Build/Edit to define each species' default properties (initial concentration, retardation, decay rate). These defaults apply wherever you haven't explicitly overridden them per-zone.

Build Edit dialog with Set defaults for species input
Build/Edit configures default species properties (initial concentration, recharge concentration, molecular diffusion, retardation factor, first-order decay coefficient).
For details on the 3 use cases (predefined templates vs. user-defined species vs. custom chain reactions), see Section 5 of Tutorial 30. The patterns are identical between realtime and post-analysis.

10Assign Species Properties to Zones

Here's a feature unique to realtime multi-species: per-zone species overrides. You can specify different initial concentrations, reaction rates, or retardation factors in different parts of the model β€” all within the main simulation loop.

Step 6 β€” Open ZoneAttr

Click a zone on the map (or right-click and choose Edit Zones), then switch to the Biochemical tab in the Zone Properties dialog.

Step 7 β€” Check "multiple Species" and edit per-species

At the bottom of the Biochemical tab, check multiple Species and click Edit multiple Species Property to open the per-species editor for this zone.

ZoneAttr BioChemical Properties dialog showing Retardation Partitioning section with Retardation Factor 1 Partitioning Kd 0 Soil Particle Density 2650000 g per m3 Reactive Decay section with First Decay Coefficient 0 Half Life 0 and at the bottom multiple Species checkbox is checked and circled with Edit multiple Species Property button visible
The zone Biochemical tab. The multiple Species checkbox at the bottom is the gateway to per-zone species overrides β€” initial concentrations, decay rates, retardation factors, all per-species within this specific zone.

Typical per-zone workflows

  • Source zone β€” set initial PCE concentration to 100 ppm, leave TCE/DCE/VC at 0 (they'll appear only as daughter products of the decay chain).
  • Treatment zone β€” specify an accelerated decay rate to represent soil amendments or in-situ chemical oxidation.
  • Tight clay lens β€” specify high retardation factor to represent matrix diffusion that the overall dual-domain model doesn't capture.
  • Seaward coast (in combination with density flow) β€” set constant saltwater concentration as a boundary condition.
This is where realtime shines over post-analysis: per-zone species overrides are tightly integrated with the ZoneAttr system you already use for flow and transport. You don't leave the zone editor to set species properties β€” it's right there alongside retardation and decay.

11Run the Simulation and View Results

Step 8 β€” Simulate

Click Simulate. With density flow + multi-species + transient flow all active, this is the heaviest IGW-NET simulation you can run. Expect it to be slower than a standalone transport run β€” SEAWAT is solving flow, MT3D is solving transport, and the coupling runs multiple times per step. For a modest 2D model, expect a few minutes; for large 3D models with chain reactions, expect tens of minutes.

Progress monitoring: the status bar shows current timestep and convergence behavior. If you see "0/1 iters" repeatedly on SEAWAT, convergence has stalled β€” see the Challenges section below.

Step 9 β€” Visualize results

While the simulation runs and after it completes, use any of these tools to visualize:

  • Map view β€” default; shows head contours + concentration colormap. Select species and time via top-bar dropdowns.
  • Cross-section β€” click Analysis β†’ X-Section, draw a line on the map. Essential for seeing the saltwater wedge in vertical section.
  • Display Charts β€” breakthrough curves at monitoring wells, plotted as time series for each species.
  • 3D visualization β€” see Tutorial 25 β€” 3D Flow Visualization to render the plume in 3D with head contours.

Uncertainty quantification

If your rate coefficients, boundary concentrations, or recharge rates are uncertain, wrap the whole workflow in Monte Carlo simulation β€” see Tutorial 17 β€” Monte Carlo Transport. The realtime multi-species setup works inside the MC loop just like any other simulation.

12Challenges and Best Practices

Density-flow + reactive-transport is the most numerically demanding workflow in IGW-NET. Here's what can go wrong and how to handle it.

SEAWAT instability

The USGS SEAWAT V4 executable has known stability issues on certain configurations β€” convergence stalls, NaN propagation, or runaway iterations. Symptoms include:

  • Simulation hangs on one timestep with high iteration count
  • Concentrations explode to unphysical values (10⁹ ppm or similar)
  • Heads go NaN and the whole solve fails

Workarounds:

  1. Switch to MODFLOW-6 in the SWT Solver dialog. Its density coupling is better-behaved and it's the path USGS is actively maintaining.
  2. Switch flow-transport coupling from explicit to iterative (Picard) in the SWT dialog.
  3. Lower the initial transport substep (try 0.001 instead of 0.01).
  4. Increase Max Iteration in the MT3D solver settings.

Timestep sensitivity

Variable-density flow requires timesteps that are just right:

  • Too long β†’ density changes too much between flow updates; the one-step lag becomes inaccurate; solver may diverge
  • Too short β†’ each step shows no meaningful density-driven flow change; simulation is wastefully slow

Start with a timestep around Ξ”t β‰ˆ (cell size) / (10 Γ— flow velocity). If it converges cleanly, try larger steps. If it's unstable, halve the timestep and try again.

Initial conditions matter

Because density coupling is sensitive, a bad initial condition can make the first few timesteps unstable. For saltwater intrusion problems:

  • Start with a known-steady-state density distribution (run a long initialization run with density coupling enabled, save, reload)
  • Or start with uniformly fresh water and let the saltwater boundary propagate the wedge naturally β€” this is slower but more stable
Diagnostic workflow when things go wrong:
  1. Does the flow alone converge? Disable Density Flow and MT3D; run flow only.
  2. Does transport alone converge? Disable Density Flow; run MT3D + flow without coupling.
  3. Does density alone converge with a single species? Re-enable Density Flow but set to a single conservative tracer.
  4. Add chain reactions last.
Build complexity incrementally. If step 3 works and step 4 doesn't, the problem is in the chemistry setup β€” not in the density coupling.

13Where to Go Next

You've now covered the full transport stack in IGW-NET. A few cross-reference directions depending on what you want to build:

Other IGW-NET Quick Tutorials

Reference material

Other platforms

  • DataNET β€” geospatial data preparation (DEMs, boreholes, interpolation)
  • SwaNET β€” watershed-scale surface-water modeling (SWAT-based)
  • StormNET β€” stormwater modeling (SWMM-based)
  • ConduitNET β€” water distribution network modeling (EPANET-based)

External documentation

Launch the live platform: magnet4water.net/igwnet to try these workflows on your own data. If you're working on a classroom assignment or publication, the account system lets you save, share, and publish models.