Skip to content

Scaffold EB_WMLES: compressible NS solver skeleton for WMLES development - #5580

Open
jamesliu516 wants to merge 2 commits into
AMReX-Codes:developmentfrom
jamesliu516:jamesliu516-laughing-telegram
Open

Scaffold EB_WMLES: compressible NS solver skeleton for WMLES development#5580
jamesliu516 wants to merge 2 commits into
AMReX-Codes:developmentfrom
jamesliu516:jamesliu516-laughing-telegram

Conversation

@jamesliu516

Copy link
Copy Markdown

Summary

This PR scaffolds a new Tests/EB_WMLES solver as the foundation for
wall-modeled large-eddy simulation (WMLES) with embedded boundaries in AMReX.

Approach

Derived from the existing EB_CNS solver by copying the full source tree and
performing a complete CNSWMLES rename (classes, functions, macros,
include guards, Make.package variables). The solver starts as a working
compressible NS code — no feature divergence yet, just a clean rename so
future phases can add turbulence modeling without touching EB_CNS.

New additions beyond the rename

  • WMLES_parm.H — expanded with SGS parameters (Cs_smag, Pr_t,
    sgs_filter_width_ratio) and wall-model parameters (kappa, B,
    yplus_target, enable/update flags), read from ParmParse.
  • WMLES_sgs_K.H — Smagorinsky eddy-viscosity GPU kernel
    (wmles_compute_nu_t) computing |S| = sqrt(2 S_ij S_ij) via 2nd-order
    central differences (2D/3D). Ready for Phase 2 integration.
  • WMLES_wallmodel_K.H — ODE wall-model placeholder; returns zero
    stress. Phase 4 implementation target.
  • Exec/Cylinder/ — 2D cylinder crossflow test case with uniform
    inflow BC, EB cylinder (implicit function), and full input deck
    (inputs for debug runs, inputs-ci for lightweight CI).

Build integration

  • Tests/EB_WMLES/CMakeLists.txt uses setup_test() for 2D and 3D.
  • Registered in Tests/CMakeLists.txt for Small and full test suites,
    gated on AMReX_EB.

Test plan

cmake -S . -B build -DAMReX_ENABLE_TESTS=ON -DAMReX_TEST_TYPE=Small -DAMReX_EB=ON
cmake --build build -j4 --target Test_WMLES_Cylinder_2d

inputs-ci runs 10 timesteps on a 32×16 grid as a smoke test.

Future phases (not in this PR)

Phase Description
2 Wire wmles_compute_nu_t() into advance loop
3 Modify EB diffusion kernels for nu_eff = nu_mol + nu_t
4 Implement ODE wall-model solver
5 Inject wall stress into EB redistribution
6 STL-based test cases
7 Validation and parameter tuning

All phases modify only Tests/EB_WMLES/ — no core library changes needed
until wall-model coupling requires them.

@jamesliu516
jamesliu516 marked this pull request as draft August 30, 2026 14:43
@jamesliu516
jamesliu516 marked this pull request as ready for review August 30, 2026 14:43
@jamesliu516
jamesliu516 force-pushed the jamesliu516-laughing-telegram branch from eaed71c to 7aea11e Compare August 30, 2026 14:56
Scaffold a new embedded-boundary, wall-modeled LES solver for
turbulence simulation around CAD/STL geometry, built on EB_CNS.

- Source/: WMLES solver class, advance loops, BC fill, I/O, setup, tagging
- Source/hydro/: compressible hydro kernels (slope, Riemann, divergence)
- Source/diffusion/: EB-aware viscous flux kernels with turbulent
  eddy viscosity and turbulent heat conduction (Pr_t)
- Source/WMLES_sgs_K.H: Smagorinsky SGS model with EB-safe gradient
  stencils; returns kinematic nu_t, converted to mu_t = rho * nu_t in
  the diffusion coefficients
- Source/WMLES_wallmodel_K.H: wall-model ODE placeholder (Phase 4)
- Exec/Cylinder/: 2D cylinder crossflow test case
- Exec/STL_Box/: 3D test case importing a box.stl via EB2 STL geometry
- Register EB_WMLES in Tests/CMakeLists.txt (Small and non-Small builds)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jamesliu516
jamesliu516 force-pushed the jamesliu516-laughing-telegram branch from 7aea11e to 7ea7646 Compare August 30, 2026 15:01
WMLES.Hydro_K.H / WMLES.Hydro_eb_K.H were mistyped during the CNS->WMLES
rename (period instead of underscore). They must be WMLES_hydro_K.H and
WMLES_hydro_eb_K.H to match the actual files, otherwise compilation fails
with "no such file".

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant