Skip to content

MFC v5.8.0

Latest

Choose a tag to compare

@sbryngelson sbryngelson released this 01 Dec 01:12
b00ea4f

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_var selects 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_support and immersed boundaries. IB forces come from the finest level covering each face.
  • Checks and diagnostics: ./mfc.sh amr_check compares 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 dt would exceed the CFL limit that a regrid would set.
  • Not supported with AMR: sim_data, ib_flux_wall, ib_mass_relax and ib_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_layer starts a hot IB in its conduction solution.
    • patch_ib%wall_column adds a sub-grid wall conduction column.
    • ib_flux_wall gives conservative face fluxes at reacting walls.
    • Chemistry walls get a per-species ghost mirror weight.
  • Wall treatments (opt-in):
    • ib_ip_interp = 2 gives TSC image-point interpolation.
    • ib_wall_order = 2 gives a two-probe quadratic wall-normal ghost velocity. It is now rank-independent and fast on NVIDIA GPUs.
    • ib_visc_compact gives compact viscous gradients near bodies.
    • ib_slip_ccst gives an isentropic ghost density and total-enthalpy tangential speed at slip walls.
    • face_bound adds a positivity bound on reconstructed face states. face_bound = 2 adds a Zhang–Shu bound.
    • ib_mass_relax returns 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) and ib_heat_wrt.
  • Restarts: restarts in CFL mode, the force history, the ghost conduction temperature and the ib_mass_relax bank 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_wall for thermally developed flow and supports IBs. Both require a constant time step.
  • Time-step limits: chem_params%transport_dt limits dt by 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_flux now requires weno_avg.

Correctness fixes

  • Floating-point literals: analytic expressions use working-precision literals. 0.1 was single precision, and 1/2 evaluated to 0.
  • Cylindrical viscous operator: the 1/r theta-divergence and hoop terms are corrected, along with the 2D axisymmetric stress.
  • MHD: 1D pre_process writes 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.
  • 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, not cpu_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_DATA and GPU_DECLARE argument handling is fixed.
    • num_procs and proc_rank are sent to the device after the rank is bound to its GPU.
    • Re_size is 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_relax cost on AMD is cut (fixed slip body +23% to +6%).
  • The IB heat path is sparse and indexed by local body slot.
  • bench takes --cases to run chosen benchmark cases. bench_diff reports only grind time.

Build and toolchain

  • Compilers:
    • NVHPC 26.9 builds and passes Hypoelasticity. NVHPC 26.5 GPU builds are refused.
    • ifx gets the Intel flags.
    • GNU OpenMP offload builds are rejected at configure time.
    • --mixed fails at configure time without half-precision REAL support.
    • Cray -h list=adm is 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 f and famd module sets. rdma_mpi is enabled with famd. On Tuolumne each GPU rank stays on one socket.
  • precheck is 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