Reverted the Americanism "math" back to the original "mathematical" and reverted name of

the include file back to mathematicalConstants.H to make upgrading code slightly easier.
This commit is contained in:
henry
2009-10-10 22:58:58 +01:00
parent d416664301
commit e9da288118
129 changed files with 422 additions and 417 deletions

View File

@ -30,7 +30,7 @@ scalar gasMass0 = fvc::domainIntegrate(rho).value();
if (dieselSpray.twoD()) if (dieselSpray.twoD())
{ {
gasMass0 *= constant::math::twoPi/dieselSpray.angleOfWedge(); gasMass0 *= constant::mathematical::twoPi/dieselSpray.angleOfWedge();
} }
gasMass0 -= gasMass0 -=

View File

@ -43,7 +43,7 @@ Description
#include "OFstream.H" #include "OFstream.H"
#include "volPointInterpolation.H" #include "volPointInterpolation.H"
#include "thermoPhysicsTypes.H" #include "thermoPhysicsTypes.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -20,7 +20,7 @@
if (dieselSpray.twoD()) if (dieselSpray.twoD())
{ {
gasMass *= constant::math::twoPi/dieselSpray.angleOfWedge(); gasMass *= constant::mathematical::twoPi/dieselSpray.angleOfWedge();
} }
scalar addedMass = gasMass - gasMass0; scalar addedMass = gasMass - gasMass0;

View File

@ -41,7 +41,7 @@ Description
#include "IFstream.H" #include "IFstream.H"
#include "OFstream.H" #include "OFstream.H"
#include "Switch.H" #include "Switch.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -58,7 +58,7 @@ Description
#include "ignition.H" #include "ignition.H"
#include "Switch.H" #include "Switch.H"
#include "OFstream.H" #include "OFstream.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -28,7 +28,7 @@ License
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "fvPatchFieldMapper.H" #include "fvPatchFieldMapper.H"
#include "volFields.H" #include "volFields.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -182,7 +182,7 @@ void smoluchowskiJumpTFvPatchScalarField::updateCoeffs()
} }
Field<scalar> C2 = pmu/prho Field<scalar> C2 = pmu/prho
*sqrt(ppsi*constant::math::piByTwo) *sqrt(ppsi*constant::mathematical::piByTwo)
*2.0*gamma_/Pr.value()/(gamma_ + 1.0) *2.0*gamma_/Pr.value()/(gamma_ + 1.0)
*(2.0 - accommodationCoeff_)/accommodationCoeff_; *(2.0 - accommodationCoeff_)/accommodationCoeff_;

View File

@ -28,7 +28,7 @@ Description
#include "maxwellSlipUFvPatchVectorField.H" #include "maxwellSlipUFvPatchVectorField.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "fvPatchFieldMapper.H" #include "fvPatchFieldMapper.H"
#include "volFields.H" #include "volFields.H"
#include "surfaceFields.H" #include "surfaceFields.H"
@ -147,7 +147,7 @@ void maxwellSlipUFvPatchVectorField::updateCoeffs()
const fvPatchField<scalar>& ppsi = const fvPatchField<scalar>& ppsi =
patch().lookupPatchField<volScalarField, scalar>("psi"); patch().lookupPatchField<volScalarField, scalar>("psi");
Field<scalar> C1 = sqrt(ppsi*constant::math::piByTwo) Field<scalar> C1 = sqrt(ppsi*constant::mathematical::piByTwo)
*(2.0 - accommodationCoeff_)/accommodationCoeff_; *(2.0 - accommodationCoeff_)/accommodationCoeff_;
Field<scalar> pnu = pmu/prho; Field<scalar> pnu = pmu/prho;

View File

@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "SchnerrSauer.H" #include "SchnerrSauer.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -77,7 +77,7 @@ Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::rRb
{ {
return pow return pow
( (
((4*constant::math::pi*n_)/3) ((4*constant::mathematical::pi*n_)/3)
*limitedAlpha1/(1.0 + alphaNuc() - limitedAlpha1), *limitedAlpha1/(1.0 + alphaNuc() - limitedAlpha1),
1.0/3.0 1.0/3.0
); );
@ -87,7 +87,7 @@ Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::rRb
Foam::dimensionedScalar Foam::dimensionedScalar
Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::alphaNuc() const Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::alphaNuc() const
{ {
dimensionedScalar Vnuc = n_*constant::math::pi*pow3(dNuc_)/6; dimensionedScalar Vnuc = n_*constant::mathematical::pi*pow3(dNuc_)/6;
return Vnuc/(1 + Vnuc); return Vnuc/(1 + Vnuc);
} }

View File

@ -29,12 +29,12 @@ License
#include "Time.H" #include "Time.H"
#include "subCycle.H" #include "subCycle.H"
#include "fvCFD.H" #include "fvCFD.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * //
const scalar Foam::multiphaseMixture::convertToRad = const scalar Foam::multiphaseMixture::convertToRad =
Foam::constant::math::pi/180.0; Foam::constant::mathematical::pi/180.0;
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

View File

@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "GidaspowConductivity.H" #include "GidaspowConductivity.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -69,7 +69,7 @@ Foam::tmp<Foam::volScalarField> Foam::GidaspowConductivity::kappa
const dimensionedScalar& e const dimensionedScalar& e
) const ) const
{ {
const scalar sqrtPi = sqrt(constant::math::pi); const scalar sqrtPi = sqrt(constant::mathematical::pi);
return rhoa*da*sqrt(Theta)* return rhoa*da*sqrt(Theta)*
( (

View File

@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "HrenyaSinclairConductivity.H" #include "HrenyaSinclairConductivity.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -74,7 +74,7 @@ Foam::tmp<Foam::volScalarField> Foam::HrenyaSinclairConductivity::kappa
const dimensionedScalar& e const dimensionedScalar& e
) const ) const
{ {
const scalar sqrtPi = sqrt(constant::math::pi); const scalar sqrtPi = sqrt(constant::mathematical::pi);
volScalarField lamda = volScalarField lamda =
scalar(1) + da/(6.0*sqrt(2.0)*(alpha + scalar(1.0e-5)))/L_; scalar(1) + da/(6.0*sqrt(2.0)*(alpha + scalar(1.0e-5)))/L_;

View File

@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "SyamlalConductivity.H" #include "SyamlalConductivity.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -69,7 +69,7 @@ Foam::tmp<Foam::volScalarField> Foam::SyamlalConductivity::kappa
const dimensionedScalar& e const dimensionedScalar& e
) const ) const
{ {
const scalar sqrtPi = sqrt(constant::math::pi); const scalar sqrtPi = sqrt(constant::mathematical::pi);
return rhoa*da*sqrt(Theta)* return rhoa*da*sqrt(Theta)*
( (

View File

@ -26,7 +26,7 @@ License
#include "kineticTheoryModel.H" #include "kineticTheoryModel.H"
#include "surfaceInterpolate.H" #include "surfaceInterpolate.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "fvCFD.H" #include "fvCFD.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -204,7 +204,7 @@ void Foam::kineticTheoryModel::solve()
volScalarField alpha = alpha_; volScalarField alpha = alpha_;
alpha.max(1.0e-6); alpha.max(1.0e-6);
const scalar sqrtPi = sqrt(constant::math::pi); const scalar sqrtPi = sqrt(constant::mathematical::pi);
surfaceScalarField phi = 1.5*rhoa_*phia_*fvc::interpolate(alpha_); surfaceScalarField phi = 1.5*rhoa_*phia_*fvc::interpolate(alpha_);

View File

@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "GidaspowViscosity.H" #include "GidaspowViscosity.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -70,7 +70,7 @@ Foam::kineticTheoryModels::GidaspowViscosity::mua
const dimensionedScalar& e const dimensionedScalar& e
) const ) const
{ {
const scalar sqrtPi = sqrt(constant::math::pi); const scalar sqrtPi = sqrt(constant::mathematical::pi);
return rhoa*da*sqrt(Theta)* return rhoa*da*sqrt(Theta)*
( (

View File

@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "HrenyaSinclairViscosity.H" #include "HrenyaSinclairViscosity.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -77,7 +77,7 @@ Foam::kineticTheoryModels::HrenyaSinclairViscosity::mua
const dimensionedScalar& e const dimensionedScalar& e
) const ) const
{ {
const scalar sqrtPi = sqrt(constant::math::pi); const scalar sqrtPi = sqrt(constant::mathematical::pi);
volScalarField lamda = volScalarField lamda =
scalar(1) + da/(6.0*sqrt(2.0)*(alpha + scalar(1.0e-5)))/L_; scalar(1) + da/(6.0*sqrt(2.0)*(alpha + scalar(1.0e-5)))/L_;

View File

@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "SyamlalViscosity.H" #include "SyamlalViscosity.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -69,7 +69,7 @@ Foam::tmp<Foam::volScalarField> Foam::kineticTheoryModels::SyamlalViscosity::mua
const dimensionedScalar& e const dimensionedScalar& e
) const ) const
{ {
const scalar sqrtPi = sqrt(constant::math::pi); const scalar sqrtPi = sqrt(constant::mathematical::pi);
return rhoa*da*sqrt(Theta)* return rhoa*da*sqrt(Theta)*
( (

View File

@ -32,7 +32,7 @@ Description
#include "graph.H" #include "graph.H"
#include "OFstream.H" #include "OFstream.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
using namespace Foam; using namespace Foam;
@ -50,7 +50,7 @@ int main()
scalarField b = 0.5*(1.0 + erf(x)); scalarField b = 0.5*(1.0 + erf(x));
scalarField c = 1.0 - b; scalarField c = 1.0 - b;
scalarField gradb = (1/::sqrt(constant::math::pi))*exp(-sqr(x)); scalarField gradb = (1/::sqrt(constant::mathematical::pi))*exp(-sqr(x));
scalarField lapb = -2*x*gradb; scalarField lapb = -2*x*gradb;
r = lapb*b*c/(gradb*gradb); r = lapb*b*c/(gradb*gradb);

View File

@ -47,7 +47,7 @@ Description
#include "polyTopoChanger.H" #include "polyTopoChanger.H"
#include "polyMesh.H" #include "polyMesh.H"
#include "mapPolyMesh.H" #include "mapPolyMesh.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "PackedBoolList.H" #include "PackedBoolList.H"
#include "SortableList.H" #include "SortableList.H"
@ -467,7 +467,7 @@ int main(int argc, char *argv[])
scalar angle(readScalar(IStringStream(args.additionalArgs()[1])())); scalar angle(readScalar(IStringStream(args.additionalArgs()[1])()));
bool overwrite = args.optionFound("overwrite"); bool overwrite = args.optionFound("overwrite");
scalar maxCos = Foam::cos(angle*180/constant::math::pi); scalar maxCos = Foam::cos(angle*180/constant::mathematical::pi);
Info<< "Merging:" << nl Info<< "Merging:" << nl
<< " edges with length less than " << minLen << " meters" << nl << " edges with length less than " << minLen << " meters" << nl

View File

@ -53,7 +53,7 @@ Description
#include "removePoints.H" #include "removePoints.H"
#include "polyMesh.H" #include "polyMesh.H"
#include "mapPolyMesh.H" #include "mapPolyMesh.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
using namespace Foam; using namespace Foam;
@ -445,12 +445,12 @@ int main(int argc, char *argv[])
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])())); scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
scalar minCos = Foam::cos(featureAngle*constant::math::pi/180.0); scalar minCos = Foam::cos(featureAngle*constant::mathematical::pi/180.0);
scalar concaveAngle = defaultConcaveAngle; scalar concaveAngle = defaultConcaveAngle;
args.optionReadIfPresent("concaveAngle", concaveAngle); args.optionReadIfPresent("concaveAngle", concaveAngle);
scalar concaveSin = Foam::sin(concaveAngle*constant::math::pi/180.0); scalar concaveSin = Foam::sin(concaveAngle*constant::mathematical::pi/180.0);
bool snapMeshDict = args.optionFound("snapMesh"); bool snapMeshDict = args.optionFound("snapMesh");
bool overwrite = args.optionFound("overwrite"); bool overwrite = args.optionFound("overwrite");

View File

@ -49,7 +49,7 @@ Description
#include "cellSet.H" #include "cellSet.H"
#include "cellModeller.H" #include "cellModeller.H"
#include "meshCutter.H" #include "meshCutter.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "geomCellLooper.H" #include "geomCellLooper.H"
#include "plane.H" #include "plane.H"
#include "edgeVertex.H" #include "edgeVertex.H"
@ -539,7 +539,7 @@ int main(int argc, char *argv[])
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])())); scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
scalar radAngle = featureAngle*constant::math::pi/180.0; scalar radAngle = featureAngle*constant::mathematical::pi/180.0;
scalar minCos = Foam::cos(radAngle); scalar minCos = Foam::cos(radAngle);
scalar minSin = Foam::sin(radAngle); scalar minSin = Foam::sin(radAngle);

View File

@ -43,7 +43,7 @@ Description
#include "symmetryPolyPatch.H" #include "symmetryPolyPatch.H"
#include "wedgePolyPatch.H" #include "wedgePolyPatch.H"
#include "cyclicPolyPatch.H" #include "cyclicPolyPatch.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
using namespace Foam; using namespace Foam;

View File

@ -434,7 +434,7 @@ if (pFaces[WEDGE].size() && pFaces[WEDGE][0].size())
{ {
// Distribute the points to be +/- 2.5deg from the x-z plane // Distribute the points to be +/- 2.5deg from the x-z plane
scalar tanTheta = Foam::tan(2.5*constant::math::pi/180.0); scalar tanTheta = Foam::tan(2.5*constant::mathematical::pi/180.0);
SLList<face>::iterator iterf = pFaces[WEDGE][0].begin(); SLList<face>::iterator iterf = pFaces[WEDGE][0].begin();
SLList<face>::iterator iterb = pFaces[WEDGE][1].begin(); SLList<face>::iterator iterb = pFaces[WEDGE][1].begin();

View File

@ -59,7 +59,7 @@ Usage
#include "Time.H" #include "Time.H"
#include "timeSelector.H" #include "timeSelector.H"
#include "fvMesh.H" #include "fvMesh.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "polyTopoChange.H" #include "polyTopoChange.H"
#include "mapPolyMesh.H" #include "mapPolyMesh.H"
#include "PackedBoolList.H" #include "PackedBoolList.H"
@ -91,7 +91,7 @@ void simpleMarkFeatures
labelList& multiCellFeaturePoints labelList& multiCellFeaturePoints
) )
{ {
scalar minCos = Foam::cos(featureAngle*constant::math::pi/180.0); scalar minCos = Foam::cos(featureAngle*constant::mathematical::pi/180.0);
const polyBoundaryMesh& patches = mesh.boundaryMesh(); const polyBoundaryMesh& patches = mesh.boundaryMesh();
@ -387,7 +387,7 @@ int main(int argc, char *argv[])
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])())); scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
scalar minCos = Foam::cos(featureAngle*constant::math::pi/180.0); scalar minCos = Foam::cos(featureAngle*constant::mathematical::pi/180.0);
Info<< "Feature:" << featureAngle << endl Info<< "Feature:" << featureAngle << endl
<< "minCos :" << minCos << endl << "minCos :" << minCos << endl

