SMALL, GREAT and ROOTVSMALL - what is that?
Dear Foamers!
I'm working on Euler/Lagrange validation cases at the moment. While looking into Disoersion Models I discoverd something in the Code - SMALL, GREAT and ROOTVSMALL. Some examples (from /openfoam211/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.C) Code:
Code:
else Code:
const scalar epsilon = Best, Thomas |
Hi Thomas,
SMALL, VSMALL, LARGE, ... are simply constants defined in src/OpenFOAM/primitives/Scalar/scalar/scalar.H and src/OpenFOAM/primitives/Scalar/floatScalar/floatScalar.H In summary: Code:
GREAT = 1.0e+6; Cheers, Lieven |
Slight correction; the values depend on whether openfoam is compiled in single or double precision.
|
How indeed, my apologies for this laxity. The values mentioned above are for a double precision compilation.
Cheers L |
Thanks for the quick reply - it all makes sense now!
|
Correction; the values above are for single precision.
|
Double Precision Values
I know this is old, but sometimes these posts get a lot of traffic. Just to eliminate any confusion, the double precision values are:
static const doubleScalar doubleScalarGREAT = 1.0e+15; static const doubleScalar doubleScalarVGREAT = 1.0e+300; static const doubleScalar doubleScalarROOTVGREAT = 1.0e+150; static const doubleScalar doubleScalarSMALL = 1.0e-15; static const doubleScalar doubleScalarVSMALL = 1.0e-300; static const doubleScalar doubleScalarROOTVSMALL = 1.0e-150; |
Be aware that the hard-coded scalar limits have been replaced: https://github.com/OpenFOAM/OpenFOAM...9d7f1ee5912713
|
All times are GMT -4. The time now is 18:05. |