C++ Input Files#
When running the standalone C++ driver (Diffusion, installed at /usr/bin/Diffusion inside the release container or build/Diffusion when built from source), simulation parameters are supplied via an AMReX ParmParse configuration file:
/usr/bin/Diffusion inputs
Any parameter can also be overridden on the command line after the filename:
/usr/bin/Diffusion inputs tortuosity.direction=2 amr.max_grid_size=128
Example inputs File#
# --- Image Input ---
image.filename = microstructure.tif
image.threshold = 128
# --- Transport Solver Configuration ---
tortuosity.direction = 2 # 0 = X, 1 = Y, 2 = Z
tortuosity.phase_id = 1 # Conducting phase label
tortuosity.solver_type = PCG # PCG, FlexGMRES, GMRES, BiCGSTAB, SMG, PFMG
# --- HYPRE Convergence Controls ---
hypre.eps = 1.0e-9
hypre.maxiter = 500
# --- AMReX Domain Decomposition ---
amr.max_grid_size = 64
# --- Output ---
results.path = ./results
tortuosity.write_plotfile = false # Write AMReX plotfile directory (plt_*)
tortuosity.verbose = 1 # 0 = silent, 1 = summary, 2 = detailed
Multi-Phase Transport Parameters#
To solve composite conduction across multiple conducting phases, specify matching lists of phase IDs and diffusivities:
tortuosity.active_phases = 1 2
tortuosity.phase_diffusivities = 1.0 0.15
All unlisted phase IDs are treated as insulating (\(D = 0\)).
Key Parameter Reference#
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
string |
— |
Input volume path ( |
|
float |
— |
Optional grayscale binarisation threshold ( |
|
string |
|
Internal dataset path for HDF5 inputs |
|
int |
|
Transport direction ( |
|
int |
|
Conducting phase ID (single-phase mode) |
|
string |
|
Linear solver ( |
|
float |
|
Inlet face Dirichlet potential |
|
float |
|
Outlet face Dirichlet potential |
|
float |
|
Relative residual convergence tolerance |
|
int |
|
Maximum solver iterations |
|
int |
|
Maximum AMReX patch edge length |
|
string |
|
Output directory for JSON/text summaries and plotfiles |
|
bool |
|
Write distributed AMReX plotfile for |