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
The state
Each station on the airfoil and in the wake carries four unknowns:
| Unknown | Meaning |
|---|---|
| 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
- Solve potential flow and lay out the wake along a streamline.
- Find the stagnation point and march a first guess for the boundary layer
down each surface. With
warm_start(the default), a secondSolve()on the same object starts from the previous solution instead, shifted along each surface to the new stagnation point. - 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:
Show data
| Newton iteration | ‖R‖ |
|---|---|
| 0 | 1.20e+0 |
| 1 | 5.55e-1 |
| 2 | 1.02e-1 |
| 3 | 6.27e-3 |
| 4 | 3.83e-5 |
| 5 | 1.45e-8 |
| 6 | 1.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
| Quantity | Where it comes from |
|---|---|
cl, cm | Surface pressure integration |
cd | Momentum deficit at the end of the wake, extrapolated to infinity (Squire–Young) |
cdf | Integrated skin friction |
cdp | cd − 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.