SAMG for groundwater simulation
Mesh-Agnostic yet fast
SAMG is a very efficient linear solver library based on algebraic multigrid (AMG) specifically developed for industrial applications. SAMG supports both serial and multi-core computations on single PCs, workstations or compute nodes.
LMG is an interface linking the SAMG library to MODFLOW. There are two versions of LMG: LMG-2kx supports MODFLOW-2000 and MODFLOW-2005 whereas LMG-USG supports MODFLOW-USG.
Key Features of SAMG:
- State-of-the-art AMG performance – applicable for structured and unstructured meshes.
- Optimized solver control including automated-setup-reuse and switching between different solvers.
- Supports both multi-core and multi-node systems.
Advantages for MODFLOW:
- „Big Models“: Allows increased modeling accuracy for both structured and unstructured models (as in MODFLOW-USG), while keeping compute times manageable.
- Handles strongly heterogeneous and unstructured models where standard solvers have problems. No additional knowledge about solvers needed.

The two graphs show compute times for solving a single linear system from a steady-state stress period. Both the MODFLOW-USG and the MODFLOW-2005 model have the same numerical grid with roughly 1 Mio. grid-cells. In MODFLOW-2005 the PCG solver was able to use information on the matrix structure resulting from the known structure of the numerical grid, which is no longer possible for MODFLOW-USG. For this particular model PCG did not converge in a reasonable amount of time. The xMD solver converged, although it was much slower than the PCG solver for the MODFLOW-2005 model.
Hence, LMG’s capability to handle unstructured grids natively results in an even larger speed-up compared with the standard MODFLOW solvers in MODFLOW-USG than it did in MODFLOW-2005. For the full simulation, LMG achieves a speed-up of 4.5 on a single core compared with xMD.
User Comments
“...Without SAMG as our solver engine, it would have been impossible to solve [transport models with up to 30 million variables] in a practicable time.” – DHI-WASY GmbH
“[SAMG] was able to reduce the compute time of [one of] our simulations from 12 hours to 3 hours, so our engineers can now run multiple simulations a day.” – ITASCA DENVER Inc.
“In general, the SAMG solver is the fastest MODFLOW solver that [we] have used.” – Aquaveo LLC
“[SAMG] provided optimal runtime speed compared to public-domain solvers evaluated....” – GeoHydroScience LLC
“In general, the SAMG solver is the fastest MODFLOW solver that [we] have used. I have seen multiple models where the SAMG solver was not only faster but more stable than the standard MODFLOW solvers” – Aquaveo LLC
Commercial references
The following companies offer SAMG in their groundwater simulation software:




