DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
DNDS::Euler::CLDriver Class Reference

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CLDriver()

DNDS::Euler::CLDriver::CLDriver ( const CLDriverSettings settingsIn)
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.

Parameters
settingsInFully populated CLDriverSettings instance.

Definition at line 141 of file CLDriver.hpp.

Member Function Documentation

◆ ConvergedAtTarget()

bool DNDS::Euler::CLDriver::ConvergedAtTarget ( )
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.

Returns
True if converged at the target CL for sufficiently many iterations.

Definition at line 244 of file CLDriver.hpp.

◆ GetAOA()

real DNDS::Euler::CLDriver::GetAOA ( )
inline

Get the current angle of attack.

Returns
Current AoA in degrees.

Definition at line 162 of file CLDriver.hpp.

◆ GetAOARotation()

Geom::tGPoint DNDS::Euler::CLDriver::GetAOARotation ( )
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.

Returns
3×3 rotation matrix (Geom::tGPoint) encoding the current AoA.

Definition at line 259 of file CLDriver.hpp.

Here is the call graph for this function:

◆ GetCD0Direction()

Geom::tPoint DNDS::Euler::CLDriver::GetCD0Direction ( )
inline

Get the unit vector for the zero-AoA drag direction.

Returns a unit vector along CLDriverSettings::CD0Axis. Currently supports "x" only.

Returns
3-D unit vector (Geom::tPoint) in the drag direction.

Definition at line 305 of file CLDriver.hpp.

◆ GetCL0Direction()

Geom::tPoint DNDS::Euler::CLDriver::GetCL0Direction ( )
inline

Get the unit vector for the zero-AoA lift direction.

Returns a unit vector along CLDriverSettings::CL0Axis. Currently supports "y" and "z".

Returns
3-D unit vector (Geom::tPoint) in the lift direction.

Definition at line 284 of file CLDriver.hpp.

◆ GetForce2CoeffRatio()

real DNDS::Euler::CLDriver::GetForce2CoeffRatio ( )
inline

Compute the multiplicative factor that converts an integrated force to a non-dimensional aerodynamic coefficient.

The factor is 1 / (refArea * refDynamicPressure).

Returns
Force-to-coefficient ratio (dimensionless).

Definition at line 324 of file CLDriver.hpp.

◆ Update()

void DNDS::Euler::CLDriver::Update ( index  iter,
real  CL,
const MPIInfo mpi 
)
inline

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.

Parameters
iterCurrent solver iteration number.
CLLift coefficient computed at this iteration.
mpiMPI communicator info (rank 0 prints log messages).

warning, assuming positive CLSlope now

Definition at line 182 of file CLDriver.hpp.

Here is the call graph for this function:

The documentation for this class was generated from the following file: