Skip to content

Fix the wall boundary conditions of the NEMO solver - #3033

Open
rois1995 wants to merge 16 commits into
su2code:developfrom
rois1995:fix_NEMO_walls_v2
Open

rois1995 wants to merge 16 commits into
su2code:developfrom
rois1995:fix_NEMO_walls_v2

Conversation

@rois1995

@rois1995 rois1995 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Problem

  • Catalytic walls. The two catalytic tests used the marker name wall, not Wall, so they ran as isothermal walls. The partially catalytic flux had wrong units (31.6 times too small). The catalytic energy flux counted the face area twice.
  • Isothermal wall, implicit runs. The no-slip rows of the Jacobian were rows 1..nDim, which are species rows in NEMO. The energy Jacobian missed a factor.
  • Heat-flux wall. About half of the specified flux reached the wall.
  • Other walls. The slip wall could divide by zero. A wall node on a symmetry line (a cone tip) never settled. The Euler wall Jacobian did not match the residual, which limited the CFL.

Fix

  • A CATALYTIC_WALL name that matches no wall is an error.
  • The isothermal wall uses the momentum rows nSpecies..nSpecies+nDim-1.
  • The heat-flux wall applies only the specified flux, as CNSSolver does. The vib.-el. energy gets the share kve/(ktr+kve). I found no reference for this split.
  • The symmetry condition skips nodes on a viscous wall.
  • The Euler wall Jacobian is the derivative of the pressure force only.
  • NEMO skips the multigrid velocity projection at Euler walls.

Tests

Check Before After
Heat-flux wall, 2000 W/m² specified 985 reported 1840 reported
Axisymmetric cone, CFL 20 residual flat at -7.55 -10.03

The printed flux comes from the temperature gradient, so it does not reach 2000.

  • New tests: heatflux_wall (viscous wedge, MARKER_HEATFLUX) and invwedge_mg (inviscid wedge, MGLEVEL= 1). Both fail with the old code (multigrid gives NaN).
  • New values from the CI for visc_cone, super_cat, partial_cat, ion_gy and the implicit invwedge cases.

Notes

  • Known issue, not fixed here: the printed TOTAL_HEATFLUX of axisymmetric cases is wrong. Each wall face stands for a ring around the axis. CFVMFlowSolverBase::Friction_Forces multiplies the forces by the ring length 2·π·y, but not the heat flux. All flow solvers use this function, so the fix needs its own PR.

Related

PR Checklist

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.

🤖 Generated with Claude Code

rois1995 and others added 12 commits November 23, 2026 12:01
super_cat.cfg and partial_cat.cfg set CATALYTIC_WALL= (wall), but the
marker of the mesh is "Wall" and marker names are case-sensitive. The wall
was therefore treated as non-catalytic and the two tests did not run the
catalytic boundary condition. The reference values of the two tests need
to be updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The recombination flux is rho_s * gamma * sqrt(Ru T_w / (2 pi M_s)). The
code used the universal gas constant in J/(mol K) together with the molar
mass in kg/kmol, so the flux was too small by sqrt(1000). Use the constant
in J/(kmol K), which the same function already defines for the
supercatalytic wall. For atomic nitrogen at 300 K the thermal speed
factor becomes 168 m/s (before: 5.3 m/s).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In BC_IsothermalCatalytic_Wall the species residuals are diffusion fluxes
multiplied by the face area. The enthalpy and vib.-el. energy carried by
these fluxes were multiplied by the area a second time, so the term scaled
with the square of the face size. The Jacobian of the same function
already treats it as (flux per area) * h_s * area.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…acobian

The energy flux at the wall is the sum over the species j of the diffusion
flux of j times its enthalpy. Its derivative with respect to the mass
fraction of species i therefore weights the Jacobian entry (j, i) with the
enthalpy of species j. The code used the enthalpy of species i, and the
same for the vib.-el. energy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rmal wall

BC_IsothermalNonCatalytic_Wall replaced the rows 1 to nDim of the Jacobian
by identity rows. In the NEMO layout these are species equations; the
momentum equations are the rows nSpecies to nSpecies+nDim-1, which the
heat-flux wall already uses. The residual was correct, so the converged
solution does not change, only the implicit update at wall points.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…its residual

The wall residual of the energy equations is
(k (T_i - T_j) + C k (T_wall - T_i)) A / d with C = 5, so its derivative
with respect to the wall point temperature has the factor (1 - C). The
Jacobian had the factor of a residual without the T_i dependence of the
control term, which is 4 times smaller. Jacobian only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BC_HeatFluxNonCatalytic_Wall added a "proportional control" term, the
conduction flux computed from the gradient at the wall point, on top of
the specified flux. The conduction between the wall point and the interior
is already in the viscous fluxes of the edges, so in steady state only a
part of a non-zero specified flux left the domain. The vib.-el. energy
equation also received the full specified flux, the same amount as the
total energy equation, so all of it entered as vib.-el. energy.

Apply the specified flux to the total energy, as CNSSolver does, and give
the vib.-el. energy the fraction kve / (ktr + kve). An adiabatic wall
(zero flux) now has a zero boundary residual.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The slip value of the vib.-el. temperature divided by the normal gradient
of the temperature, with a check of the vib.-el. gradient only. Write the
same expression without this division.

The mean free path used the gas constant of the fluid model, which holds
the composition of the last state set (free stream or inlet). Compute it
from the species densities of the wall point.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A name that is not in MARKER_ISOTHERMAL or MARKER_HEATFLUX had no effect
and gave no message. The two catalytic regression cases ran with a
non-catalytic wall for this reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CFVMFlowSolverBase::MultigridProjectEulerWall removes the normal momentum
at Euler walls. It uses the index of the primitive velocity on the
conservative solution. For NEMO this index points at the energies (2D), so
each multigrid cycle changed the energies of the wall points.

The NEMO Euler wall is a weak condition, it does not project the momentum,
so the NEMO solver now does no projection in multigrid.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A node that is on a viscous wall and on a symmetry or Euler wall marker
(for example the tip of a cone on the axis) got both conditions. The
viscous wall sets the velocity strongly: zero momentum residual and
identity rows in the Jacobian. The symmetry condition is applied later
and added its pressure flux and Jacobian to the same rows. The momentum
equations of the node were active again, so the linear solver gave the
node a velocity in every iteration and the wall condition removed it in
the next one. The residual of the node and of its neighbour stayed
constant and the run stalled.

Measured on the axisymmetric cone (CFL 20): the density residual was
constant at -7.55 for more than 1000 iterations. With the fix it falls
to -9.74 in the next 280 iterations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The residual of this boundary is only the pressure force on the
momentum equations. The Jacobian also held terms of the convective
flux, so it did not agree with the residual.

The Jacobian is now the derivative of the pressure force: dP/dU times
the unit normal in the momentum rows. The residual does not change.

On a coarse Mach 5 wedge (first order, implicit), the Roe and MSW
schemes now converge at CFL 10, and Roe also at CFL 50. Before, they
did not converge above CFL 3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread Common/src/CConfig.cpp Fixed
Comment thread Common/src/CConfig.cpp Fixed
rois1995 and others added 2 commits November 23, 2026 14:21
No change of results.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rois1995 and others added 2 commits November 23, 2026 17:48
Both use the existing wedge meshes. The previous code gives other values
for the heat flux wall, and NaN after a few iterations with multigrid.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants