|
DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
|
Lift-coefficient driver controller. More...
#include <CLDriver.hpp>
Public Member Functions | |
| CLDriver (const CLDriverSettings &settingsIn) | |
| Construct a CLDriver from the given settings. | |
| real | GetAOA () |
| Get the current angle of attack. | |
| void | Update (index iter, real CL, const MPIInfo &mpi) |
| Main driver update — call once per solver iteration. | |
| bool | ConvergedAtTarget () |
| Check whether the long-window convergence criterion is satisfied. | |
| Geom::tGPoint | GetAOARotation () |
| Compute the rotation matrix that rotates the freestream from AoA = 0 to the current AoA. | |
| Geom::tPoint | GetCL0Direction () |
| Get the unit vector for the zero-AoA lift direction. | |
| Geom::tPoint | GetCD0Direction () |
| Get the unit vector for the zero-AoA drag direction. | |
| real | GetForce2CoeffRatio () |
| Compute the multiplicative factor that converts an integrated force to a non-dimensional aerodynamic coefficient. | |
Lift-coefficient driver controller.
Called once per solver iteration with the current CL value. Maintains a circular sliding window of recent CL samples. When the window is full and the maximum deviation from the mean falls below a (possibly tightened) threshold, the driver estimates the local CL slope dCL/dAoA from the previous and current converged CL values, clamps it to [0.9, 10] times the thin-airfoil theoretical slope (2*pi per radian ≈ pi^2/90 per degree), and computes a new angle of attack with under-relaxation.
A separate long-window counter tracks how many consecutive iterations the CL error stays within CLconvergeLongThreshold; when the counter reaches CLconvergeLongWindow the solver may terminate.
Definition at line 100 of file CLDriver.hpp.
|
inline |
Construct a CLDriver from the given settings.
Validates axis strings, allocates the CL history window, and sets the initial angle of attack from CLDriverSettings::AOAInit.
| settingsIn | Fully populated CLDriverSettings instance. |
Definition at line 141 of file CLDriver.hpp.
|
inline |
Check whether the long-window convergence criterion is satisfied.
Returns true when the CL error has remained within CLDriverSettings::CLconvergeLongThreshold for at least CLDriverSettings::CLconvergeLongWindow consecutive iterations. The solver may use this to terminate the main iteration loop.
Definition at line 244 of file CLDriver.hpp.
|
inline |
Get the current angle of attack.
Definition at line 162 of file CLDriver.hpp.
|
inline |
Compute the rotation matrix that rotates the freestream from AoA = 0 to the current AoA.
Supports rotation about the z-axis (standard 2-D convention) and the y-axis. The sign convention follows the right-hand rule for z and a negated angle for y so that positive AoA corresponds to positive lift in the standard aerodynamic frame.
Definition at line 259 of file CLDriver.hpp.
|
inline |
Get the unit vector for the zero-AoA drag direction.
Returns a unit vector along CLDriverSettings::CD0Axis. Currently supports "x" only.
Definition at line 305 of file CLDriver.hpp.
|
inline |
Get the unit vector for the zero-AoA lift direction.
Returns a unit vector along CLDriverSettings::CL0Axis. Currently supports "y" and "z".
Definition at line 284 of file CLDriver.hpp.
|
inline |
Compute the multiplicative factor that converts an integrated force to a non-dimensional aerodynamic coefficient.
The factor is 1 / (refArea * refDynamicPressure).
Definition at line 324 of file CLDriver.hpp.
Main driver update — call once per solver iteration.
Pushes the current CL into the sliding window, updates the long-window convergence counter, and (if the driver is active and the window has converged) computes a new AoA based on the estimated dCL/dAoA slope.
The slope is clamped to [0.9, 10] times the thin-airfoil theoretical value (pi^2/90 per degree). The AoA increment is under-relaxed by CLDriverSettings::CLIncrementRelax.
| iter | Current solver iteration number. |
| CL | Lift coefficient computed at this iteration. |
| mpi | MPI communicator info (rank 0 prints log messages). |
warning, assuming positive CLSlope now
Definition at line 182 of file CLDriver.hpp.