mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add rpmToRads() convenience functions
- simplifies conversion of RPM to radians/sec for const variables
This commit is contained in:
@ -42,6 +42,8 @@ int main(int argc, char *argv[])
|
||||
Info<< "degToRad(30): " << degToRad(30) << nl;
|
||||
|
||||
Info<< "cos(30_deg): " << ::cos(30_deg) << nl;
|
||||
Info<< "1000 rpm = " << rpmToRads(1000) << " 1/s" << nl;
|
||||
Info<< "100 1/s = " << radsToRpm(100) << " rpm" << nl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "unitConversion.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -47,7 +47,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
scalar Vphi = (constant::mathematical::pi*swirlRPMRatio*rpm/30).value();
|
||||
scalar Vphi = (swirlRPMRatio * rpm * rpmToRads()).value();
|
||||
scalar b1 = j1(swirlProfile).value();
|
||||
scalar b2 = 2.0*b1/swirlProfile.value() - j0(swirlProfile).value();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user