Skip to main content
Version: 0.3.1

Pseudo-transient continuation

Newton's method converges fast once it is close to the answer, but a bad step far from it can throw the iteration off course. Pseudo-transient continuation (PTC) adds damping when the residual grows and removes it as the residual falls. It's on by default.

The step​

A plain Newton step solves

A PTC step adds a diagonal term,

where puts on each equation's own unknown: boundary-layer equation of a station on unknown of that station, and the coupling equation on . Large gives back plain Newton. Small shortens the step towards , a cautious move down the residual. The converged answer, , doesn't depend on , so PTC changes the path, not the destination.

How τ changes​

After each step, Scirocco compares the residual with the previous one, :

  • If the residual fell (), grows by , at most by a factor of tau_grow_clamp.
  • If it didn't, shrinks by , at most by a factor of tau_shrink_clamp.
  • always stays between tau_min and tau_max.

It starts at tau_init = 1e6, which is effectively plain Newton. On an easy case PTC never engages.

What it does in practice​

PTC is a safeguard, not a speed-up. On this difficult start it never engages, and both variants take the same 14 steps:

  • PTC (default), 14 steps
  • Plain Newton, 14 steps
1e-121e-91e-61e-31e0010Newton iteration‖R‖
NACA 0012, α = 5°, Re = 10⁶, 199 panels. The residual stalls near 1 while the amplification march struggles at one station, then Newton takes over. PTC reaches 10⁻¹¹ first, then hovers just above the tolerance for ten more steps.
Show data
PTC (default), 14 steps
Newton iteration‖R‖
02.09e+0
11.34e+0
27.87e-1
39.22e-1
46.03e-1
57.04e-1
62.49e-1
72.25e-1
81.33e-1
96.47e-2
101.09e-1
113.07e-2
123.12e-4
137.64e-8
141.41e-13
Plain Newton, 14 steps
Newton iteration‖R‖
02.09e+0
11.34e+0
27.87e-1
39.22e-1
46.03e-1
57.04e-1
62.49e-1
72.25e-1
81.33e-1
96.46e-2
101.09e-1
113.07e-2
123.12e-4
137.58e-8
144.58e-14

Its real value is on starts where an undamped step would diverge, such as the odd shapes an optimizer tries along the way.

Tuning​

SymptomTry
Diverges in the first one or two stepsStart damped: param.tau_init = 1e2
Residual oscillates between two levelsSlow the return to Newton: param.tau_grow_clamp = 2.0
Still falling when it hits the iteration limitRaise param.niglob
You want a plain-Newton baselineparam.use_ptc = false

All fields are listed under Solver parameters.

Gradients aren't affected​

The adjoint uses the plain Jacobian at the converged state, without the term. If PTC and plain Newton reach the same solution, they give the same gradients.