View File

@ -33,7 +33,7 @@ Description
#include "IOmanip.H" #include "IOmanip.H"
#include "boundBox.H" #include "boundBox.H"
#include "Map.H" #include "Map.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -99,7 +99,7 @@ void starMesh::createCoupleMatches()
<< coupleI << ". STAR couple ID: " << coupleI << ". STAR couple ID: "
<< couples_[coupleI].coupleID() << endl << couples_[coupleI].coupleID() << endl
<< "The angle between face normals is " << "The angle between face normals is "
<< Foam::acos(faceAreaAngle)/constant::math::pi*180 << Foam::acos(faceAreaAngle)/constant::mathematical::pi*180
<< " deg." << endl << " deg." << endl
<< "master cell: " << fp.masterCell() << "master cell: " << fp.masterCell()
<< " STAR number: " << starCellID_[fp.masterCell()] << " STAR number: " << starCellID_[fp.masterCell()]

View File

@ -29,7 +29,7 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "arcEdge.H" #include "arcEdge.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -78,7 +78,7 @@ Foam::cylindricalCS Foam::arcEdge::calcAngle()
// find angles // find angles
scalar tmp = (r3&r1)/(mag(r3)*mag(r1)); scalar tmp = (r3&r1)/(mag(r3)*mag(r1));
angle_ = acos(tmp)*180.0/constant::math::pi; angle_ = acos(tmp)*180.0/constant::mathematical::pi;
// check if the vectors define an exterior or an interior arcEdge // check if the vectors define an exterior or an interior arcEdge
if (((r1 ^ r2)&(r1 ^ r3)) < 0.0) angle_ = 360 - angle_; if (((r1 ^ r2)&(r1 ^ r3)) < 0.0) angle_ = 360 - angle_;
@ -162,7 +162,7 @@ Foam::vector Foam::arcEdge::position(const scalar lambda) const
//- Return the length of the curve //- Return the length of the curve
Foam::scalar Foam::arcEdge::length() const Foam::scalar Foam::arcEdge::length() const
{ {
return angle_*radius_*constant::math::pi/180.0; return angle_*radius_*constant::mathematical::pi/180.0;
} }

View File

@ -26,7 +26,7 @@ License
#include "wedge.H" #include "wedge.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -52,7 +52,7 @@ wedge::wedge(const dictionary& dict)
angle_ angle_
( (
readScalar(coeffDict_.lookup("angle")) readScalar(coeffDict_.lookup("angle"))
*constant::math::pi/180.0 *constant::mathematical::pi/180.0
) )
{} {}

View File

@ -33,7 +33,7 @@ Description
#include "Time.H" #include "Time.H"
#include "boundaryMesh.H" #include "boundaryMesh.H"
#include "repatchPolyTopoChanger.H" #include "repatchPolyTopoChanger.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "OFstream.H" #include "OFstream.H"
#include "ListOps.H" #include "ListOps.H"
@ -93,7 +93,7 @@ int main(int argc, char *argv[])
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])())); scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
bool overwrite = args.optionFound("overwrite"); bool overwrite = args.optionFound("overwrite");
scalar minCos = Foam::cos(featureAngle*constant::math::pi/180.0); scalar minCos = Foam::cos(featureAngle*constant::mathematical::pi/180.0);
Info<< "Feature:" << featureAngle << endl Info<< "Feature:" << featureAngle << endl
<< "minCos :" << minCos << endl << "minCos :" << minCos << endl

View File

@ -67,10 +67,10 @@ Usage
#include "transformField.H" #include "transformField.H"
#include "transformGeometricField.H" #include "transformGeometricField.H"
#include "IStringStream.H" #include "IStringStream.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
using namespace Foam; using namespace Foam;
using namespace Foam::constant::math; using namespace Foam::constant::mathematical;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -31,7 +31,7 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "fvCFD.H" #include "fvCFD.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -45,7 +45,7 @@ int main(int argc, char *argv[])
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
scalar Vphi = (constant::math::pi*swirlRPMRatio*rpm/30).value(); scalar Vphi = (constant::mathematical::pi*swirlRPMRatio*rpm/30).value();
scalar b1 = j1(swirlProfile).value(); scalar b1 = j1(swirlProfile).value();
scalar b2 = 2.0*b1/swirlProfile.value() - j0(swirlProfile).value(); scalar b2 = 2.0*b1/swirlProfile.value() - j0(swirlProfile).value();

View File

@ -43,10 +43,10 @@ Description
#include "transformField.H" #include "transformField.H"
#include "Pair.H" #include "Pair.H"
#include "quaternion.H" #include "quaternion.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
using namespace Foam; using namespace Foam;
using namespace Foam::constant::math; using namespace Foam::constant::mathematical;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "universalConstants.H" #include "universalConstants.H"
#include "electromagneticConstants.H" #include "electromagneticConstants.H"
#include "atomicConstants.H" #include "atomicConstants.H"
@ -83,7 +83,7 @@ const Foam::dimensionedScalar Foam::constant::atomic::a0
( (
"a0", "a0",
alpha alpha
/(dimensionedScalar("C", dimless, 4.0*constant::math::pi)*Rinf) /(dimensionedScalar("C", dimless, 4.0*constant::mathematical::pi)*Rinf)
) )
) )
); );
@ -100,7 +100,7 @@ const Foam::dimensionedScalar Foam::constant::atomic::re
"re", "re",
sqr(constant::electromagnetic::e) sqr(constant::electromagnetic::e)
/( /(
dimensionedScalar("C", dimless, 4.0*constant::math::pi) dimensionedScalar("C", dimless, 4.0*constant::mathematical::pi)
*constant::electromagnetic::epsilon0 *constant::electromagnetic::epsilon0
*me *me
*sqr(constant::universal::c) *sqr(constant::universal::c)

View File

@ -38,7 +38,7 @@ Description
// Dimensionless coefficents // Dimensionless coefficents
// Mathematical constants // Mathematical constants
#include "mathConstants.H" #include "mathematicalConstants.H"
// Dimensioned constants // Dimensioned constants

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "universalConstants.H" #include "universalConstants.H"
#include "electromagneticConstants.H" #include "electromagneticConstants.H"
#include "atomicConstants.H" #include "atomicConstants.H"
@ -46,7 +46,7 @@ const Foam::dimensionedScalar Foam::constant::electromagnetic::mu0
( (
"mu0", "mu0",
dimless, dimless,
4.0*constant::math::pi*1e-07 4.0*constant::mathematical::pi*1e-07
) )
) )
); );
@ -92,7 +92,7 @@ const Foam::dimensionedScalar Foam::constant::electromagnetic::kappa
dimensionedScalar dimensionedScalar
( (
"kappa", "kappa",
dimensionedScalar("C", dimless, 1.0/(4.0*constant::math::pi)) dimensionedScalar("C", dimless, 1.0/(4.0*constant::mathematical::pi))
/epsilon0 /epsilon0
) )
) )

View File

@ -23,15 +23,15 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Namespace Namespace
Foam::constant::math Foam::constant::mathematical
Description Description
mathematical constants mathematical constants
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef mathConstants_H #ifndef mathematicalConstants_H
#define mathConstants_H #define mathematicalConstants_H
#include "scalar.H" #include "scalar.H"
@ -41,12 +41,12 @@ namespace Foam
{ {
namespace constant namespace constant
{ {
namespace math namespace mathematical
{ {
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
static word group = "math"; static word group = "mathematical";
const scalar e(M_E); const scalar e(M_E);
const scalar pi(M_PI); const scalar pi(M_PI);
@ -55,7 +55,7 @@ namespace math
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace math } // End namespace mathematical
} // end namespace constant } // end namespace constant
} // End namespace Foam } // End namespace Foam
@ -64,6 +64,3 @@ namespace math
#endif #endif
// ************************************************************************* // // ************************************************************************* //

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "universalConstants.H" #include "universalConstants.H"
#include "electromagneticConstants.H" #include "electromagneticConstants.H"
#include "physicoChemicalConstants.H" #include "physicoChemicalConstants.H"
@ -75,7 +75,7 @@ const Foam::dimensionedScalar Foam::constant::physicoChemical::sigma
dimensionedScalar dimensionedScalar
( (
"sigma", "sigma",
dimensionedScalar("C", dimless, sqr(constant::math::pi)/60.0) dimensionedScalar("C", dimless, sqr(constant::mathematical::pi)/60.0)
*pow4(k)/(pow3(constant::universal::hr)*sqr(constant::universal::c)) *pow4(k)/(pow3(constant::universal::hr)*sqr(constant::universal::c))
) )
) )
@ -107,7 +107,7 @@ const Foam::dimensionedScalar Foam::constant::physicoChemical::c1
dimensionedScalar dimensionedScalar
( (
"c1", "c1",
dimensionedScalar("C", dimless, constant::math::twoPi) dimensionedScalar("C", dimless, constant::mathematical::twoPi)
*constant::universal::h*sqr(constant::universal::c) *constant::universal::h*sqr(constant::universal::c)
) )
) )

View File

@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "universalConstants.H" #include "universalConstants.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "dimensionedConstants.H" #include "dimensionedConstants.H"
@ -43,7 +43,7 @@ const Foam::dimensionedScalar Foam::constant::universal::hr
dimensionedScalar dimensionedScalar
( (
"hr", "hr",
h/(dimensionedScalar("C", dimless, constant::math::twoPi)) h/(dimensionedScalar("C", dimless, constant::mathematical::twoPi))
) )
) )
); );

View File

