███████╗██╗ ██╗ █████╗ ██████╗ ██████╗ ███╗ ██╗███████╗████████╗██╗████████╗
██╔════╝╚██╗██╔╝██╔══██╗██╔════╝██╔═══██╗████╗ ██║██╔════╝╚══██╔══╝██║╚══██╔══╝
█████╗ ╚███╔╝ ███████║██║ ██║ ██║██╔██╗ ██║███████╗ ██║ ██║ ██║
██╔══╝ ██╔██╗ ██╔══██║██║ ██║ ██║██║╚██╗██║╚════██║ ██║ ██║ ██║
███████╗██╔╝ ██╗██║ ██║╚██████╗╚██████╔╝██║ ╚████║███████║ ██║ ██║ ██║
╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚══════╝ ╚═╝ ╚═╝ ╚═╝
High-Performance Crystal Plasticity & Micromechanics Simulation
Velocity-based finite element framework for polycrystalline materials
Quick Start • Documentation • Examples • Contributing
What is ExaConstit?
ExaConstit is a cutting-edge, velocity-based finite element code designed for high-fidelity simulation of polycrystalline materials. Built on LLNL's MFEM library, it delivers unprecedented performance for crystal plasticity and micromechanics modeling on leadership-class HPC systems.
Key Applications
- Crystal Plasticity Simulations - Grain-level deformation analysis
- Bulk Constitutive Properties - Homogenization of polycrystalline materials
- Additive Manufacturing - Process-structure-property relationships
- Experimental Validation - Lattice strain calculations for diffraction experiments
Features
Advanced Finite Element Framework
- Velocity-Based Formulation - Updated Lagrangian with superior convergence
- Multi-Material Support - Heterogeneous material regions
- Adaptive Time Stepping - Automatic timestep control for robustness
Crystal Plasticity Modeling
- ExaCMech Integration - Advanced crystal plasticity constitutive models
- Multi-Crystal Support - BCC, FCC, and HCP crystal structures
- Grain-Level Resolution - Individual grain orientations and properties
- State Variable Evolution - Full history-dependent material behavior
High-Performance Computing
- GPU Acceleration - CUDA and HIP support for maximum performance
- MPI Parallelization - Scales to tens of thousands of processors
- Memory Efficiency - Matrix-free partial assembly algorithms
- Performance Portability - RAJA framework for unified CPU/GPU code
Material Model Flexibility
- ExaCMech Library - State-of-the-art crystal plasticity models
- UMAT Interface - Abaqus-compatible user material subroutines
- Custom Models - Extensible architecture for new constitutive laws
- Multi-Model Regions - Different materials in different regions
Advanced Post-Processing
- Visualization Output - VisIt, ParaView, and ADIOS2 support
- Volume Averaging - Macroscopic stress-strain behavior and other useful parameters
- Lattice Strain Analysis - In-situ diffraction experiment simulation
- Python Tools - Comprehensive analysis and plotting scripts
Quick Start
Prerequisites
# Essential dependencies
MPI implementation (OpenMPI, MPICH, Intel MPI)
MFEM (v4.9+, ExaConstit fork) with parallel/GPU support
ExaCMech (v0.4.3+) crystal plasticity library
RAJA (≥2025.12.x) performance portability
CMake (3.24+)
Installation
ExaConstit provides automated installation scripts for different platforms. For detailed instructions, see Installation Guide.
Quick Start
# Clone the repository
git clone https://github.com/LLNL/ExaConstit.git
# Create a separate build directory (recommended)
# This keeps source and build artifacts separate
mkdir -p exaconstit_builds
cd exaconstit_builds
Intel CPU Systems (Linux)
../ExaConstit/scripts/install/unix_cpu_intel_install.sh
macOS Systems
../ExaConstit/scripts/install/unix_cpu_mac_install.sh
NVIDIA GPU Systems (CUDA)
../ExaConstit/scripts/install/unix_gpu_cuda_install.sh
AMD GPU Systems (HIP/ROCm)
../ExaConstit/scripts/install/unix_gpu_hip_install.sh
Before First Run
⚠️ You must customize the build configuration for your system.
Edit the appropriate config file in scripts/install/configs/ and update:
- Compiler paths and versions
- MPI installation location
- Python executable path
- Module load commands (HPC systems)
See the Installation Guide for detailed setup instructions.
Build Options
# Clean rebuild
REBUILD=ON ./scripts/install/unix_gpu_cuda_install.sh
# Target specific GPU architecture
CMAKE_GPU_ARCHITECTURES=80 ./scripts/install/unix_gpu_cuda_install.sh
# Adjust parallel jobs
MAKE_JOBS=16 ./scripts/install/unix_cpu_intel_install.sh
Note for MI300A users: Set HSA_XNACK=1 before running simulations.
For troubleshooting, manual builds, and advanced configuration, see the Installation Guide.
Manual Build
# Clone and prepare
git clone https://github.com/LLNL/blt.git cmake/blt
mkdir build && cd build
# Configure
cmake .. \
-DENABLE_MPI=ON \
-DMFEM_DIR=${MFEM_INSTALL_DIR} \
-DECMECH_DIR=${EXACMECH_INSTALL_DIR} \
-DRAJA_DIR=${RAJA_INSTALL_DIR}
# Build
make -j $(nproc)
First Simulation
# Run a crystal plasticity example
cd test/data
mpirun -np 4 ../../build/mechanics -opt voce_full.toml
# Generate stress-strain plots
python ../../scripts/postprocessing/macro_stress_strain_plot.py
Examples
Crystal Plasticity Simulation
# options.toml - Crystal plasticity configuration
grain_file = "grain.txt"
orientation_file = "orientations.txt"
[Mesh]
filename = "polycrystal.mesh"
[Materials]
[[Materials.regions]]
material_name = "titanium_alloy"
mech_type = "ExaCMech"
[Materials.regions.model.ExaCMech]
shortcut = "evptn_HCP_A"
Post-Processing Workflow
# Extract stress-strain data
python scripts/postprocessing/macro_stress_strain_plot.py output/
# Calculate lattice strains (experimental validation)
python scripts/postprocessing/calc_lattice_strain.py \
--config lattice_strain_config.json
# Generate visualization files
python scripts/postprocessing/adios2_example.py results.bp
Output and Visualization
Version 0.10 Updates
ExaConstit v0.10 focuses on solver robustness and moves to MFEM v4.9+. Highlights:
- Trust-region dogleg solver:
nl_solver = "TRDOG" for problems where Newton-Raphson struggles to converge
- Solver output control: the new
print_info option in [Solvers.NR] sets how much the nonlinear solvers print, using one output format for all solvers
- B-bar consistency: material models now see the same volume-averaged kinematics as the B-bar integrator
- Light-up post-processing:
xtal_light_up supports all eight crystal systems
- Calibration workflows: a new framework in
workflows/exaconstit-calibrate with MPI and Flux backends
- Bug fixes: multi-GPU results, symlinked output directories, time stepping options, and post-processing output cadence
See CHANGELOG.md for the full list of changes.
Version 0.9 Output Updates
ExaConstit v0.9 introduces significant improvements to output management and file organization:
Modern Configuration Support
- Legacy compatibility: Previous option file formats continue to work
- Conversion utility: Use our conversion script to migrate to the modern TOML format:
python scripts/exaconstit_old2new_options.py old_options.toml -o new_options.toml
Enhanced Output Files
- Headers included: All simulation output files now contain descriptive headers
- Time and volume data: Automatically included in all output files so the auto_dt_file has been removed
- Improved format: Enhanced data organization (note: format differs from previous versions)
- Basename-based directories: Output location determined by
basename and Postprocessing.Projections.output_directory settings in options file
# if not provided defaults to option file name
basename = "exaconstit" # Creates output sub-directory: exaconstit/
Advanced Visualization Control
- Backward compatibility: Visualization files remain compatible with previous versions
- User-friendly naming: Visualization variable names updated for better clarity
- Selective field output: Specify exactly which fields to save (new capability):
[PostProcessing.projections]
# Some of these values are only compatible with ExaCMech
enabled_projections = ["stress", "von_mises", "volume", "centroid", "dpeff", "elastic_strain"]
# if set to true then all defaults are outputted by default
auto_enable_compatible = false
Migration Guide for Existing Users
- Existing simulations: Previous option files work without modification
- Output processing: Update post-processing scripts to handle new file headers
- Directory structure: Account for new basename-based output organization
- Visualization workflows: Existing VisIt/ParaView workflows remain functional
Advanced Features
Mesh Generation & Processing
- Auto-Generated Meshes - From grain ID files
- Neper Integration - v4 mesh processing with boundary detection
- Format Conversion - VTK to MFEM
- Boundary Attribute - Automatic boundary labelling
Mesh Generator Utility
The mesh_generator executable provides flexible mesh creation and conversion:
# Create MFEM mesh from grain ID file
./mesh_generator --grain_file grains.txt --output polycrystal.mesh
# Convert VTK mesh to MFEM format with boundary attributes
./mesh_generator --vtk_input mesh.vtk --output converted.mesh
# View all options
./mesh_generator --help
Capabilities:
- Auto-generated meshes from grain ID files
- VTK to MFEM conversion with automatic boundary attribute generation
- Boundary Attribute compatible with ExaConstit requirements
Neper Integration
For Neper v4 users:
# Generate mesh with face information
neper -M n100-id1.tess -faset 'faces' -format gmsh2.2
# Convert to ExaConstit format
python scripts/meshing/neper_v4_mesh.py input.msh output.mesh
For Neper v2-v3 users:
# Convert FEpX format to VTK
python scripts/meshing/fepx2mfem_mesh.py fepx_mesh.txt vtk_mesh.vtk
# Then use mesh_generator for final conversion
./mesh_generator --vtk_input vtk_mesh.vtk --output final.mesh
Required Input Files for Crystal Plasticity
When setting up crystal plasticity simulations, you need (file names can be different):
Essential Files
grain.txt: Element-to-grain ID mapping (one ID per element)
props.txt: Material parameters for each grain type/material
state.txt: Initial internal state variables (typically zeros)
orientations.txt: Crystal orientations (quaternions)
regions.txt: Mapping from grain-to-region ID mapping
Mesh Requirements
- Format: MFEM v1.0 or Cubit format