Repository navigation
Highlights
Block-structured adaptive mesh refinement (AMR) (#2117)
MFC now has block-structured AMR with multiple refinement levels, dynamic regridding, RK subcycling (RK1–RK3) and refluxing. It runs on CPU and GPU, across ranks, and through restarts.
- Tagging:
amr_tag_varselects the tagged quantity: density, volume fraction, velocity magnitude, pressure, vorticity, temperature or a species mass fraction. - Compatibility: it works with MUSCL, Riemann-extrapolation boundaries (
bc = -4), phase-change relaxation, synthetic turbulence,bf_spatial_supportand immersed boundaries. IB forces come from the finest level covering each face. - Checks and diagnostics:
./mfc.sh amr_checkcompares an AMR block against a uniform fine-grid run. An end-of-run memory table (rank_time_wrt) reports per-level memory and block fill. A lint checks that every AMR-allowed switch has a test. - Safeguards: startup aborts if a fixed
dtwould exceed the CFL limit that a regrid would set. - Not supported with AMR:
sim_data,ib_flux_wall,ib_mass_relaxandib_uncover_fill. - Docs, examples, benchmarks: there is an AMR payoff section with measured times, a validation page (Sod, conservation, isentropic vortex, Sedov, cylinder wake), new examples and an AMR benchmark case.
Immersed boundaries
- Second-order IBM (#1958), with a new IB collision model and collision integration (#2201, #2171). There is an opt-in friction slip regularisation for soft-sphere collisions.
- Thermal and reacting walls:
- Isothermal IBs without chemistry (
thermal_bc = 1) and a lumped solid wall (thermal_bc = 3). patch_ib%thermal_layerstarts a hot IB in its conduction solution.patch_ib%wall_columnadds a sub-grid wall conduction column.ib_flux_wallgives conservative face fluxes at reacting walls.- Chemistry walls get a per-species ghost mirror weight.
- Isothermal IBs without chemistry (
- Wall treatments (opt-in):
ib_ip_interp = 2gives TSC image-point interpolation.ib_wall_order = 2gives a two-probe quadratic wall-normal ghost velocity. It is now rank-independent and fast on NVIDIA GPUs.ib_visc_compactgives compact viscous gradients near bodies.ib_slip_ccstgives an isentropic ghost density and total-enthalpy tangential speed at slip walls.face_boundadds a positivity bound on reconstructed face states.face_bound = 2adds a Zhang–Shu bound.ib_mass_relaxreturns the gas mass that the ghost-cell treatment creates at each body. It defaults to auto (-1), which is on for moving bodies.
- Force and output:
- The IB force is now taken from the momentum fluxes across the body's faces.
- Moving-body force is computed in the body frame.
- Ghost pressure gains centripetal, curvature and body-acceleration terms.
- New outputs:
ib_surface_wrt(per-point wall temperature and gasified mass flux) andib_heat_wrt.
- Restarts: restarts in CFL mode, the force history, the ghost conduction temperature and the
ib_mass_relaxbank are now handled correctly. - Fixes:
- Fixed grid stretching no longer breaks IBM.
- Non-symmetric airfoils no longer fail because of a removed optimization.
- STL wedge NaNs are fixed.
- A GPU segfault with moving IBs is fixed.
- An intermittent AMD abort is fixed.
Other new physics and options
- Euler–Lagrange, phase 1 (#1926).
- Mean-flow controls: a mean pressure gradient with a bulk mass-flux controller, and a mean gas temperature source (thermostat). The thermostat has
mean_temp_wallfor thermally developed flow and supports IBs. Both require a constant time step. - Time-step limits:
chem_params%transport_dtlimitsdtby local chemistry transport. The diffusive limit now accounts for dimension and stencil, with directional diffusive CFL numbers and an interface-only capillary limit. - Chemistry: the diffusion correction flux uses second-order face composition. There is a warning when the explicit reaction source is outside its RK stability limit.
- Viscous: opt-in compact face-normal velocity gradient (
weno_Re_flux_compact).weno_Re_fluxnow requiresweno_avg.
Correctness fixes
- Floating-point literals: analytic expressions use working-precision literals.
0.1was single precision, and1/2evaluated to 0. - Cylindrical viscous operator: the
1/rtheta-divergence and hoop terms are corrected, along with the 2D axisymmetric stress. - MHD: 1D
pre_processwrites the primitive B, not B/rho. - Chemistry: species mass fractions are kept in [0, 1] by construction. CBC species entries of L are set under chemistry.
- Hyper-cleaning: psi damping uses the current-stage value.
- Z viscous gradient: the one-sided gradient uses the ghost-cell spacing.
- Other physics and setup fixes:
- Bubbly volume fractions are rescaled per cell in
pre_process. - Six-equation pressure relaxation skips phases with non-positive partial density.
- Simplex noise lookups are fixed.
- Several input checks were restored or added: patch geometries 16–19, IB patch slots, and characteristic BCs with MUSCL are rejected.
- Cylinder IBs now require an axial length.
- Bubbly volume fractions are rescaled per cell in
- I/O: the MPI I/O leak is fixed (#2114). Full array sections are passed to MPI I/O calls.
- Timing: step times use
system_clock, notcpu_time. GPU runs had read 1.4–1.8x wall time. - GPU and memory:
- Host and device memory leaks in setup and teardown are fixed.
GPU_HOST_DATAandGPU_DECLAREargument handling is fixed.num_procsandproc_rankare sent to the device after the rank is bound to its GPU.Re_sizeis host-captured in viscous and non-Newtonian device code.
Performance
- GPU solver changes: flat Riemann buffers, fewer per-launch mappings and a build-time EOS family.
- The IB marker kernel is parallelized over patch and bounding-box cell.
- The per-step
ib_mass_relaxcost on AMD is cut (fixed slip body +23% to +6%). - The IB heat path is sparse and indexed by local body slot.
benchtakes--casesto run chosen benchmark cases.bench_diffreports only grind time.
Build and toolchain
- Compilers:
- NVHPC 26.9 builds and passes Hypoelasticity. NVHPC 26.5 GPU builds are refused.
ifxgets the Intel flags.- GNU OpenMP offload builds are rejected at configure time.
--mixedfails at configure time without half-precision REAL support.- Cray
-h list=admis dropped. - Cray
!DIR$directives are restored after the formatter had mangled them.
- Build slugs are keyed on the FC/CC/CXX compilers and ignore the build host's CPU.
- Clusters: Flux MPI launches fail fast outside an allocation. Frontier unloads xalt in the
fandfamdmodule sets.rdma_mpiis enabled withfamd. On Tuolumne each GPU rank stays on one socket. precheckis about 3x faster.- Test harness: the per-test timeout is enforced on the launched process, so a hung test no longer takes the whole job down.
Docs, examples and validation
- A CI, test and performance dashboard is published under
/dashboard/. - New validation pages cover shock tubes, vortex order of accuracy, blast waves, acoustic sources, MHD, elastic waves, cylindrical coordinates, two-fluid problems, bubble dynamics, surface tension and AMR.
- New examples cover cylinder and sphere drag and Nusselt number, gas-phase chemistry (ignition, flame speed, reactive shock tube), burning bodies, detonation, flame–vortex interaction, Taylor–Couette and plane Poiseuille flow, moving-body kinematics, and a thermally developed channel. Several reactive examples now use operator splitting.
- An immersed-boundary overview page and troubleshooting entries are added. The README capability lists are updated.
Contributors
Thanks to @sbryngelson, @danieljvickers, @wilfonba, @BCKim55 and @thierrydaoud. @thierrydaoud made their first contribution in #2114.
Full Changelog: v5.7.1...v5.8.0