@ -27,7 +27,7 @@ License
#include "face.H" #include "face.H"
#include "triFace.H" #include "triFace.H"
#include "triPointRef.H" #include "triPointRef.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -99,13 +99,13 @@ Foam::label Foam::face::mostConcaveAngle
if ((edgeNormal & n) > 0) if ((edgeNormal & n) > 0)
{ {
// Concave angle. // Concave angle.
angle = constant::math::pi + edgeAngle; angle = constant::mathematical::pi + edgeAngle;
} }
else else
{ {
// Convex angle. Note '-' to take into account that rightEdge // Convex angle. Note '-' to take into account that rightEdge
// and leftEdge are head-to-tail connected. // and leftEdge are head-to-tail connected.
angle = constant::math::pi - edgeAngle; angle = constant::mathematical::pi - edgeAngle;
} }
if (angle > maxAngle) if (angle > maxAngle)
@ -214,7 +214,7 @@ Foam::label Foam::face::split
label index = fcIndex(fcIndex(startIndex)); label index = fcIndex(fcIndex(startIndex));
label minIndex = index; label minIndex = index;
scalar minDiff = constant::math::pi; scalar minDiff = constant::mathematical::pi;
for(label i = 0; i < size() - 3; i++) for(label i = 0; i < size() - 3; i++)
{ {

View File

@ -27,7 +27,7 @@ License
#include "primitiveMesh.H" #include "primitiveMesh.H"
#include "pyramidPointFaceRef.H" #include "pyramidPointFaceRef.H"
#include "ListOps.H" #include "ListOps.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "SortableList.H" #include "SortableList.H"
@ -410,7 +410,7 @@ bool Foam::primitiveMesh::checkFaceOrthogonality
// Severe nonorthogonality threshold // Severe nonorthogonality threshold
const scalar severeNonorthogonalityThreshold = const scalar severeNonorthogonalityThreshold =
::cos(nonOrthThreshold_/180.0*constant::math::pi); ::cos(nonOrthThreshold_/180.0*constant::mathematical::pi);
scalar minDDotS = GREAT; scalar minDDotS = GREAT;
@ -472,9 +472,9 @@ bool Foam::primitiveMesh::checkFaceOrthogonality
if (debug || report) if (debug || report)
{ {
Info<< " Mesh non-orthogonality Max: " Info<< " Mesh non-orthogonality Max: "
<< ::acos(minDDotS)/constant::math::pi*180.0 << ::acos(minDDotS)/constant::mathematical::pi*180.0
<< " average: " << << " average: " <<
::acos(sumDDotS/neiSize)/constant::math::pi*180.0 ::acos(sumDDotS/neiSize)/constant::mathematical::pi*180.0
<< endl; << endl;
} }
} }
@ -839,7 +839,7 @@ bool Foam::primitiveMesh::checkFaceAngles
<< exit(FatalError); << exit(FatalError);
} }
const scalar maxSin = Foam::sin(maxDeg/180.0*constant::math::pi); const scalar maxSin = Foam::sin(maxDeg/180.0*constant::mathematical::pi);
const pointField& p = points(); const pointField& p = points();
const faceList& fcs = faces(); const faceList& fcs = faces();
@ -916,7 +916,7 @@ bool Foam::primitiveMesh::checkFaceAngles
{ {
scalar maxConcaveDegr = scalar maxConcaveDegr =
Foam::asin(Foam::min(1.0, maxEdgeSin)) Foam::asin(Foam::min(1.0, maxEdgeSin))
*180.0/constant::math::pi; *180.0/constant::mathematical::pi;
if (debug || report) if (debug || report)
{ {

View File

@ -31,7 +31,7 @@ Description
#include "primitiveMesh.H" #include "primitiveMesh.H"
#include "pyramidPointFaceRef.H" #include "pyramidPointFaceRef.H"
#include "cell.H" #include "cell.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -200,7 +200,7 @@ bool Foam::primitiveMesh::checkMeshMotion
) << "Severe non-orthogonality in mesh motion for face " ) << "Severe non-orthogonality in mesh motion for face "
<< faceI << faceI
<< " between cells " << own[faceI] << " and " << nei[faceI] << " between cells " << own[faceI] << " and " << nei[faceI]
<< ": Angle = " << ::acos(dDotS)/constant::math::pi*180.0 << ": Angle = " << ::acos(dDotS)/constant::mathematical::pi*180.0
<< " deg." << endl; << " deg." << endl;
nDotProductErrors++; nDotProductErrors++;

View File

@ -26,7 +26,7 @@ License
#include "IOstreams.H" #include "IOstreams.H"
#include "pointHit.H" #include "pointHit.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -307,7 +307,7 @@ inline scalar triangle<Point, PointRef>::quality() const
return return
mag() mag()
/ ( / (
constant::math::pi constant::mathematical::pi
*Foam::sqr(circumRadius()) *Foam::sqr(circumRadius())
*0.413497 *0.413497
+ VSMALL + VSMALL

View File

@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "tensor.H" #include "tensor.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -150,8 +150,8 @@ vector eigenValues(const tensor& t)
scalar aBy3 = a/3; scalar aBy3 = a/3;
i = m2SqrtQ*cos(theta/3) - aBy3; i = m2SqrtQ*cos(theta/3) - aBy3;
ii = m2SqrtQ*cos((theta + constant::math::twoPi)/3) - aBy3; ii = m2SqrtQ*cos((theta + constant::mathematical::twoPi)/3) - aBy3;
iii = m2SqrtQ*cos((theta - constant::math::twoPi)/3) - aBy3; iii = m2SqrtQ*cos((theta - constant::mathematical::twoPi)/3) - aBy3;
} }
else else
{ {
@ -343,8 +343,8 @@ vector eigenValues(const symmTensor& t)
scalar aBy3 = a/3; scalar aBy3 = a/3;
i = m2SqrtQ*cos(theta/3) - aBy3; i = m2SqrtQ*cos(theta/3) - aBy3;
ii = m2SqrtQ*cos((theta + constant::math::twoPi)/3) - aBy3; ii = m2SqrtQ*cos((theta + constant::mathematical::twoPi)/3) - aBy3;
iii = m2SqrtQ*cos((theta - constant::math::twoPi)/3) - aBy3; iii = m2SqrtQ*cos((theta - constant::mathematical::twoPi)/3) - aBy3;
} }
else else
{ {

View File

@ -34,7 +34,7 @@ Description
#define transform_H #define transform_H
#include "tensor.H" #include "tensor.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -205,11 +205,11 @@ inline scalar pseudoAngle
if (sin < -SMALL) if (sin < -SMALL)
{ {
return (3.0 + cos)*constant::math::piByTwo; return (3.0 + cos)*constant::mathematical::piByTwo;
} }
else else
{ {
return (1.0 - cos)*constant::math::piByTwo; return (1.0 - cos)*constant::mathematical::piByTwo;
} }
} }

View File

@ -34,7 +34,7 @@ Description
#include "removePoints.H" #include "removePoints.H"
#include "pointFields.H" #include "pointFields.H"
#include "motionSmoother.H" #include "motionSmoother.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "pointSet.H" #include "pointSet.H"
#include "faceSet.H" #include "faceSet.H"
#include "cellSet.H" #include "cellSet.H"
@ -2480,10 +2480,10 @@ void Foam::autoLayerDriver::mergePatchFacesUndo
) )
{ {
scalar minCos = scalar minCos =
Foam::cos(layerParams.featureAngle()*constant::math::pi/180.0); Foam::cos(layerParams.featureAngle()*constant::mathematical::pi/180.0);
scalar concaveCos = scalar concaveCos =
Foam::cos(layerParams.concaveAngle()*constant::math::pi/180.0); Foam::cos(layerParams.concaveAngle()*constant::mathematical::pi/180.0);
Info<< nl Info<< nl
<< "Merging all faces of a cell" << nl << "Merging all faces of a cell" << nl
@ -2602,7 +2602,7 @@ void Foam::autoLayerDriver::addLayers
( (
pp, pp,
meshEdges, meshEdges,
layerParams.featureAngle()*constant::math::pi/180.0, layerParams.featureAngle()*constant::mathematical::pi/180.0,
patchDisp, patchDisp,
patchNLayers, patchNLayers,

View File

@ -681,8 +681,8 @@ void Foam::autoRefineDriver::mergePatchFaces
meshRefiner_.mergePatchFaces meshRefiner_.mergePatchFaces
( (
Foam::cos(45*constant::math::pi/180.0), Foam::cos(45*constant::mathematical::pi/180.0),
Foam::cos(45*constant::math::pi/180.0), Foam::cos(45*constant::mathematical::pi/180.0),
meshRefiner_.meshedPatches() meshRefiner_.meshedPatches()
); );
@ -691,7 +691,7 @@ void Foam::autoRefineDriver::mergePatchFaces
meshRefiner_.checkData(); meshRefiner_.checkData();
} }
meshRefiner_.mergeEdges(Foam::cos(45*constant::math::pi/180.0)); meshRefiner_.mergeEdges(Foam::cos(45*constant::mathematical::pi/180.0));
if (debug) if (debug)
{ {

View File

@ -26,7 +26,7 @@ License
#include "layerParameters.H" #include "layerParameters.H"
#include "polyBoundaryMesh.H" #include "polyBoundaryMesh.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "refinementSurfaces.H" #include "refinementSurfaces.H"
#include "searchableSurfaces.H" #include "searchableSurfaces.H"
#include "regExp.H" #include "regExp.H"
@ -192,7 +192,7 @@ Foam::layerParameters::layerParameters
), ),
layerTerminationCos_ layerTerminationCos_
( (
Foam::cos(0.5*featureAngle_*constant::math::pi/180.0) Foam::cos(0.5*featureAngle_*constant::mathematical::pi/180.0)
), ),
maxThicknessToMedialRatio_ maxThicknessToMedialRatio_
( (
@ -201,7 +201,7 @@ Foam::layerParameters::layerParameters
minMedianAxisAngleCos_ minMedianAxisAngleCos_
( (
Foam::cos(readScalar(dict.lookup("minMedianAxisAngle"))) Foam::cos(readScalar(dict.lookup("minMedianAxisAngle")))
*constant::math::pi/180.0 *constant::mathematical::pi/180.0
), ),
nBufferCellsNoExtrude_ nBufferCellsNoExtrude_
( (
@ -269,7 +269,7 @@ Foam::layerParameters::layerParameters
), ),
layerTerminationCos_ layerTerminationCos_
( (
Foam::cos(0.5*featureAngle_*constant::math::pi/180.0) Foam::cos(0.5*featureAngle_*constant::mathematical::pi/180.0)
), ),
maxThicknessToMedialRatio_ maxThicknessToMedialRatio_
( (
@ -278,7 +278,7 @@ Foam::layerParameters::layerParameters
minMedianAxisAngleCos_ minMedianAxisAngleCos_
( (
Foam::cos(readScalar(dict.lookup("minMedianAxisAngle"))) Foam::cos(readScalar(dict.lookup("minMedianAxisAngle")))
*constant::math::pi/180.0 *constant::mathematical::pi/180.0
), ),
nBufferCellsNoExtrude_ nBufferCellsNoExtrude_
( (

View File

@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "refinementParameters.H" #include "refinementParameters.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "polyMesh.H" #include "polyMesh.H"
#include "globalIndex.H" #include "globalIndex.H"
@ -65,7 +65,7 @@ Foam::refinementParameters::refinementParameters(const dictionary& dict)
} }
else else
{ {
curvature_ = Foam::cos(featAngle*constant::math::pi/180.0); curvature_ = Foam::cos(featAngle*constant::mathematical::pi/180.0);
} }
} }

View File

@ -37,7 +37,7 @@ License
#include "searchableSurfaces.H" #include "searchableSurfaces.H"
#include "polyMeshGeometry.H" #include "polyMeshGeometry.H"
#include "IOmanip.H" #include "IOmanip.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
@ -247,7 +247,7 @@ Foam::Map<Foam::label> Foam::meshRefinement::findEdgeConnectedProblemCells
nearestRegion[i] nearestRegion[i]
); );
scalar angle = perpendicularAngle[region]/180.0*constant::math::pi; scalar angle = perpendicularAngle[region]/180.0*constant::mathematical::pi;
if (angle >= 0) if (angle >= 0)
{ {

View File

@ -10,7 +10,7 @@ solidBodyMotionFunctions = solidBodyMotionFvMesh/solidBodyMotionFunctions
$(solidBodyMotionFunctions)/solidBodyMotionFunction/solidBodyMotionFunction.C $(solidBodyMotionFunctions)/solidBodyMotionFunction/solidBodyMotionFunction.C
$(solidBodyMotionFunctions)/solidBodyMotionFunction/newSolidBodyMotionFunction.C $(solidBodyMotionFunctions)/solidBodyMotionFunction/newSolidBodyMotionFunction.C
$(solidBodyMotionFunctions)/SDA/SDA.C $(solidBodyMotionFunctions)/SDA/SDA.C
$(solidBodyMotionFunctions)/SKA/SKA.C $(solidBodyMotionFunctions)/tabulated6DoFMotion/tabulated6DoFMotion.C
$(solidBodyMotionFunctions)/linearMotion/linearMotion.C $(solidBodyMotionFunctions)/linearMotion/linearMotion.C
$(solidBodyMotionFunctions)/rotatingMotion/rotatingMotion.C $(solidBodyMotionFunctions)/rotatingMotion/rotatingMotion.C
$(solidBodyMotionFunctions)/multiMotion/multiMotion.C $(solidBodyMotionFunctions)/multiMotion/multiMotion.C

View File

@ -27,7 +27,7 @@ License
#include "dynamicInkJetFvMesh.H" #include "dynamicInkJetFvMesh.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "volFields.H" #include "volFields.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -90,7 +90,7 @@ Foam::dynamicInkJetFvMesh::~dynamicInkJetFvMesh()
bool Foam::dynamicInkJetFvMesh::update() bool Foam::dynamicInkJetFvMesh::update()
{ {
scalar scalingFunction = scalar scalingFunction =
0.5*(::cos(constant::math::twoPi*frequency_*time().value()) - 1.0); 0.5*(::cos(constant::mathematical::twoPi*frequency_*time().value()) - 1.0);
Info<< "Mesh scaling. Time = " << time().value() << " scaling: " Info<< "Mesh scaling. Time = " << time().value() << " scaling: "
<< scalingFunction << endl; << scalingFunction << endl;

View File

@ -26,9 +26,9 @@ License
#include "SDA.H" #include "SDA.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
using namespace Foam::constant::math; using namespace Foam::constant::mathematical;
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -26,9 +26,9 @@ License
#include "oscillatingRotatingMotion.H" #include "oscillatingRotatingMotion.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
using namespace Foam::constant::math; using namespace Foam::constant::mathematical;
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -26,9 +26,9 @@ License
#include "rotatingMotion.H" #include "rotatingMotion.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
using namespace Foam::constant::math; using namespace Foam::constant::mathematical;
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -24,14 +24,14 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "SKA.H" #include "tabulated6DoFMotion.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "Tuple2.H" #include "Tuple2.H"
#include "IFstream.H" #include "IFstream.H"
#include "interpolateXY.H" #include "interpolateXY.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
using namespace Foam::constant::math; using namespace Foam::constant::mathematical;
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -39,15 +39,20 @@ namespace Foam
{ {
namespace solidBodyMotionFunctions namespace solidBodyMotionFunctions
{ {
defineTypeNameAndDebug(SKA, 0); defineTypeNameAndDebug(tabulated6DoFMotion, 0);
addToRunTimeSelectionTable(solidBodyMotionFunction, SKA, dictionary); addToRunTimeSelectionTable
(
solidBodyMotionFunction,
tabulated6DoFMotion,
dictionary
);
}; };
}; };
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::solidBodyMotionFunctions::SKA::SKA Foam::solidBodyMotionFunctions::tabulated6DoFMotion::tabulated6DoFMotion
( (
const dictionary& SBMFCoeffs, const dictionary& SBMFCoeffs,
const Time& runTime const Time& runTime
@ -61,13 +66,14 @@ Foam::solidBodyMotionFunctions::SKA::SKA
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
Foam::solidBodyMotionFunctions::SKA::~SKA() Foam::solidBodyMotionFunctions::tabulated6DoFMotion::~tabulated6DoFMotion()
{} {}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
Foam::septernion Foam::solidBodyMotionFunctions::SKA::transformation() const Foam::septernion
Foam::solidBodyMotionFunctions::tabulated6DoFMotion::transformation() const
{ {
scalar t = time_.value(); scalar t = time_.value();
@ -75,7 +81,7 @@ Foam::septernion Foam::solidBodyMotionFunctions::SKA::transformation() const
{ {
FatalErrorIn FatalErrorIn
( (
"solidBodyMotionFunctions::SKA::transformation()" "solidBodyMotionFunctions::tabulated6DoFMotion::transformation()"
) << "current time (" << t ) << "current time (" << t
<< ") is less than the minimum in the data table (" << ") is less than the minimum in the data table ("
<< times_[0] << ')' << times_[0] << ')'
@ -86,7 +92,7 @@ Foam::septernion Foam::solidBodyMotionFunctions::SKA::transformation() const
{ {
FatalErrorIn FatalErrorIn
( (
"solidBodyMotionFunctions::SKA::transformation()" "solidBodyMotionFunctions::tabulated6DoFMotion::transformation()"
) << "current time (" << t ) << "current time (" << t
<< ") is greater than the maximum in the data table (" << ") is greater than the maximum in the data table ("
<< times_[times_.size()-1] << ')' << times_[times_.size()-1] << ')'
@ -106,14 +112,17 @@ Foam::septernion Foam::solidBodyMotionFunctions::SKA::transformation() const
quaternion R(TRV[1].x(), TRV[1].y(), TRV[1].z()); quaternion R(TRV[1].x(), TRV[1].y(), TRV[1].z());
septernion TR(septernion(CofG_ + TRV[0])*R*septernion(-CofG_)); septernion TR(septernion(CofG_ + TRV[0])*R*septernion(-CofG_));
Info<< "solidBodyMotionFunctions::SKA::transformation(): " Info<< "solidBodyMotionFunctions::tabulated6DoFMotion::transformation(): "
<< "Time = " << t << " transformation: " << TR << endl; << "Time = " << t << " transformation: " << TR << endl;
return TR; return TR;
} }
bool Foam::solidBodyMotionFunctions::SKA::read(const dictionary& SBMFCoeffs) bool Foam::solidBodyMotionFunctions::tabulated6DoFMotion::read
(
const dictionary& SBMFCoeffs
)
{ {
solidBodyMotionFunction::read(SBMFCoeffs); solidBodyMotionFunction::read(SBMFCoeffs);
@ -147,7 +156,8 @@ bool Foam::solidBodyMotionFunctions::SKA::read(const dictionary& SBMFCoeffs)
{ {
FatalErrorIn FatalErrorIn
( (
"solidBodyMotionFunctions::SKA::read(const dictionary&)" "solidBodyMotionFunctions::tabulated6DoFMotion::read"
"(const dictionary&)"
) << "Cannot open time data file " << timeDataFileName_ ) << "Cannot open time data file " << timeDataFileName_
<< exit(FatalError); << exit(FatalError);
} }

View File

@ -23,25 +23,22 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class Class
Foam::solidBodyMotionFunctions::SKA Foam::solidBodyMotionFunctions::tabulated6DoFMotion
Description Description
Sea Keeping Analysis (SKA) 6DoF motion function. Tabulated 6DoF motion function.
Obtained by interpolating tabulated data for surge (x-translation), Obtained by interpolating tabulated data for surge (x-translation),
sway (y-translation), heave (z-translation), roll (rotation about x), sway (y-translation), heave (z-translation), roll (rotation about x),
pitch (rotation about y) and yaw (rotation about z). pitch (rotation about y) and yaw (rotation about z).
See Also
SDA (Ship design analysis) for 3DoF motion.
SourceFiles SourceFiles
SKA.C tabulated6DoFMotion.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef SKA_H #ifndef tabulated6DoFMotion_H
#define SKA_H #define tabulated6DoFMotion_H
#include "solidBodyMotionFunction.H" #include "solidBodyMotionFunction.H"
#include "primitiveFields.H" #include "primitiveFields.H"
@ -55,10 +52,10 @@ namespace solidBodyMotionFunctions
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class SKA Declaration Class tabulated6DoFMotion Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class SKA class tabulated6DoFMotion
: :
public solidBodyMotionFunction public solidBodyMotionFunction
{ {
@ -83,22 +80,22 @@ class SKA
// Private Member Functions // Private Member Functions
//- Disallow copy construct //- Disallow copy construct
SKA(const SKA&); tabulated6DoFMotion(const tabulated6DoFMotion&);
//- Disallow default bitwise assignment //- Disallow default bitwise assignment
void operator=(const SKA&); void operator=(const tabulated6DoFMotion&);
public: public:
//- Runtime type information //- Runtime type information
TypeName("SKA"); TypeName("tabulated6DoFMotion");
// Constructors // Constructors
//- Construct from components //- Construct from components
SKA tabulated6DoFMotion
( (
const dictionary& SBMFCoeffs, const dictionary& SBMFCoeffs,
const Time& runTime const Time& runTime
@ -107,7 +104,7 @@ public:
// Destructor // Destructor
virtual ~SKA(); virtual ~tabulated6DoFMotion();
// Member Functions // Member Functions

View File

@ -27,7 +27,7 @@ License
#include "topoCellLooper.H" #include "topoCellLooper.H"
#include "cellFeatures.H" #include "cellFeatures.H"
#include "polyMesh.H" #include "polyMesh.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "DynamicList.H" #include "DynamicList.H"
#include "ListOps.H" #include "ListOps.H"
#include "meshTools.H" #include "meshTools.H"
@ -45,7 +45,7 @@ namespace Foam
// Angle for polys to be considered splitHexes. // Angle for polys to be considered splitHexes.
const Foam::scalar Foam::topoCellLooper::featureCos = const Foam::scalar Foam::topoCellLooper::featureCos =
Foam::cos(10.0*constant::math::pi/180.0); Foam::cos(10.0*constant::mathematical::pi/180.0);
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

View File

@ -32,7 +32,7 @@ License
#include "cellCuts.H" #include "cellCuts.H"
#include "splitCell.H" #include "splitCell.H"
#include "mapPolyMesh.H" #include "mapPolyMesh.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "meshTools.H" #include "meshTools.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -192,7 +192,7 @@ Foam::undoableMeshCutter::undoableMeshCutter
faceRemover_ faceRemover_
( (
mesh, mesh,
Foam::cos(30.0/180.0*constant::math::pi) Foam::cos(30.0/180.0*constant::mathematical::pi)
) )
{} {}

View File

@ -27,7 +27,7 @@ License
#include "polyMeshGeometry.H" #include "polyMeshGeometry.H"
#include "pyramidPointFaceRef.H" #include "pyramidPointFaceRef.H"
#include "syncTools.H" #include "syncTools.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
namespace Foam namespace Foam
{ {
@ -248,7 +248,7 @@ Foam::scalar Foam::polyMeshGeometry::checkNonOrtho
<< " between cells " << mesh.faceOwner()[faceI] << " between cells " << mesh.faceOwner()[faceI]
<< " and " << nei << " and " << nei
<< ": Angle = " << ": Angle = "
<< ::acos(dDotS)/constant::math::pi*180.0 << ::acos(dDotS)/constant::mathematical::pi*180.0
<< " deg." << endl; << " deg." << endl;
} }
@ -269,7 +269,7 @@ Foam::scalar Foam::polyMeshGeometry::checkNonOrtho
<< " between cells " << mesh.faceOwner()[faceI] << " between cells " << mesh.faceOwner()[faceI]
<< " and " << nei << " and " << nei
<< ": Angle = " << ": Angle = "
<< ::acos(dDotS)/constant::math::pi*180.0 << ::acos(dDotS)/constant::mathematical::pi*180.0
<< " deg." << endl; << " deg." << endl;
} }
@ -369,7 +369,7 @@ bool Foam::polyMeshGeometry::checkFaceDotProduct
// Severe nonorthogonality threshold // Severe nonorthogonality threshold
const scalar severeNonorthogonalityThreshold = const scalar severeNonorthogonalityThreshold =
::cos(orthWarn/180.0*constant::math::pi); ::cos(orthWarn/180.0*constant::mathematical::pi);
// Calculate coupled cell centre // Calculate coupled cell centre
@ -504,9 +504,9 @@ bool Foam::polyMeshGeometry::checkFaceDotProduct
if (nDDotS > 0) if (nDDotS > 0)
{ {
Info<< "Mesh non-orthogonality Max: " Info<< "Mesh non-orthogonality Max: "
<< ::acos(minDDotS)/constant::math::pi*180.0 << ::acos(minDDotS)/constant::mathematical::pi*180.0
<< " average: " << << " average: " <<
::acos(sumDDotS/nDDotS)/constant::math::pi*180.0 ::acos(sumDDotS/nDDotS)/constant::mathematical::pi*180.0
<< endl; << endl;
} }
} }
@ -1258,7 +1258,7 @@ bool Foam::polyMeshGeometry::checkFaceAngles
<< abort(FatalError); << abort(FatalError);
} }
const scalar maxSin = Foam::sin(maxDeg/180.0*constant::math::pi); const scalar maxSin = Foam::sin(maxDeg/180.0*constant::mathematical::pi);
const faceList& fcs = mesh.faces(); const faceList& fcs = mesh.faces();
@ -1339,7 +1339,7 @@ bool Foam::polyMeshGeometry::checkFaceAngles
{ {
scalar maxConcaveDegr = scalar maxConcaveDegr =
Foam::asin(Foam::min(1.0, maxEdgeSin)) Foam::asin(Foam::min(1.0, maxEdgeSin))
*180.0/constant::math::pi; *180.0/constant::mathematical::pi;
Info<< "There are " << nConcave Info<< "There are " << nConcave
<< " faces with concave angles between consecutive" << " faces with concave angles between consecutive"

View File

@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "engineTime.H" #include "engineTime.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
@ -125,7 +125,7 @@ bool Foam::engineTime::read()
Foam::scalar Foam::engineTime::degToRad(const scalar deg) const Foam::scalar Foam::engineTime::degToRad(const scalar deg) const
{ {
return constant::math::pi*deg/180.0; return constant::mathematical::pi*deg/180.0;
} }

View File

@ -27,11 +27,11 @@
) )
); );
Ak = sphereFraction*4.0*constant::math::pi Ak = sphereFraction*4.0*constant::mathematical::pi
*pow *pow
( (
3.0*Vk 3.0*Vk
/(sphereFraction*4.0*constant::math::pi), /(sphereFraction*4.0*constant::mathematical::pi),
2.0/3.0 2.0/3.0
); );
} }
@ -56,11 +56,11 @@
) )
); );
Ak = circleFraction*constant::math::pi*thickness Ak = circleFraction*constant::mathematical::pi*thickness
*sqrt *sqrt
( (
4.0*Vk 4.0*Vk
/(circleFraction*thickness*constant::math::pi) /(circleFraction*thickness*constant::mathematical::pi)
); );
} }
break; break;

View File

@ -26,7 +26,7 @@ License
#include "rpm.H" #include "rpm.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -56,7 +56,7 @@ Foam::SRF::rpm::rpm
rpm_(readScalar(SRFModelCoeffs_.lookup("rpm"))) rpm_(readScalar(SRFModelCoeffs_.lookup("rpm")))
{ {
// Initialise the angular velocity // Initialise the angular velocity
omega_.value() = axis_*rpm_*constant::math::twoPi/60.0; omega_.value() = axis_*rpm_*constant::mathematical::twoPi/60.0;
} }
@ -76,7 +76,7 @@ bool Foam::SRF::rpm::read()
SRFModelCoeffs_.lookup("rpm") >> rpm_; SRFModelCoeffs_.lookup("rpm") >> rpm_;
// Update angular velocity // Update angular velocity
omega_.value() = axis_*rpm_*(constant::math::twoPi/60.0); omega_.value() = axis_*rpm_*(constant::mathematical::twoPi/60.0);
return true; return true;
} }

