Skip to main content
Version: 0.2.0

Viscous coupling

With Re > 0, Scirocco adds a boundary layer on both surfaces and a wake behind the trailing edge. The boundary layer displaces the outer flow, and the outer flow drives the boundary layer, so both are solved together as one nonlinear system with Newton's method.

  • Viscous, Re = 10⁶
  • Inviscid
-1-0.500.511.500.20.40.60.81x/c−Cp
NACA 2412 at α = 4°, 160 panels. Viscous: Cl = 0.720, Cd = 0.00693. The boundary layer lowers the suction peak and relieves the trailing-edge pressure recovery. Section drawn to scale.

The state​

Each station on the airfoil and in the wake carries four unknowns:

UnknownMeaning
Momentum thickness
Displacement thickness
or Amplification factor where the flow is laminar, shear-stress coefficient where it is turbulent
Edge velocity

The residual combines the integral momentum and shape-parameter equations, an amplification or shear-lag equation, and the coupling to the outer flow. The outer flow sees the boundary layer through the mass defect : a precomputed influence matrix maps changes in to changes in .

The solve​

  1. Solve potential flow and lay out the wake along a streamline.
  2. Find the stagnation point and march a first guess for the boundary layer down each surface. With warm_start (the default), a second Solve() on the same object starts from the previous solution instead, shifted along each surface to the new stagnation point.
  3. Run Newton iterations on the full coupled system, updating the stagnation point and the transition location as they move.

The Jacobian is exact, so a well-posed case converges in a handful of steps:

1e-121e-91e-61e-31e00123456Newton iteration‖R‖
NACA 2412, α = 4°, Re = 10⁶, 160 panels. From a cold start the residual falls twelve orders of magnitude in 6 Newton steps.
Show data
Residual
Newton iteration‖R‖
01.20e+0
15.55e-1
21.02e-1
36.27e-3
43.83e-5
51.45e-8
61.23e-14

Each Newton step solves a linear system with unknowns. The coupling rows are dense: every node's depends on the mass defect of every other node. Substituting for turns that block into a diagonal, and eliminating the boundary-layer unknowns, which couple only to the station upstream, leaves an dense system. The step costs about 2 ms at 200 panels and is exact; the adjoint uses the same factorization.

Between Newton steps the boundary layer is re-solved by a march down each surface, as in XFOIL. Each station is solved with the station upstream fixed and its edge velocity held close to the current iterate: a combination of and chosen so that the station is solved in direct mode in attached flow and in inverse mode near separation, where alone would make the problem singular. On laminar stretches the march places transition where the amplification reaches , with the same test used to accept the converged solution. Newton then only has to settle the coupling between the boundary layer and the outer flow, and typical cases converge in 7-11 steps. The march doesn't change the converged answer: its equations are the global ones, so a converged state is a fixed point.

Newton steps are damped with pseudo-transient continuation when the residual grows. If a cold start still fails, Scirocco retries along a continuation path in angle of attack. Solve() returns true only when the residual meets the tolerance, or stops falling below rtol_floor.

Outputs​

QuantityWhere it comes from
cl, cmSurface pressure integration
cdMomentum deficit at the end of the wake, extrapolated to infinity (Squire–Young)
cdfIntegrated skin friction
cdpcd − cdf

Limits​

Integral boundary-layer models are reliable for attached flow and small separation bubbles. Near and past stall, the solve may still converge, but the answer is less trustworthy. Converging is not the same as being right; compare against data for your regime.

Source: boundary_layer.cpp, coupled_solver.cpp, coupled_linear.cpp, bl_march.cpp, forces.cpp.