Parameter Sensitivity via Polynomial Chaos
In this example, PyTUQ constructs polynomial chaos expansions to analyze how uncertain physical parameters affect simulation outputs in a heat diffusion problem.
The Heat Equation
The governing equation for this tutorial is the heat diffusion equation:
with initial condition
where r is the distance from the center of the domain, and with uncertain parameters diffusion_coeff (\(D\)), init_amplitude (\(A\)), and init_variance (\(V\)).
Quantities of Interest (Outputs)
The simulation extracts four statistical quantities at the final timestep:
max_temp: Maximum temperature in the domain
mean_temp: Average temperature across all cells
std_temp: Standard deviation of temperature
cell_temp: Temperature in a particular cell, in this case, cell (9,9,9)
These outputs are computed in ``main.cpp``and written to the datalog file.
PyTUQ Workflow
PyTUQ uses polynomial chaos expansion to construct a surrogate model:
Parameter sampling: Generate sample points in the 3D parameter space based on the specified distributions
Forward simulations: Run the AMReX heat equation solver for each parameter set
Surrogate construction: Fit polynomial chaos coefficients to map inputs → outputs
Sensitivity analysis: Compute Sobol indices to identify which parameters most influence each output
The connection is:
Inputs: ParmParse parameters (
diffusion_coeff,init_amplitude,init_variance) specified ininputsfile or command lineOutputs: Quantities of interest extracted from datalog files