View File

@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "oscillatingFixedValueFvPatchField.H" #include "oscillatingFixedValueFvPatchField.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -40,7 +40,7 @@ scalar oscillatingFixedValueFvPatchField<Type>::currentScale() const
return return
1.0 1.0
+ amplitude_ + amplitude_
*sin(constant::math::twoPi*frequency_*this->db().time().value()); *sin(constant::mathematical::twoPi*frequency_*this->db().time().value());
} }

View File

@ -32,7 +32,7 @@ Description
#include "surfaceFields.H" #include "surfaceFields.H"
#include "demandDrivenData.H" #include "demandDrivenData.H"
#include "coupledFvPatch.H" #include "coupledFvPatch.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -353,7 +353,7 @@ void surfaceInterpolation::makeCorrectionVectors() const
(sum(magSf*mag(corrVecs))/sum(magSf)).value(), (sum(magSf*mag(corrVecs))/sum(magSf)).value(),
1.0 1.0
) )
)*180.0/constant::math::pi; )*180.0/constant::mathematical::pi;
} }
if (debug) if (debug)

View File

@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "COxidationDiffusionLimitedRate.H" #include "COxidationDiffusionLimitedRate.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -124,7 +124,7 @@ Foam::scalar Foam::COxidationDiffusionLimitedRate<CloudType>::calculate
const scalar YO2 = this->owner().mcCarrierThermo().Y(O2GlobalId_)[cellI]; const scalar YO2 = this->owner().mcCarrierThermo().Y(O2GlobalId_)[cellI];
// Change in C mass [kg] // Change in C mass [kg]
scalar dmC = 4.0*constant::math::pi*d*D_*YO2*Tc*rhoc/(Sb_*(T + Tc))*dt; scalar dmC = 4.0*constant::mathematical::pi*d*D_*YO2*Tc*rhoc/(Sb_*(T + Tc))*dt;
// Limit mass transfer by availability of C // Limit mass transfer by availability of C
dmC = min(mass*fComb, dmC); dmC = min(mass*fComb, dmC);

