Multi-Physics Adjoints and Solution Verification Stanford PSAAP Center Multi-Physics Adjoints and Solution Verification Karthik Duraisamy Francisco Palacios Juan Alonso Thomas Taylor
Predictive Science: Verification and Error Budgets Real world problem Mathematical Model Assumptions + Modeling Uncertainties Numerical solution Discretization Numerical Errors Certification,QMU Use Quantifying numerical / discretization errors is a necessary first step to quantify sources of uncertainty. Controlling numerical errors is necessary to achieve certification. Computational budget must be balanced between addressing numerical and UQ errors.
Key Accomplishments Full Discrete Adjoint Solver for Compressible RANS Equations with turbulent combustion Fully integrated with flow solver Massively parallel Robust Convergence Application to variety of PSAAP center problems including full Scramjet combustor New developments Stochastic adjoints Hybrid adjoints Robust grids for UQ Focus on three key contributions:
Use of Adjoints in V & V Capability Case Typ. Verific. Validation Mesh conv Error Est Goal Adapt UQ Loop Inviscid Disc / BC Ringleb 2D Analytic Inviscid Disc/Shocks hyshot/1D comb model DLR Table lookup Shock-ind Comb Numeric Viscous Disc Lam SBLI 6th Order Hakkinen Turbulence STBLI LES-Morgan Shock train UQ Expt 2D/3D Eaton/LES Cold Hyshot Turb+Comb React Mix Layer Hyshot 3D
RANS + Combustion: Governing equations 5 Flow equations + 2 Turbulence model equations + 3 Combustion model equations (FPVA), Peters 2000; Terrapon 2010 Table lookup (Functions of transported variables and pressure) + Equations of state + Material properties
The Discrete Adjoint Equations Conserved Variables Flow Equations Adjoint Equations Computed using Automatic Differentiation, so can be arbitrarily complex Note: Interpolation operators can also be differentiated Non-zero elements in Jacobian: 33x10x10xN [For 3D structured mesh]
Sample QoI : Shock crossing point in UQ Experiment Contours of n=2: QoI = 2.1362e-01 n=4: QoI = 2.1161e-01 n=8: QoI = 2.1146e-01
Adjoint Equations : Solution Truly unstructured grids with shocks and thin features result in very poorly conditioned systems Original system : Preconditioned GMRES not effective Iterative solution: More robust Laminar SBLI @ Rex = 3x105 Exact or approximate Jacobians
Supersonic Combustion model problem OH Mass Fraction Air: V=1800 m/s, T= 1550 K Splitter plate H2: V=1500 m/s, T= 300 K Pressure K-w SST with FPVA model on a mesh of 5000 CVs QoI
Supersonic Combustion model problem: Full Adjoint Frozen turbulence Exact Jacobians : CFL ~ 1000+ Approx Jacobians : CFL ~ 0.1
Goal oriented Error estimation Governing equation and functional on Error estimate on (Venditti & Darmofal) Have also extended it to estimate and control stochastic errors
Test 1: Shock-Turbulent Boundary Layer Interaction Incoming BL: Mach number = 2.28, Rϑ = 1500, Shock deflection angle = 8o LES RANS Reference Error: 3.1 e-04
Adapive Mesh refinement QoI: Integrated pressure on lower wall 2.5 % flagged 5 % flagged 25 % flagged Gradient based Adjoint based
Application to Scramjet Combustion Forebody Ramp Inlet/Isolator Combustor Nozzle/Afterbody Fuel Injection Flow Mach ~8 Air 1800 m/s, 1300 K, 1.2 bar H2 300K, 5 bar (total)
Wall pressures Upper wall Lower wall
Adjoint Solution QoI : avg pressure at Comb exit (lower wall) GMRES 24 hrs, 840 procs: Local LU preconditioning + GMRES
Adjoint Error estimates QoI : avg pressure at Comb exit (lower wall) Top : Estimated error contribution to QoI Middle: Adjoint solution (adjoint of energy variable) Bottom: Truncation error estimate (in energy equation) QoI : 282.58 kPa ; Error estimate: 2.76 kPa (0.98%)
Goal oriented refinement QoI : Stagnation pressure at Nozzle exit
Goal oriented mesh refinement : Results Baseline mesh Adapted mesh
Towards a hybrid adjoint Governing Equations Discrete Linearized Hybrid Adjoint Discretized Adjoint Discretize Linearize Continuous Equations that are difficult/impossible analytically Equations with existing analytical formulations/code
Towards a hybrid adjoint Discrete Continuous Hybrid Development + – ± Compatibility with discretized PDE ? Compatibility with continuous PDE Surface formulation for gradients Arbitrary functionals Non-differentiability Computational cost Flexibility in solution See Tom Taylor Poster
Adjoint Solver Status & Applications A full discrete adjoint implementation (using automatic differentiation) has been developed & verfied in Joe for the compressible RANS equations with the following features Turbulence (k-w, SST and SA models) Multi-species mixing Combustion with FPVA Capabilities are used in different applications in PSAAP Estimation of numerical errors Mesh adaptation Robust grids for UQ Estimation and control of uncertainty propagation errors Sensitivity and risk analysis (acceleration of MC sampling) (Q. Wang) Balance of Errors and uncertainties (J. Witteveen) Continuous adjoint also available in Joe for the compressible laminar NS equations A new hybrid adjoint formulation developed and applied to idealized problems Massively parallel implementation available using MUM and PETSC