flow.solver.recommended_alpha_max
flow.solver.recommended_alpha_max(config)A drag strong enough that the solid reads as impermeable.
Measured on the starter sink at 32x32x64, inlet_speed = 0.02, Re = 100, with the "smoothstep" profile – leak is mean |u| where chi > 0.8, as a fraction of the inlet speed:
========= ========== ========== alpha_max drop leak ========= ========== ========== 1 5.63e-3 2.2e-2 5 6.24e-3 6.1e-3 20 6.49e-3 1.9e-3 100 6.64e-3 5.0e-4 400 6.72e-3 2.0e-4 2000 6.89e-3 4.3e-5 50000 7.66e-3 2.7e-6 ========= ========== ==========
Leak falls like 1/alpha; the pressure drop converges much more slowly, because the penalised wall sits a penetration depth sqrt(nu/alpha) inside the true one and that error only falls like 1/sqrt(alpha). Chasing the last percent is therefore not worth the stiffness it puts into the adjoint, and :data:DEFAULT_ALPHA_MAX sits where leak is under 3e-4 and the drop is within about 3% of its value at fifty times the drag.
The march stays finite to alpha_max = 5e4 at least, so this is a working point rather than a stability limit – but see :mod:cadjoint.flow.domain on why it is only a working point with a compactly supported chi.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| config | FlowConfig | The flow configuration. | required |
Returns
| Name | Type | Description |
|---|---|---|
| float | A suggested alpha_max. |