Using Fierro¶
Overview¶
Fierro is a software made by Los Alamos National Laboratory and is a multiphysics code for compressible material dynamics and quasi-static solid mechanics. On Muscadine, the multiphysics solver is built with the HIP backend, enabling GPU-accelerated execution via MATAR/Kokkos.
Prerequisites¶
The first thing you need is Paraview installed on your local device. You will not be using it to run the scripts, but you will be using it to connect to Muscadine and view your simulations. The version on Muscadine is Paraview-6.0.1, so you will need this exact version to be able to connect to it.
Before running Fierro or viewing output in ParaView, you need to be connected to the HPC² VPN. Without it you cannot reach Muscadine in addition to not being able to view your files on Muscadine. For more information on the VPN you can view the VPN setup steps for instructions.
Tip
If running Paraview on your local device is not a viable option, you can also just run the Paraview GUI directly on Muscadine by just typing paraview after running ml contrib paraview. However, it may be choppy or delayed while running these simulations so running Paraview locally is still the recommended method.
Fierro Input File Reference¶
To run a simulation, Fierro requires a YAML input file that defines the physics, materials, and geometry. The Fierro input file is organized into several key sections, each controlling a specific aspect of the simulation.
dynamic_options : Time integration parameters
Controls time integration parameters for the simulation.
Field |
Type |
Description |
|---|---|---|
|
double |
Start time for the simulation |
|
double |
End time for the simulation |
|
double |
Minimum allowable time step |
|
double |
Maximum allowable time step |
|
double |
Initial time step |
|
double |
CFL (Courant-Friedrichs-Lewy) condition factor |
|
integer |
Maximum number of computational cycles/iterations |
|
double |
Small epsilon value for floating point comparisons |
|
double |
Very small value threshold |
|
double |
Small value threshold |
|
integer |
Number of Runge-Kutta stages for time integration |
mesh_options : Computational mesh definition
Defines the computational mesh. You can either generate a mesh internally or read one from a file.
Field |
Type |
Description |
|---|---|---|
|
integer |
Number of dimensions (typically 2 or 3) |
|
enum |
Mesh source: |
|
string |
Path to mesh file (when |
|
enum |
Mesh type to generate: |
|
|
Origin coordinates |
|
|
Length in each dimension |
|
|
Number of elements per dimension |
|
integer |
Order of basis functions |
Polar mesh only:
Field |
Type |
Description |
|---|---|---|
|
double |
Inner radius |
|
double |
Outer radius |
|
double |
Starting angle |
|
double |
Ending angle |
|
integer |
Number of radial elements |
|
integer |
Number of angular elements |
Scaling:
Field |
Type |
Description |
|---|---|---|
|
double |
X-axis scale factor |
|
double |
Y-axis scale factor |
|
double |
Z-axis scale factor |
output_options : Output frequency, format, and fields
Manages simulation output frequency, format, and which fields are written.
Field |
Type |
Description |
|---|---|---|
|
string |
Verbosity of timing information |
|
string |
Output format, e.g. |
|
double |
Simulation time interval between output dumps |
|
integer |
Cycle interval between output dumps |
Field output lists:
Field |
Options |
|---|---|
|
|
|
|
|
|
|
|
solver_options : Physics solver configuration
A list of solver blocks specifying which physics solvers to use.
Each solver block contains:
Field |
Type |
Description |
|---|---|---|
|
enum |
Solver method (see below) |
|
integer |
Unique solver identifier |
|
double |
End time specific to this solver |
|
boolean |
Enable moving heat source (thermal solvers only) |
Solver methods:
Value |
Description |
|---|---|
|
3D Hydro |
|
2D Hydro |
|
Level set solver |
|
Thermal solver |
boundary_conditions : Surface boundary conditions
A list of boundary_condition blocks applied to geometric surfaces.
Surface definition (surface:):
Field |
Type |
Description |
|---|---|---|
|
enum |
|
|
double |
Position of the plane |
|
double |
Radius for cylinder/sphere |
|
double |
Geometric tolerance for surface selection |
|
|
Surface origin |
BC models:
Field |
Options |
|---|---|
|
|
|
|
|
|
|
string |
Parameter fields:
Field |
Type |
Description |
|---|---|---|
|
integer |
Solver this BC applies to |
|
list |
Velocity model parameters |
|
list |
Stress model parameters |
|
2 ints |
|
|
list |
Temperature model parameters |
|
list |
Heat flux model parameters |
materials : Material property definitions
A list of material blocks defining material models.
Field |
Type |
Description |
|---|---|---|
|
integer |
Unique material identifier |
|
string |
File path for tabular material models |
Equation of State (eos_model):
Option |
Description |
|---|---|
|
Gamma law gas EOS |
|
Linear elastic EOS |
|
Mie-Grüneisen EOS |
|
Host-side user-defined EOS |
|
User-defined EOS |
|
No EOS |
|
Void material |
eos_model_type: coupled, decoupled, no_eos
Strength (strength_model):
Option |
|---|
|
|
|
|
|
|
|
strength_model_type: increment_based, state_based, no_strength
Dissipation (dissipation_model):
Option |
|---|
|
|
|
|
|
Erosion:
Field |
Type |
Description |
|---|---|---|
|
enum |
|
|
double |
Tension threshold for erosion |
|
double |
Density threshold for erosion |
Level Set:
Field |
Type |
Description |
|---|---|---|
|
string |
Type of level set for this material |
|
double |
Normal velocity component |
|
double |
Curvature-dependent velocity component |
multimaterial_options : Mixed-material element handling
Configures options for elements containing multiple materials.
Field |
Type |
Description |
|---|---|---|
|
int/double |
Max materials per element |
Material equilibration (mat_equilibration_model):
Option |
Description |
|---|---|
|
No equilibration |
|
Tipton equilibration |
|
User-defined model |
mat_equilibration_global_vars: list of parameters
Geometric equilibration (geo_equilibration_model):
Option |
Description |
|---|---|
|
No interface reconstruction |
|
Tipton model |
|
User-defined model |
geo_equilibration_global_vars: list of parameters
regions : Initial conditions and geometric region assignment
A list of region blocks assigning material and state to geometric volumes.
Field |
Type |
Description |
|---|---|---|
|
integer |
Solver this region belongs to |
|
integer |
Material assigned to this region |
Volume definition (volume:):
Field |
Type |
Description |
|---|---|---|
|
enum |
|
|
string |
Path to voxel/vtu file |
|
double |
Bounds for box regions |
|
double |
Radii for cylinder/sphere |
|
|
Volume origin |
|
integer |
Part ID for multi-part meshes |
Distribution types (shared across all field blocks below):
radial, spherical, tg_vortex, uniform, x_linear, y_linear, z_linear
volume_fraction:
Field |
Description |
|---|---|
|
Distribution type |
|
Constant or base value |
|
Slope for linear distributions |
|
Origin for radial/spherical |
velocity:
Field |
Description |
|---|---|
|
|
|
Cartesian velocity components |
|
Speed magnitude for radial/spherical |
|
Uniform value |
Scalar initial condition fields — all share type, value, (slope, origin where applicable):
Field |
|---|
|
|
|
|
|
|
|
Example Input File¶
The following input YAML file showcases a 3D high-velocity impact and erosion simulation.
dynamic_options:
time_final: 10.0
dt_min: 1.e-8
dt_max: 1.e-3
dt_start: 1.e-5
cycle_stop: 300000
mesh_options:
source: generate
num_dims: 3
type: box
origin: [0.0, 0.0, 0.0]
length: [1.2, 1.2, 1.2]
num_elems: [30, 30, 30]
output_options:
timer_output_level: thorough
output_file_format: ensight
graphics_time_step: 0.05
solver_options:
- solver:
method: dynx_FE
id: 0
boundary_conditions:
# Plane y=0: reflective
- boundary_condition:
solver_id: 0
surface:
type: y_plane
plane_position: 0.0
velocity_model: reflected
velocity_bc_global_vars: [0, 1, 0]
# Plane z=0: reflective
- boundary_condition:
solver_id: 0
surface:
type: z_plane
plane_position: 0.0
velocity_model: reflected
velocity_bc_global_vars: [0, 0, 1]
materials:
# ID 0: Copper-like Projectile
- material:
id: 0
eos_model_type: decoupled
eos_model: linear_elastic_eos
eos_global_vars: [1.30, 0.44, 8.93, 0.001]
strength_model_type: increment_based
strength_model: hypo_plasticity_strength
strength_global_vars: [0.44, 0.0021]
dissipation_model: MARS
dissipation_global_vars: [1.0, 1.333, 1.0, 1.333, 0.05, 1.0]
# ID 1: Plate with Erosion
- material:
id: 1
eos_model_type: decoupled
eos_model: gamma_law_gas
eos_global_vars: [1.666666666666667, 1.0E-4, 1.0]
dissipation_model: MARS
dissipation_global_vars: [1.0, 1.0, 1.333, 1.333, 0.1, 1.0]
erosion_model: basic
erode_tension_val: 2.0e-7
erode_density_val: 5.0
# ID 2: Background Air
- material:
id: 2
eos_model_type: decoupled
eos_model: gamma_law_gas
eos_global_vars: [1.666666666666667, 1.0E-4, 1.0]
dissipation_model: MARS
dissipation_global_vars: [1.0, 1.0, 1.333, 1.333, 0.1, 1.0]
regions:
# Global Air Fill
- region:
volume: {type: global}
material_id: 2
solver_id: 0
density: {type: uniform, value: 0.010}
specific_internal_energy: {type: uniform, value: 1.0e-6}
velocity: {type: cartesian, u: 0.0, v: 0.0, w: 0.0}
# Projectile
- region:
volume:
type: box
origin: [0.0, 0.0, 0.0]
x1: 0.1, x2: 0.5, y1: 0.0, y2: 0.21, z1: 0.0, z2: 0.21
material_id: 0
solver_id: 0
density: {type: uniform, value: 8.93}
specific_internal_energy: {type: uniform, value: 1.0e-6}
velocity: {type: cartesian, u: 0.3, v: 0.0, w: 0.0}
# Wall/Plate
- region:
volume:
type: box
origin: [0.0, 0.0, 0.0]
x1: 0.5, x2: 0.6, y1: 0.0, y2: 1.2, z1: 0.0, z2: 1.2
material_id: 1
solver_id: 0
density: {type: uniform, value: 8.93}
specific_internal_energy: {type: uniform, value: 1.0e-6}
velocity: {type: cartesian, u: 0.0, v: 0.0, w: 0.0}
Running Fierro¶
Fierro Environment Setup¶
Fierro and its dependencies (ROCM, HIP, Kokkos) are all managed by the Fierro module. Load the module before running or submitting any job.
ml fierro
After loading the module, this makes the Fierro binary available in your PATH and sets up the required HIP/ROCM environment. You can verify it’s loaded correctly with:
which Fierro
Submitting a Job¶
The recommended way to run Fierro is using a SBATCH script. The following SBATCH script is a simple template for Fierro which should be able to run any kind of Fierro simulation:
#!/bin/bash
#SBATCH --job-name="fierro-demo"
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=8
#SBATCH --gres=gpu
#SBATCH --chdir=<path/to/dir>
#SBATCH --time=0-0:30:00
#SBATCH --output=-%j.out
module load fierro
srun Fierro input.yaml
Replace input.yaml with either the example input file from earlier or your own YAML Fierro input file.
Then, you’re ready to run the script with sbatch <scriptName>.
Tip
Output Directory: Fierro creates a subdirectory in the working directory named after the output_file_format value in your input file. For example, output_file_format: vtk produces a vtk/ folder. Setting --chdir ensures output goes in a certain directory rather than where you called the SBATCH file.
Viewing the Output with Paraview¶
Paraview Environment Setup¶
To view the output of your Fierro script, you need to set up a Paraview server to connect to your local device.
Load the Paraview module:
ml contrib paraview.Load a Paraview server in the terminal:
pvserver(Keep this terminal open) or alternatively runsrun pvserver.
Check the line that says
Accepting connection(s): <hostname>:11111- note the hostname, you’ll need it in the next step.
In your local Paraview GUI:
File -> Connect
Add Server
Set the following configurations:
Name:
MuscadineHost: (the hostname from the pvserver output, e.g.
muscadine-node-2.hpc.msstate.edu)Port:
11111
Then finally, click Configure -> Connect
Opening Output Files¶
Fierro outputs the file in a directory named after whatever your output_file_format was (e.g. vtk/).
In ParaView: File -> Open
Navigate to the directory you set for
--chdirin your SBATCH script and open the new output directory.Look for a
.pvdfileSelect it and click OK
Click the green Apply button in the Properties panel
Basic Workflow¶
Scrub through timesteps: Use the toolbar at the top - playbutton, step/forward/back, or type a timestep directly in the time field.
Color by a field:
In the toolbar, change the coloring dropdown from Solid Color to a field from your output_options - e.g. den, pres, vel. Hit Apply after changing.
Rescale the colormap to the current timestep: Click the Rescale to Data Range button (the double-arrow icon next to the colormap bar) - useful when fields change dramatically over time.
Warp by velocity (optional):
Filters -> Search -> “Warp By Vector” -> set vector to vel -> Apply. Useful for visualizing deformation.
Tip
For large runs, load only a subset of timesteps: File → Open → check “Load only selected timesteps” in the dialog.
More Info¶
Fierro GitHub: https://github.com/lanl/Fierro
MATAR Github (Fierro sub-dependency): https://github.com/lanl/MATAR
ParaView Documentation: https://docs.paraview.org/en/latest/UsersGuide/index.html