Choosing Direct vs. Iterative Solvers in Ansys Mechanical for Large‑Scale Static Analyses
When a static structural model exceeds a few million DOF, choosing the right solver in Ansys Mechanical is critical. This guide compares Direct Sparse and Iterative PCG solvers, explains trade‑offs, and shows a concrete validation workflow for a 5 M DOF bracket model.
09 Apr 2026, 10:35 UTC

Problem Statement
When a static structural model grows beyond a few million degrees of freedom (DOF), the solver choice becomes a critical decision. The Direct Sparse solver (LU factorization) guarantees convergence for ill‑conditioned problems but can exhaust memory on commodity workstations. The Iterative PCG solver with AMG preconditioning offers near‑linear memory scaling and can handle tens of millions of DOF, yet it requires a well‑conditioned system and can struggle with contact, plasticity, or highly distorted elements. This guide helps you decide which solver to use, what constraints to consider, and how to validate the results.
Decision Matrix
Below is a compact table summarizing the key trade‑offs. The values are based on typical 2024 R1/2025 R3 Ansys releases and a 256 GB RAM workstation.
| Criterion | Direct Sparse (LU) | Iterative PCG (AMG) | Hybrid (CMS/CS) |
|---|---|---|---|
| Memory Scaling | O(N1.5–2) – practical limit ~10–15 M DOF | O(N) – 50 M+ DOF feasible | O(N) – reduces peak by 60–80% |
| Convergence Robustness | High – handles contact, plasticity, rigid‑body modes | Good – but may stagnate for ill‑conditioned matrices | Depends on substructure quality |
| HPC Licensing | 1 pack per 4 cores (max 8 cores) | 1 pack per 8 cores – scales better with core count | Same as iterative at system level |
| Parallel Efficiency | SMP only – limited scaling beyond 16 cores | SMP & DMP – >80% efficiency on 64 cores | Improved DMP due to smaller system |
| GPU Acceleration | Not supported | Supported via NVIDIA AmgX (requires GPU license) | Not applicable |
| Typical Use Cases | Contact, plasticity, high aspect‑ratio elements | Large linear or mildly nonlinear problems | Repeated geometry (e.g., composite panels) |
Trade‑Off Analysis
Memory vs. Core Count
The Direct solver’s memory footprint grows super‑linearly, quickly exhausting 256 GB RAM on models with more than 12 M DOF. Iterative PCG keeps memory linear in DOF, so a 5 M DOF model consumes roughly 18 GB versus ~120 GB for Direct. If core count is high (≥32 cores) and the problem is well‑conditioned, the Iterative solver’s lower memory bandwidth per core can halve the wall time.
Robustness vs. Speed
Direct solves are essentially guaranteed to converge for any symmetric positive‑definite matrix. In contrast, the Iterative solver can stall silently if the preconditioner is inadequate. For critical load cases, it is prudent to validate the Iterative solution against a Direct baseline in a sub‑model or at key stress points.
Licensing Implications
A Direct solve on 8 cores consumes one HPC pack. An Iterative solve on 32 cores consumes 4 packs, but the time saved may offset the cost. When GPU acceleration is available, the GPU pack requirement drops to one per 32 cores, making iterative GPU acceleration attractive for very large models.
Concrete Validation Workflow
Below is a step‑by‑step example using a 5 M DOF bracket model. The numbers are illustrative; you should run the Solver Memory Estimator to confirm your own values.
- Prepare the Model – Use the same mesh for both solvers. Enable
Use Inertia Reliefif the model is unconstrained. - Set Solver Settings – In
Analysis Settings > Solver Type, chooseDirectfor the first run.- Direct:
Solver Type = Direct - Iterative:
Solver Type = Iterative,Preconditioner = AMG,Tolerance = 1e-6,Max Iterations = 10000
- Direct:
- Run the Direct Solve – On a 32‑core machine, record the peak memory (≈120 GB) and wall time (≈45 min). Check
solve.outfor a residual1e-12. - Switch to Iterative – Keep the same mesh and load case. Re‑run the analysis.
- Peak memory ≈18 GB, wall time ≈22 min.
- Residual norm ≈1e-8 (default tolerance). Tighten to
1e-8if stress accuracy is critical.
- Validate Results – Post‑process reaction forces at constraints; they should match within 0.1%. Compare stresses at three critical locations; any deviation >5 % warrants a Direct baseline check.
- Check Licensing – Run
ansysli_util.exe -afrom the Ansys command prompt to confirm that the Direct run used 1 pack and the Iterative run used 4 packs. Verify that the license server shows the expected core usage.
Command Example (Windows)
cd C:\Ansys\2025R3\ANSYS Inc\ANSYS\bin\win64
ansysli_util.exe -a
Output will list active packs and core usage for the current session.
Practical Checks and Limitations
- Use the
Solver Memory Estimatortool before running a full solve. - Monitor the
Convergence Plotin Mechanical; residual stagnation (>5000 iterations or residual ratio >1e-3) indicates a preconditioner problem. - For highly distorted meshes or near‑incompressible materials, consider switching to a
ILUorDDpreconditioner instead of AMG. - When using GPU acceleration, ensure CUDA 12.x and the appropriate NVIDIA driver are installed; the license must include a GPU pack.
- Hybrid approaches (e.g., CMS) can reduce memory but require careful partitioning; poor partitioning can lead to negative scaling on >16 cores.
Bottom Line
For large static problems where memory is the bottleneck and the matrix is well‑conditioned, the Iterative PCG solver with AMG preconditioning is the most efficient choice. If the model includes contact, plasticity, or highly distorted elements, favor the Direct solver or a hybrid CMS strategy. Always validate the Iterative results against a Direct baseline for critical stress or displacement predictions, and monitor licensing usage to ensure cost‑effective scaling.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.