View File

@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "COxidationKineticDiffusionLimitedRate.H" #include "COxidationKineticDiffusionLimitedRate.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -138,7 +138,7 @@ Foam::scalar Foam::COxidationKineticDiffusionLimitedRate<CloudType>::calculate
const scalar Rk = C2_*exp(-E_/(specie::RR*Tc)); const scalar Rk = C2_*exp(-E_/(specie::RR*Tc));
// Particle surface area // Particle surface area
const scalar Ap = constant::math::pi*sqr(d); const scalar Ap = constant::mathematical::pi*sqr(d);
// Change in C mass [kg] // Change in C mass [kg]
scalar dmC = Ap*rhoc*specie::RR*Tc*YO2/WO2_*D0*Rk/(D0 + Rk); scalar dmC = Ap*rhoc*specie::RR*Tc*YO2/WO2_*D0*Rk/(D0 + Rk);

View File

@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "COxidationMurphyShaddix.H" #include "COxidationMurphyShaddix.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -134,7 +134,7 @@ Foam::scalar Foam::COxidationMurphyShaddix<CloudType>::calculate
} }
// Particle surface area [m^2] // Particle surface area [m^2]
const scalar Ap = constant::math::pi*sqr(d); const scalar Ap = constant::mathematical::pi*sqr(d);
// Calculate diffision constant at continuous phase temperature // Calculate diffision constant at continuous phase temperature
// and density [m^2/s] // and density [m^2/s]

View File

@ -27,7 +27,7 @@ License
#include "commonRailInjector.H" #include "commonRailInjector.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "Random.H" #include "Random.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam namespace Foam
@ -244,7 +244,7 @@ Foam::vector Foam::commonRailInjector::position
{ {
// otherwise, disc injection // otherwise, disc injection
scalar iRadius = d_*rndGen.scalar01(); scalar iRadius = d_*rndGen.scalar01();
scalar iAngle = constant::math::twoPi*rndGen.scalar01(); scalar iAngle = constant::mathematical::twoPi*rndGen.scalar01();
return return
( (
@ -297,7 +297,7 @@ Foam::scalar Foam::commonRailInjector::mass
// correct mass if calculation is 2D // correct mass if calculation is 2D
if (twoD) if (twoD)
{ {
mInj *= 0.5*angleOfWedge/constant::math::pi; mInj *= 0.5*angleOfWedge/constant::mathematical::pi;
} }
return mInj; return mInj;
@ -404,7 +404,7 @@ void Foam::commonRailInjector::correctProfiles
const scalar referencePressure const scalar referencePressure
) )
{ {
scalar A = 0.25*constant::math::pi*sqr(d_); scalar A = 0.25*constant::mathematical::pi*sqr(d_);
scalar pDummy = 1.0e+5; scalar pDummy = 1.0e+5;
scalar rho = fuel.rho(pDummy, T_, X_); scalar rho = fuel.rho(pDummy, T_, X_);

View File

@ -27,7 +27,7 @@ License
#include "definedInjector.H" #include "definedInjector.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "Random.H" #include "Random.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam namespace Foam
@ -226,7 +226,7 @@ Foam::vector Foam::definedInjector::position
{ {
// otherwise, disc injection // otherwise, disc injection
scalar iRadius = d_*rndGen.scalar01(); scalar iRadius = d_*rndGen.scalar01();
scalar iAngle = constant::math::twoPi*rndGen.scalar01(); scalar iAngle = constant::mathematical::twoPi*rndGen.scalar01();
return return
( (
@ -280,7 +280,7 @@ Foam::scalar Foam::definedInjector::mass
// correct mass if calculation is 2D // correct mass if calculation is 2D
if (twoD) if (twoD)
{ {
mInj *= 0.5*angleOfWedge/constant::math::pi; mInj *= 0.5*angleOfWedge/constant::mathematical::pi;
} }
return mInj; return mInj;
@ -374,7 +374,7 @@ void Foam::definedInjector::correctProfiles
const scalar referencePressure const scalar referencePressure
) )
{ {
scalar A = 0.25*constant::math::pi*sqr(d_); scalar A = 0.25*constant::mathematical::pi*sqr(d_);
scalar pDummy = 1.0e+5; scalar pDummy = 1.0e+5;
scalar rho = fuel.rho(pDummy, T_, X_); scalar rho = fuel.rho(pDummy, T_, X_);

View File

@ -27,7 +27,7 @@ License
#include "multiHoleInjector.H" #include "multiHoleInjector.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "Random.H" #include "Random.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam namespace Foam
@ -165,7 +165,7 @@ Foam::multiHoleInjector::~multiHoleInjector()
void Foam::multiHoleInjector::setTangentialVectors() void Foam::multiHoleInjector::setTangentialVectors()
{ {
scalar pi180 = constant::math::pi/180.0; scalar pi180 = constant::mathematical::pi/180.0;
scalar alpha = xyAngle_*pi180; scalar alpha = xyAngle_*pi180;
scalar phi = zAngle_*pi180; scalar phi = zAngle_*pi180;
@ -267,7 +267,7 @@ Foam::vector Foam::multiHoleInjector::position
{ {
// otherwise, disc injection // otherwise, disc injection
scalar iRadius = d_*rndGen.scalar01(); scalar iRadius = d_*rndGen.scalar01();
scalar iAngle = constant::math::twoPi*rndGen.scalar01(); scalar iAngle = constant::mathematical::twoPi*rndGen.scalar01();
return return
( (
@ -319,7 +319,7 @@ Foam::scalar Foam::multiHoleInjector::mass
// correct mass if calculation is 2D // correct mass if calculation is 2D
if (twoD) if (twoD)
{ {
mInj *= 0.5*angleOfWedge/constant::math::pi; mInj *= 0.5*angleOfWedge/constant::mathematical::pi;
} }
return mInj; return mInj;
@ -429,7 +429,7 @@ void Foam::multiHoleInjector::correctProfiles
const scalar referencePressure const scalar referencePressure
) )
{ {
scalar A = nHoles_*0.25*constant::math::pi*sqr(d_); scalar A = nHoles_*0.25*constant::mathematical::pi*sqr(d_);
forAll(velocityProfile_, i) forAll(velocityProfile_, i)
{ {

View File

@ -27,7 +27,7 @@ License
#include "swirlInjector.H" #include "swirlInjector.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "Random.H" #include "Random.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -246,7 +246,7 @@ Foam::vector Foam::swirlInjector::position
{ {
// otherwise, disc injection // otherwise, disc injection
scalar iRadius = d_*rndGen.scalar01(); scalar iRadius = d_*rndGen.scalar01();
scalar iAngle = constant::math::twoPi*rndGen.scalar01(); scalar iAngle = constant::mathematical::twoPi*rndGen.scalar01();
return return
( (
@ -300,7 +300,7 @@ Foam::scalar Foam::swirlInjector::mass
// correct mass if calculation is 2D // correct mass if calculation is 2D
if (twoD) if (twoD)
{ {
mInj *= 0.5*angleOfWedge/constant::math::pi; mInj *= 0.5*angleOfWedge/constant::mathematical::pi;
} }
return mInj; return mInj;
@ -415,7 +415,7 @@ void Foam::swirlInjector::correctProfiles
const scalar referencePressure const scalar referencePressure
) )
{ {
scalar A = 0.25*constant::math::pi*sqr(d_); scalar A = 0.25*constant::mathematical::pi*sqr(d_);
scalar pDummy = 1.0e+5; scalar pDummy = 1.0e+5;
scalar rho = fuel.rho(pDummy, T_, X_); scalar rho = fuel.rho(pDummy, T_, X_);

View File

@ -27,7 +27,7 @@ License
#include "unitInjector.H" #include "unitInjector.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "Random.H" #include "Random.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -220,7 +220,7 @@ Foam::vector Foam::unitInjector::position
{ {
// otherwise, disc injection // otherwise, disc injection
scalar iRadius = d_*rndGen.scalar01(); scalar iRadius = d_*rndGen.scalar01();
scalar iAngle = constant::math::twoPi*rndGen.scalar01(); scalar iAngle = constant::mathematical::twoPi*rndGen.scalar01();
return return
( (
@ -273,7 +273,7 @@ Foam::scalar Foam::unitInjector::mass
// correct mass if calculation is 2D // correct mass if calculation is 2D
if (twoD) if (twoD)
{ {
mInj *= 0.5*angleOfWedge/constant::math::pi; mInj *= 0.5*angleOfWedge/constant::mathematical::pi;
} }
return mInj; return mInj;
@ -364,7 +364,7 @@ void Foam::unitInjector::correctProfiles
const scalar referencePressure const scalar referencePressure
) )
{ {
scalar A = 0.25*constant::math::pi*sqr(d_); scalar A = 0.25*constant::mathematical::pi*sqr(d_);
scalar pDummy = 1.0e+5; scalar pDummy = 1.0e+5;
forAll(velocityProfile_, i) forAll(velocityProfile_, i)

View File

@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "parcel.H" #include "parcel.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -102,13 +102,13 @@ scalar parcel::Pr
scalar parcel::N(const scalar rho) const scalar parcel::N(const scalar rho) const
{ {
return 6.0*m_/(rho*pow3(d_)*constant::math::pi); return 6.0*m_/(rho*pow3(d_)*constant::mathematical::pi);
} }
scalar parcel::Vd() const scalar parcel::Vd() const
{ {
return pow3(d_)*constant::math::pi/6.0; return pow3(d_)*constant::mathematical::pi/6.0;
} }

View File

@ -41,7 +41,7 @@ License
#include "symmetryPolyPatch.H" #include "symmetryPolyPatch.H"
#include "wedgePolyPatch.H" #include "wedgePolyPatch.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -290,17 +290,17 @@ Foam::spray::spray
axisOfWedgeNormal_ /= mag(axisOfWedgeNormal_); axisOfWedgeNormal_ /= mag(axisOfWedgeNormal_);
scalar arcCos = (v1 & v2)/mag(v1); scalar arcCos = (v1 & v2)/mag(v1);
angleOfWedge_ = constant::math::pi - acos(arcCos); angleOfWedge_ = constant::mathematical::pi - acos(arcCos);
Info<< "Calculated angle of wedge is " Info<< "Calculated angle of wedge is "
<< angleOfWedge_*180/constant::math::pi << " deg." << angleOfWedge_*180/constant::mathematical::pi << " deg."
<< endl; << endl;
} }
else else
{ {
if (symPlaneExist) if (symPlaneExist)
{ {
angleOfWedge_ = constant::math::pi; angleOfWedge_ = constant::mathematical::pi;
Info<< "Constructing 180 deg three dimensional spray injection." Info<< "Constructing 180 deg three dimensional spray injection."
<< endl; << endl;
} }

View File

@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "spray.H" #include "spray.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -106,7 +106,7 @@ scalar spray::liquidMass() const
if (twoD()) if (twoD())
{ {
sum *= constant::math::twoPi/angleOfWedge(); sum *= constant::mathematical::twoPi/angleOfWedge();
} }
reduce(sum, sumOp<scalar>()); reduce(sum, sumOp<scalar>());
@ -148,7 +148,7 @@ scalar spray::liquidEnthalpy() const
if (twoD()) if (twoD())
{ {
sum *= constant::math::twoPi/angleOfWedge(); sum *= constant::mathematical::twoPi/angleOfWedge();
} }
reduce(sum, sumOp<scalar>()); reduce(sum, sumOp<scalar>());
@ -193,7 +193,7 @@ scalar spray::liquidTotalEnthalpy() const
if (twoD()) if (twoD())
{ {
sum *= constant::math::twoPi/angleOfWedge(); sum *= constant::mathematical::twoPi/angleOfWedge();
} }
reduce(sum, sumOp<scalar>()); reduce(sum, sumOp<scalar>());
@ -218,7 +218,7 @@ scalar spray::liquidKineticEnergy() const
if (twoD()) if (twoD())
{ {
sum *= constant::math::twoPi/angleOfWedge(); sum *= constant::mathematical::twoPi/angleOfWedge();
} }
reduce(sum, sumOp<scalar>()); reduce(sum, sumOp<scalar>());

View File

@ -27,7 +27,7 @@ License
#include "LISA.H" #include "LISA.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "basicMultiComponentMixture.H" #include "basicMultiComponentMixture.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "RosinRammler.H" #include "RosinRammler.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -155,7 +155,7 @@ void LISA::atomizeParcel
scalar massFlow = it.massFlowRate(max(0.0,elapsedTime-time)); scalar massFlow = it.massFlowRate(max(0.0,elapsedTime-time));
scalar hSheet = massFlow/(constant::math::pi*d*rhoFuel*mag(p.U())); scalar hSheet = massFlow/(constant::mathematical::pi*d*rhoFuel*mag(p.U()));
p.d() = min(hSheet,p.d()); p.d() = min(hSheet,p.d());
@ -249,7 +249,7 @@ void LISA::atomizeParcel
scalar kL = 1.0/(dL*sqrt(0.5 + 1.5*muFuel/sqrt(rhoFuel*sigma*dL))); scalar kL = 1.0/(dL*sqrt(0.5 + 1.5*muFuel/sqrt(rhoFuel*sigma*dL)));
scalar dD = cbrt(3.0*constant::math::pi*sqr(dL)/kL); scalar dD = cbrt(3.0*constant::mathematical::pi*sqr(dL)/kL);
scalar lisaExp = 0.27; scalar lisaExp = 0.27;
scalar ambientPressure = 1.0e+5; scalar ambientPressure = 1.0e+5;

View File

@ -27,7 +27,7 @@ License
#include "blobsSheetAtomization.H" #include "blobsSheetAtomization.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "basicMultiComponentMixture.H" #include "basicMultiComponentMixture.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "RosinRammler.H" #include "RosinRammler.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -127,7 +127,7 @@ void blobsSheetAtomization::atomizeParcel
scalar lBU = scalar lBU =
B_*sqrt B_*sqrt
( (
rhoFuel*sigma*p.d()*cos(angle_*constant::math::pi/360.0) rhoFuel*sigma*p.d()*cos(angle_*constant::mathematical::pi/360.0)
/sqr(rhoAverage*U) /sqr(rhoAverage*U)
); );

View File

@ -26,7 +26,7 @@ License
#include "ETAB.H" #include "ETAB.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -128,7 +128,7 @@ void ETAB::breakupParcel
scalar quad = -y2/a; scalar quad = -y2/a;
if (quad < 0) if (quad < 0)
{ {
phi = constant::math::twoPi - phit; phi = constant::mathematical::twoPi - phit;
} }
scalar tb = 0; scalar tb = 0;
@ -139,11 +139,11 @@ void ETAB::breakupParcel
if (theta < phi) if (theta < phi)
{ {
if (constant::math::twoPi - theta >= phi) if (constant::mathematical::twoPi - theta >= phi)
{ {
theta = -theta; theta = -theta;
} }
theta += constant::math::twoPi; theta += constant::mathematical::twoPi;
} }
tb = (theta-phi)*romega; tb = (theta-phi)*romega;

View File

@ -26,7 +26,7 @@ License
#include "SHF.H" #include "SHF.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -196,7 +196,7 @@ void SHF::breakupParcel
px = px =
x x
/(2.0*sqrt(constant::math::twoPi)*sigma_) /(2.0*sqrt(constant::mathematical::twoPi)*sigma_)
*exp(-0.5*sqr((x-mu_)/sigma_)); *exp(-0.5*sqr((x-mu_)/sigma_));
} while (y >= px); } while (y >= px);
@ -227,7 +227,7 @@ void SHF::breakupParcel
px = px =
x x
/(2.0*sqrt(constant::math::twoPi)*sigma_) /(2.0*sqrt(constant::mathematical::twoPi)*sigma_)
*exp(-0.5*sqr((x-mu_)/sigma_)); *exp(-0.5*sqr((x-mu_)/sigma_));
} while (y >= px); } while (y >= px);

View File

@ -26,7 +26,7 @@ License
#include "TAB.H" #include "TAB.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -130,7 +130,7 @@ void TAB::breakupParcel
scalar quad = -y2/a; scalar quad = -y2/a;
if (quad < 0) if (quad < 0)
{ {
phi = constant::math::twoPi - phit; phi = constant::mathematical::twoPi - phit;
} }
scalar tb = 0; scalar tb = 0;
@ -147,11 +147,11 @@ void TAB::breakupParcel
if (theta < phi) if (theta < phi)
{ {
if (constant::math::twoPi - theta >= phi) if (constant::mathematical::twoPi - theta >= phi)
{ {
theta = -theta; theta = -theta;
} }
theta += constant::math::twoPi; theta += constant::mathematical::twoPi;
} }
tb = (theta - phi)/omega; tb = (theta - phi)/omega;

View File

@ -26,7 +26,7 @@ License
#include "reitzKHRT.H" #include "reitzKHRT.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -137,7 +137,7 @@ void reitzKHRT::breakupParcel
scalar KRT = sqrt(helpVariable/(3.0*sigma + VSMALL)); scalar KRT = sqrt(helpVariable/(3.0*sigma + VSMALL));
// wavelength of the fastest growing RT frequency // wavelength of the fastest growing RT frequency
scalar lambdaRT = constant::math::twoPi*cRT_/(KRT + VSMALL); scalar lambdaRT = constant::mathematical::twoPi*cRT_/(KRT + VSMALL);
// if lambdaRT < diameter, then RT waves are growing on the surface // if lambdaRT < diameter, then RT waves are growing on the surface
// and we start to keep track of how long they have been growing // and we start to keep track of how long they have been growing
@ -170,7 +170,7 @@ void reitzKHRT::breakupParcel
// reduce the diameter according to the rate-equation // reduce the diameter according to the rate-equation
p.d() = (fraction*dc + p.d())/(1.0 + fraction); p.d() = (fraction*dc + p.d())/(1.0 + fraction);
scalar ms = rhoLiquid*Np*pow3(dc)*constant::math::pi/6.0; scalar ms = rhoLiquid*Np*pow3(dc)*constant::mathematical::pi/6.0;
p.ms() += ms; p.ms() += ms;
// Total number of parcels for the whole injection event // Total number of parcels for the whole injection event

View File

@ -26,7 +26,7 @@ License
#include "ORourkeCollisionModel.H" #include "ORourkeCollisionModel.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -31,7 +31,7 @@ scalar nMin = pMin().N(rhoMin);
scalar mdMin = mMin/nMin; scalar mdMin = mMin/nMin;
scalar nu0 = 0.25*constant::math::pi*sumD*sumD*magVRel*dt/vols_[cell1]; scalar nu0 = 0.25*constant::mathematical::pi*sumD*sumD*magVRel*dt/vols_[cell1];
scalar nu = nMin*nu0; scalar nu = nMin*nu0;
scalar collProb = exp(-nu); scalar collProb = exp(-nu);
scalar xx = rndGen_.scalar01(); scalar xx = rndGen_.scalar01();

View File

@ -129,7 +129,7 @@ if (vAlign > 0)
pMax().d() = pMax().d() =
pow pow
( (
6.0*newMaxMass/(rhoMax*constant::math::pi*nMax), 6.0*newMaxMass/(rhoMax*constant::mathematical::pi*nMax),
1.0/3.0 1.0/3.0
); );

View File

@ -26,7 +26,7 @@ License
#include "trajectoryModel.H" #include "trajectoryModel.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -28,7 +28,7 @@ License
#include "RutlandFlashBoil.H" #include "RutlandFlashBoil.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -229,7 +229,7 @@ scalar RutlandFlashBoil::boilingTime
for (label k=0; k < Niter; k++) for (label k=0; k < Niter; k++)
{ {
expSum += exp(sqr(-k*constant::math::pi*sqrt(F)/2.0)); expSum += exp(sqr(-k*constant::mathematical::pi*sqrt(F)/2.0));
if (mag(expSum-expSumOld)/expSum < 1.0e-3) if (mag(expSum-expSumOld)/expSum < 1.0e-3)
{ {
break; break;
@ -257,7 +257,7 @@ scalar RutlandFlashBoil::boilingTime
} }
scalar Gf = scalar Gf =
4.0*alfaS*dTLB*constant::math::pi*sqr(diameter/2.0)/heatOfVapour; 4.0*alfaS*dTLB*constant::mathematical::pi*sqr(diameter/2.0)/heatOfVapour;
// calculation of the heat transfer vapourization at superheated // calculation of the heat transfer vapourization at superheated
// conditions (temperature>tBoilingSurface) // conditions (temperature>tBoilingSurface)
@ -269,7 +269,7 @@ scalar RutlandFlashBoil::boilingTime
mag((vapourFarEnthalpy-vapourSurfaceEnthalpy)/heatOfVapour); mag((vapourFarEnthalpy-vapourSurfaceEnthalpy)/heatOfVapour);
// 2.0? or 1.0? try 1! // 2.0? or 1.0? try 1!
scalar B = 1.0*constant::math::pi*kappa/cpGas*diameter*NusseltCorr; scalar B = 1.0*constant::mathematical::pi*kappa/cpGas*diameter*NusseltCorr;
scalar nPos = B*log(1.0 + A)/Gf + 1.0; scalar nPos = B*log(1.0 + A)/Gf + 1.0;
scalar nNeg = (1.0/A)*(exp(Gf/B) - 1.0 - A) + 1.0; scalar nNeg = (1.0/A)*(exp(Gf/B) - 1.0 - A) + 1.0;
@ -342,7 +342,7 @@ scalar RutlandFlashBoil::boilingTime
} }
} }
time = (constant::math::pi*pow3(diameter)/6.0)*liquidDensity/(G + Gf); time = (constant::mathematical::pi*pow3(diameter)/6.0)*liquidDensity/(G + Gf);
time = max(VSMALL, time); time = max(VSMALL, time);
} }

View File

@ -26,7 +26,7 @@ License
#include "Chomiak.H" #include "Chomiak.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -118,11 +118,11 @@ vector ChomiakInjector::direction
scalar angle = scalar angle =
(d - dMax)*maxSprayAngle_[n] (d - dMax)*maxSprayAngle_[n]
/(dMin - dMax) /(dMin - dMax)
*constant::math::pi/360.0; *constant::mathematical::pi/360.0;
scalar alpha = sin(angle); scalar alpha = sin(angle);
scalar dcorr = cos(angle); scalar dcorr = cos(angle);
scalar beta = constant::math::twoPi*rndGen_.scalar01(); scalar beta = constant::mathematical::twoPi*rndGen_.scalar01();
// randomly distributed vector normal to the injection vector // randomly distributed vector normal to the injection vector
vector normal = vector::zero; vector normal = vector::zero;
@ -132,7 +132,7 @@ vector ChomiakInjector::direction
scalar reduce = 0.01; scalar reduce = 0.01;
// correct beta if this is a 2D run // correct beta if this is a 2D run
// map it onto the 'angleOfWedge' // map it onto the 'angleOfWedge'
beta *= (1.0-2.0*reduce)*0.5*sm_.angleOfWedge()/constant::math::pi; beta *= (1.0-2.0*reduce)*0.5*sm_.angleOfWedge()/constant::mathematical::pi;
beta += reduce*sm_.angleOfWedge(); beta += reduce*sm_.angleOfWedge();
normal = normal =

View File

@ -26,7 +26,7 @@ License
#include "blobsSwirlInjector.H" #include "blobsSwirlInjector.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -112,7 +112,7 @@ scalar blobsSwirlInjector::d0
angle_ = coneAngle_[n]/2.0 + c*coneInterval_[n]; angle_ = coneAngle_[n]/2.0 + c*coneInterval_[n];
angle_ *= constant::math::pi/180.0; angle_ *= constant::mathematical::pi/180.0;
scalar injectedMassFlow = it.massFlowRate(t); scalar injectedMassFlow = it.massFlowRate(t);
@ -144,7 +144,7 @@ vector blobsSwirlInjector::direction
{ {
scalar alpha = sin(angle_); scalar alpha = sin(angle_);
scalar dcorr = cos(angle_); scalar dcorr = cos(angle_);
scalar beta = constant::math::twoPi*rndGen_.scalar01(); scalar beta = constant::mathematical::twoPi*rndGen_.scalar01();
// randomly distributed vector normal to the injection vector // randomly distributed vector normal to the injection vector
vector normal = vector::zero; vector normal = vector::zero;
@ -155,7 +155,7 @@ vector blobsSwirlInjector::direction
// correct beta if this is a 2D run // correct beta if this is a 2D run
// map it onto the 'angleOfWedge' // map it onto the 'angleOfWedge'
beta *= (1.0 - 2.0*reduce)*sm_.angleOfWedge()/(constant::math::twoPi); beta *= (1.0 - 2.0*reduce)*sm_.angleOfWedge()/(constant::mathematical::twoPi);
beta += reduce*sm_.angleOfWedge(); beta += reduce*sm_.angleOfWedge();
normal = normal =
alpha alpha
@ -240,7 +240,7 @@ void blobsSwirlInjector::calculateHX
( (
(A_[inj]*cTau_[inj]*muFuel*massFlow*(1.0 + x_)) (A_[inj]*cTau_[inj]*muFuel*massFlow*(1.0 + x_))
/( /(
constant::math::pi constant::mathematical::pi
*injectorDiameter *injectorDiameter
*rhoFuel *rhoFuel
*dPressure *dPressure
@ -260,7 +260,7 @@ void blobsSwirlInjector::calculateHX
( (
(A_[inj]*cTau_[inj]*muFuel*massFlow*(1.0 + x_)) (A_[inj]*cTau_[inj]*muFuel*massFlow*(1.0 + x_))
/( /(
constant::math::pi constant::mathematical::pi
*injectorDiameter *injectorDiameter
*rhoFuel *rhoFuel
*dPressure *dPressure

View File

@ -26,7 +26,7 @@ License
#include "constInjector.H" #include "constInjector.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -133,11 +133,11 @@ vector constInjector::direction
v (alpha) v (alpha)
*/ */
scalar angle = rndGen_.scalar01()*sprayAngle_[n]*constant::math::pi/360.0; scalar angle = rndGen_.scalar01()*sprayAngle_[n]*constant::mathematical::pi/360.0;
scalar alpha = sin(angle); scalar alpha = sin(angle);
scalar dcorr = cos(angle); scalar dcorr = cos(angle);
scalar beta = constant::math::twoPi*rndGen_.scalar01(); scalar beta = constant::mathematical::twoPi*rndGen_.scalar01();
// randomly distributed vector normal to the injection vector // randomly distributed vector normal to the injection vector
vector normal = vector::zero; vector normal = vector::zero;
@ -147,7 +147,7 @@ vector constInjector::direction
scalar reduce = 0.01; scalar reduce = 0.01;
// correct beta if this is a 2D run // correct beta if this is a 2D run
// map it onto the 'angleOfWedge' // map it onto the 'angleOfWedge'
beta *= (1.0 - 2.0*reduce)*0.5*sm_.angleOfWedge()/constant::math::pi; beta *= (1.0 - 2.0*reduce)*0.5*sm_.angleOfWedge()/constant::mathematical::pi;
beta += reduce*sm_.angleOfWedge(); beta += reduce*sm_.angleOfWedge();
normal = normal =

View File

@ -26,7 +26,7 @@ License
#include "definedHollowCone.H" #include "definedHollowCone.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -163,9 +163,9 @@ vector definedHollowConeInjector::direction
// use random number to generate angle between inner/outer cone angles // use random number to generate angle between inner/outer cone angles
scalar angle = angleInner + rndGen_.scalar01()*(angleOuter - angleInner); scalar angle = angleInner + rndGen_.scalar01()*(angleOuter - angleInner);
scalar alpha = sin(angle*constant::math::pi/360.0); scalar alpha = sin(angle*constant::mathematical::pi/360.0);
scalar dcorr = cos(angle*constant::math::pi/360.0); scalar dcorr = cos(angle*constant::mathematical::pi/360.0);
scalar beta = constant::math::twoPi*rndGen_.scalar01(); scalar beta = constant::mathematical::twoPi*rndGen_.scalar01();
// randomly distributed vector normal to the injection vector // randomly distributed vector normal to the injection vector
vector normal = vector::zero; vector normal = vector::zero;
@ -176,7 +176,7 @@ vector definedHollowConeInjector::direction
// correct beta if this is a 2D run // correct beta if this is a 2D run
// map it onto the 'angleOfWedge' // map it onto the 'angleOfWedge'
beta *= (1.0 - 2.0*reduce)*sm_.angleOfWedge()/(constant::math::twoPi); beta *= (1.0 - 2.0*reduce)*sm_.angleOfWedge()/(constant::mathematical::twoPi);
beta += reduce*sm_.angleOfWedge(); beta += reduce*sm_.angleOfWedge();
normal = normal =
alpha alpha

View File

@ -26,7 +26,7 @@ License
#include "definedPressureSwirl.H" #include "definedPressureSwirl.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -174,7 +174,7 @@ scalar definedPressureSwirlInjector::d0
// end modifications // end modifications
angle_ *= constant::math::pi/360.0; angle_ *= constant::mathematical::pi/360.0;
scalar injectedMassFlow = it.massFlowRate(t); scalar injectedMassFlow = it.massFlowRate(t);
@ -191,7 +191,7 @@ scalar definedPressureSwirlInjector::d0
u_ = v*cosAngle; u_ = v*cosAngle;
scalar A = injectedMassFlow/(constant::math::pi*rhoFuel*u_); scalar A = injectedMassFlow/(constant::mathematical::pi*rhoFuel*u_);
// Not using the authors definition for sheet thickness // Not using the authors definition for sheet thickness
// modified by multiplying the sheet tickness for the cone angle cosinus. // modified by multiplying the sheet tickness for the cone angle cosinus.
@ -216,7 +216,7 @@ vector definedPressureSwirlInjector::direction
{ {
scalar alpha = sin(angle_); scalar alpha = sin(angle_);
scalar dcorr = cos(angle_); scalar dcorr = cos(angle_);
scalar beta = constant::math::twoPi*rndGen_.scalar01(); scalar beta = constant::mathematical::twoPi*rndGen_.scalar01();
// randomly distributed vector normal to the injection vector // randomly distributed vector normal to the injection vector
vector normal = vector::zero; vector normal = vector::zero;
@ -227,7 +227,7 @@ vector definedPressureSwirlInjector::direction
// correct beta if this is a 2D run // correct beta if this is a 2D run
// map it onto the 'angleOfWedge' // map it onto the 'angleOfWedge'
beta *= (1.0 - 2.0*reduce)*sm_.angleOfWedge()/(constant::math::twoPi); beta *= (1.0 - 2.0*reduce)*sm_.angleOfWedge()/(constant::mathematical::twoPi);
beta += reduce*sm_.angleOfWedge(); beta += reduce*sm_.angleOfWedge();
normal = normal =
alpha alpha
@ -296,7 +296,7 @@ scalar definedPressureSwirlInjector::kv
scalar coneAngle = it.getTableValue(coneAngle_, t); scalar coneAngle = it.getTableValue(coneAngle_, t);
coneAngle *= constant::math::pi/360.0; coneAngle *= constant::mathematical::pi/360.0;
scalar cosAngle = cos(coneAngle); scalar cosAngle = cos(coneAngle);
scalar Tav = it.integrateTable(it.T())/(it.teoi() - it.tsoi()); scalar Tav = it.integrateTable(it.T())/(it.teoi() - it.tsoi());
@ -309,7 +309,7 @@ scalar definedPressureSwirlInjector::kv
it.getTableValue(maxKv_, t), it.getTableValue(maxKv_, t),
4.0*massFlow 4.0*massFlow
*sqrt(rhoFuel/2.0/dPressure) *sqrt(rhoFuel/2.0/dPressure)
/(constant::math::pi*sqr(injectorDiameter)*rhoFuel*cosAngle) /(constant::mathematical::pi*sqr(injectorDiameter)*rhoFuel*cosAngle)
); );
return min(1.0, kv); return min(1.0, kv);

View File

@ -26,7 +26,7 @@ License
#include "hollowCone.H" #include "hollowCone.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -130,9 +130,9 @@ vector hollowConeInjector::direction
{ {
scalar angle = scalar angle =
innerAngle_[n] + rndGen_.scalar01()*(outerAngle_[n]-innerAngle_[n]); innerAngle_[n] + rndGen_.scalar01()*(outerAngle_[n]-innerAngle_[n]);
scalar alpha = sin(angle*constant::math::pi/360.0); scalar alpha = sin(angle*constant::mathematical::pi/360.0);
scalar dcorr = cos(angle*constant::math::pi/360.0); scalar dcorr = cos(angle*constant::mathematical::pi/360.0);
scalar beta = constant::math::twoPi*rndGen_.scalar01(); scalar beta = constant::mathematical::twoPi*rndGen_.scalar01();
// randomly distributed vector normal to the injection vector // randomly distributed vector normal to the injection vector
vector normal = vector::zero; vector normal = vector::zero;
@ -143,7 +143,7 @@ vector hollowConeInjector::direction
// correct beta if this is a 2D run // correct beta if this is a 2D run
// map it onto the 'angleOfWedge' // map it onto the 'angleOfWedge'
beta *= (1.0 - 2.0*reduce)*sm_.angleOfWedge()/(constant::math::twoPi); beta *= (1.0 - 2.0*reduce)*sm_.angleOfWedge()/(constant::mathematical::twoPi);
beta += reduce*sm_.angleOfWedge(); beta += reduce*sm_.angleOfWedge();
normal = normal =
alpha alpha

View File

@ -26,7 +26,7 @@ License
#include "pressureSwirlInjector.H" #include "pressureSwirlInjector.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -107,7 +107,7 @@ scalar pressureSwirlInjector::d0
scalar c = rndGen_.scalar01(); scalar c = rndGen_.scalar01();
angle_ = coneAngle_[n] + 2.0*coneInterval_[n]*(0.5 - c); angle_ = coneAngle_[n] + 2.0*coneInterval_[n]*(0.5 - c);
angle_ *= constant::math::pi/360.0; angle_ *= constant::mathematical::pi/360.0;
scalar injectedMassFlow = it.massFlowRate(t); scalar injectedMassFlow = it.massFlowRate(t);
@ -122,7 +122,7 @@ scalar pressureSwirlInjector::d0
u_ = v*cosAngle; u_ = v*cosAngle;
scalar A = injectedMassFlow/(constant::math::pi*rhoFuel*u_); scalar A = injectedMassFlow/(constant::mathematical::pi*rhoFuel*u_);
return (injectorDiameter-sqrt(pow(injectorDiameter,2)-4.0*A))/2.0; return (injectorDiameter-sqrt(pow(injectorDiameter,2)-4.0*A))/2.0;
} }
@ -138,7 +138,7 @@ vector pressureSwirlInjector::direction
{ {
scalar alpha = sin(angle_); scalar alpha = sin(angle_);
scalar dcorr = cos(angle_); scalar dcorr = cos(angle_);
scalar beta = constant::math::twoPi*rndGen_.scalar01(); scalar beta = constant::mathematical::twoPi*rndGen_.scalar01();
// randomly distributed vector normal to the injection vector // randomly distributed vector normal to the injection vector
vector normal = vector::zero; vector normal = vector::zero;
@ -149,7 +149,7 @@ vector pressureSwirlInjector::direction
// correct beta if this is a 2D run // correct beta if this is a 2D run
// map it onto the 'angleOfWedge' // map it onto the 'angleOfWedge'
beta *= (1.0 - 2.0*reduce)*sm_.angleOfWedge()/(constant::math::twoPi); beta *= (1.0 - 2.0*reduce)*sm_.angleOfWedge()/(constant::mathematical::twoPi);
beta += reduce*sm_.angleOfWedge(); beta += reduce*sm_.angleOfWedge();
normal = normal =
alpha alpha
@ -217,7 +217,7 @@ scalar pressureSwirlInjector::kv
scalar coneAngle = coneAngle_[inj]; scalar coneAngle = coneAngle_[inj];
coneAngle *= constant::math::pi/360.0; coneAngle *= constant::mathematical::pi/360.0;
scalar cosAngle = cos(coneAngle); scalar cosAngle = cos(coneAngle);
scalar Tav = it.integrateTable(it.T())/(it.teoi()-it.tsoi()); scalar Tav = it.integrateTable(it.T())/(it.teoi()-it.tsoi());
@ -230,7 +230,7 @@ scalar pressureSwirlInjector::kv
maxKv_[inj], maxKv_[inj],
4.0*massFlow 4.0*massFlow
*sqrt(rhoFuel/2.0/dPressure) *sqrt(rhoFuel/2.0/dPressure)
/(constant::math::pi*sqr(injectorDiameter)*rhoFuel*cosAngle) /(constant::mathematical::pi*sqr(injectorDiameter)*rhoFuel*cosAngle)
); );
return min(1.0, kv); return min(1.0, kv);

View File

@ -27,6 +27,7 @@ License
#include "constants.H" #include "constants.H"
using namespace Foam::constant; using namespace Foam::constant;
using namespace Foam::constant::mathematical;
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
@ -317,7 +318,7 @@ inline Foam::scalar Foam::DsmcCloud<ParcelType>::maxwellianAverageSpeed
) const ) const
{ {
return return
2.0*sqrt(2.0*physicoChemical::k.value()*temperature/(math::pi*mass)); 2.0*sqrt(2.0*physicoChemical::k.value()*temperature/(pi*mass));
} }
@ -329,7 +330,7 @@ inline Foam::scalarField Foam::DsmcCloud<ParcelType>::maxwellianAverageSpeed
) const ) const
{ {
return return
2.0*sqrt(2.0*physicoChemical::k.value()*temperature/(math::pi*mass)); 2.0*sqrt(2.0*physicoChemical::k.value()*temperature/(pi*mass));
} }

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "mathConstants.H" #include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -103,7 +103,7 @@ template <class ParcelType>
inline Foam::scalar inline Foam::scalar
Foam::DsmcParcel<ParcelType>::constantProperties::sigmaT() const Foam::DsmcParcel<ParcelType>::constantProperties::sigmaT() const
{ {
return constant::math::pi*d_*d_; return constant::mathematical::pi*d_*d_;
} }

View File

@ -27,7 +27,7 @@ License
#include "LarsenBorgnakkeVariableHardSphere.H" #include "LarsenBorgnakkeVariableHardSphere.H"
#include "constants.H" #include "constants.H"
using namespace Foam::constant; using namespace Foam::constant::mathematical;
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
@ -159,7 +159,7 @@ Foam::scalar Foam::LarsenBorgnakkeVariableHardSphere<CloudType>::sigmaTcR
// calculating cross section = pi*dPQ^2, where dPQ is from Bird, eq. 4.79 // calculating cross section = pi*dPQ^2, where dPQ is from Bird, eq. 4.79
scalar sigmaTPQ = scalar sigmaTPQ =
math::pi*dPQ*dPQ pi*dPQ*dPQ
*pow(2.0*physicoChemical::k.value()*Tref_/(mR*cR*cR), omegaPQ - 0.5) *pow(2.0*physicoChemical::k.value()*Tref_/(mR*cR*cR), omegaPQ - 0.5)
/exp(Foam::lgamma(2.5 - omegaPQ)); /exp(Foam::lgamma(2.5 - omegaPQ));
@ -255,7 +255,7 @@ void Foam::LarsenBorgnakkeVariableHardSphere<CloudType>::collide
scalar sinTheta = sqrt(1.0 - cosTheta*cosTheta); scalar sinTheta = sqrt(1.0 - cosTheta*cosTheta);
scalar phi = math::twoPi*rndGen.scalar01(); scalar phi = twoPi*rndGen.scalar01();
vector postCollisionRelU = vector postCollisionRelU =
cR cR

View File

@ -27,7 +27,7 @@ License
#include "VariableHardSphere.H" #include "VariableHardSphere.H"
#include "constants.H" #include "constants.H"
using namespace Foam::constant; using namespace Foam::constant::mathematical;
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -93,7 +93,7 @@ Foam::scalar Foam::VariableHardSphere<CloudType>::sigmaTcR
// calculating cross section = pi*dPQ^2, where dPQ is from Bird, eq. 4.79 // calculating cross section = pi*dPQ^2, where dPQ is from Bird, eq. 4.79
scalar sigmaTPQ = scalar sigmaTPQ =
math::pi*dPQ*dPQ pi*dPQ*dPQ
*pow(2.0*physicoChemical::k.value()*Tref_/(mR*cR*cR), omegaPQ - 0.5) *pow(2.0*physicoChemical::k.value()*Tref_/(mR*cR*cR), omegaPQ - 0.5)
/exp(Foam::lgamma(2.5 - omegaPQ)); /exp(Foam::lgamma(2.5 - omegaPQ));
@ -128,7 +128,7 @@ void Foam::VariableHardSphere<CloudType>::collide
scalar sinTheta = sqrt(1.0 - cosTheta*cosTheta); scalar sinTheta = sqrt(1.0 - cosTheta*cosTheta);
scalar phi = math::twoPi*rndGen.scalar01(); scalar phi = twoPi*rndGen.scalar01();
vector postCollisionRelU = vector postCollisionRelU =
cR cR

View File

@ -27,7 +27,7 @@ License
#include "FreeStream.H" #include "FreeStream.H"
#include "constants.H" #include "constants.H"
using namespace Foam::constant; using namespace Foam::constant::mathematical;
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -133,7 +133,7 @@ void Foam::FreeStream<CloudType>::inflow()
Random& rndGen(cloud.rndGen()); Random& rndGen(cloud.rndGen());
scalar sqrtPi = sqrt(math::pi); scalar sqrtPi = sqrt(pi);
label particlesInserted = 0; label particlesInserted = 0;

View File

@ -24,9 +24,9 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "mathConstants.H" #include "mathematicalConstants.H"
using namespace Foam::constant; using namespace Foam::constant::mathematical;
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -353,7 +353,7 @@ template <class ParcelType>
inline Foam::scalar inline Foam::scalar
Foam::KinematicParcel<ParcelType>::volume(const scalar d) const Foam::KinematicParcel<ParcelType>::volume(const scalar d) const
{ {
return math::pi/6.0*pow3(d); return pi/6.0*pow3(d);
} }
@ -383,7 +383,7 @@ template <class ParcelType>
inline Foam::scalar inline Foam::scalar
Foam::KinematicParcel<ParcelType>::areaS(const scalar d) const Foam::KinematicParcel<ParcelType>::areaS(const scalar d) const
{ {
return math::pi*d*d; return pi*d*d;
} }

View File

@ -25,9 +25,9 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "ReactingMultiphaseParcel.H" #include "ReactingMultiphaseParcel.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
using namespace Foam::constant; using namespace Foam::constant::mathematical;
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -497,7 +497,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
} }
else else
{ {
this->d_ = cbrt(mass1/this->rho_*6.0/math::pi); this->d_ = cbrt(mass1/this->rho_*6.0/pi);
} }
} }
} }

View File

@ -25,10 +25,10 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "ReactingParcel.H" #include "ReactingParcel.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
#include "specie.H" #include "specie.H"
using namespace Foam::constant; using namespace Foam::constant::mathematical;
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * // // * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
@ -393,7 +393,7 @@ void Foam::ReactingParcel<ParcelType>::calc
} }
else else
{ {
this->d_ = cbrt(mass1/this->rho_*6.0/math::pi); this->d_ = cbrt(mass1/this->rho_*6.0/pi);
} }
} }
} }

View File

@ -26,9 +26,9 @@ License
#include "ConeInjection.H" #include "ConeInjection.H"
#include "DataEntry.H" #include "DataEntry.H"
#include "mathConstants.H" #include "mathematicalConstants.H"
using namespace Foam::constant; using namespace Foam::constant::mathematical;
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
@ -203,7 +203,7 @@ void Foam::ConeInjection<CloudType>::setProperties
) )
{ {
// set particle velocity // set particle velocity
const scalar deg2Rad = math::pi/180.0; const scalar deg2Rad = pi/180.0;
scalar t = time - this->SOI_; scalar t = time - this->SOI_;
scalar ti = thetaInner_().value(t); scalar ti = thetaInner_().value(t);
@ -213,7 +213,7 @@ void Foam::ConeInjection<CloudType>::setProperties
coneAngle *= deg2Rad; coneAngle *= deg2Rad;
scalar alpha = sin(coneAngle); scalar alpha = sin(coneAngle);
scalar dcorr = cos(coneAngle); scalar dcorr = cos(coneAngle);
scalar beta = math::twoPi*this->owner().rndGen().scalar01(); scalar beta = twoPi*this->owner().rndGen().scalar01();
vector normal = alpha*(tanVec1_*cos(beta) + tanVec2_*sin(beta)); vector normal = alpha*(tanVec1_*cos(beta) + tanVec2_*sin(beta));
vector dirVec = dcorr*direction_; vector dirVec = dcorr*direction_;

Some files were not shown because too many files have changed in this diff Show More