diff --git a/applications/solvers/combustion/dieselEngineFoam/createSpray.H b/applications/solvers/combustion/dieselEngineFoam/createSpray.H index 6b78689f09094ddcfb160533fb851bc257b9f454..8c6706e0bab890bc943826e3c4aaa5c3fa85499f 100644 --- a/applications/solvers/combustion/dieselEngineFoam/createSpray.H +++ b/applications/solvers/combustion/dieselEngineFoam/createSpray.H @@ -30,7 +30,7 @@ scalar gasMass0 = fvc::domainIntegrate(rho).value(); if (dieselSpray.twoD()) { - gasMass0 *= constant::math::twoPi/dieselSpray.angleOfWedge(); + gasMass0 *= constant::mathematical::twoPi/dieselSpray.angleOfWedge(); } gasMass0 -= diff --git a/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C b/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C index 709b70f7a6d73522b135933c7f675a3e4e6c6a3d..eaf3219445e03098bddfc77e624e49b248405543 100644 --- a/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C +++ b/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C @@ -43,7 +43,7 @@ Description #include "OFstream.H" #include "volPointInterpolation.H" #include "thermoPhysicsTypes.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/combustion/dieselEngineFoam/spraySummary.H b/applications/solvers/combustion/dieselEngineFoam/spraySummary.H index 2bacaa91ee922e8b8663a4bc97c2ee76140b2717..5c1e43dc99477f9b880c4663ee3ec89ddfa0be8a 100644 --- a/applications/solvers/combustion/dieselEngineFoam/spraySummary.H +++ b/applications/solvers/combustion/dieselEngineFoam/spraySummary.H @@ -20,7 +20,7 @@ if (dieselSpray.twoD()) { - gasMass *= constant::math::twoPi/dieselSpray.angleOfWedge(); + gasMass *= constant::mathematical::twoPi/dieselSpray.angleOfWedge(); } scalar addedMass = gasMass - gasMass0; diff --git a/applications/solvers/combustion/dieselFoam/dieselFoam.C b/applications/solvers/combustion/dieselFoam/dieselFoam.C index 8d5dd0d9facad1d3a6d7a7cca51458c1ab095a4e..63549b99a5911bc109491a398040d2742c0ae59e 100644 --- a/applications/solvers/combustion/dieselFoam/dieselFoam.C +++ b/applications/solvers/combustion/dieselFoam/dieselFoam.C @@ -41,7 +41,7 @@ Description #include "IFstream.H" #include "OFstream.H" #include "Switch.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/combustion/engineFoam/engineFoam.C b/applications/solvers/combustion/engineFoam/engineFoam.C index 8ff998217d3965354de1a5e0dcee81b74f2f953a..dd584d03e2bb8ddb432f6ec13639b93f0778b0cb 100644 --- a/applications/solvers/combustion/engineFoam/engineFoam.C +++ b/applications/solvers/combustion/engineFoam/engineFoam.C @@ -58,7 +58,7 @@ Description #include "ignition.H" #include "Switch.H" #include "OFstream.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C index 276cac6ae01e8fe4c178db15516b490658abd83c..5423a70e3bb8a7a35b925d7ea1b4001a48c32f9e 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C @@ -28,7 +28,7 @@ License #include "addToRunTimeSelectionTable.H" #include "fvPatchFieldMapper.H" #include "volFields.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -182,7 +182,7 @@ void smoluchowskiJumpTFvPatchScalarField::updateCoeffs() } 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 - accommodationCoeff_)/accommodationCoeff_; diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C index 7cf2ab1f25b8ced12911bbfc8b6f841dc92c14c4..ec8f777542bd6cca2125d8e027d699c1d24dd83f 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C @@ -28,7 +28,7 @@ Description #include "maxwellSlipUFvPatchVectorField.H" #include "addToRunTimeSelectionTable.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "fvPatchFieldMapper.H" #include "volFields.H" #include "surfaceFields.H" @@ -147,7 +147,7 @@ void maxwellSlipUFvPatchVectorField::updateCoeffs() const fvPatchField<scalar>& ppsi = 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_; Field<scalar> pnu = pmu/prho; diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C index 03e46a5c6332ee36bfca0f7fe4e1154988deb959..7762bcbfc9d05dc792806ca10ae9d7a6925af8b4 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "SchnerrSauer.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -77,7 +77,7 @@ Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::rRb { return pow ( - ((4*constant::math::pi*n_)/3) + ((4*constant::mathematical::pi*n_)/3) *limitedAlpha1/(1.0 + alphaNuc() - limitedAlpha1), 1.0/3.0 ); @@ -87,7 +87,7 @@ Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::rRb Foam::dimensionedScalar 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); } diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C index 2ebb83c2fcc092f931a6fb8fc0dc956618488f66..6d32abd9c72689e30301a3e5105014d5beacd9de 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C @@ -29,12 +29,12 @@ License #include "Time.H" #include "subCycle.H" #include "fvCFD.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * // const scalar Foam::multiphaseMixture::convertToRad = - Foam::constant::math::pi/180.0; + Foam::constant::mathematical::pi/180.0; // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.C index fe24603713f2ac3912b10e946f9f9f3e1fc67e64..ce1fff38d7501a67c527a358ac1633a5e542b91e 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "GidaspowConductivity.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -69,7 +69,7 @@ Foam::tmp<Foam::volScalarField> Foam::GidaspowConductivity::kappa const dimensionedScalar& e ) const { - const scalar sqrtPi = sqrt(constant::math::pi); + const scalar sqrtPi = sqrt(constant::mathematical::pi); return rhoa*da*sqrt(Theta)* ( diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C index 2d0acca9fafd49ace0d2f56709e9f42f2e0afa6b..a1a2894ae17f1c02714f0f2a2fd3b2bf212ebdb6 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "HrenyaSinclairConductivity.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -74,7 +74,7 @@ Foam::tmp<Foam::volScalarField> Foam::HrenyaSinclairConductivity::kappa const dimensionedScalar& e ) const { - const scalar sqrtPi = sqrt(constant::math::pi); + const scalar sqrtPi = sqrt(constant::mathematical::pi); volScalarField lamda = scalar(1) + da/(6.0*sqrt(2.0)*(alpha + scalar(1.0e-5)))/L_; diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.C index 40c296f7e0463eb72779c03c04660264bcfa4f0e..f2a4225d718d8fda8feec0e8060879ecfa2fa573 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "SyamlalConductivity.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -69,7 +69,7 @@ Foam::tmp<Foam::volScalarField> Foam::SyamlalConductivity::kappa const dimensionedScalar& e ) const { - const scalar sqrtPi = sqrt(constant::math::pi); + const scalar sqrtPi = sqrt(constant::mathematical::pi); return rhoa*da*sqrt(Theta)* ( diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C index dd3f3451794013a9481b96f54dfae6e5b942e04b..2869cbef77b93001c4b41eacfbe0d7213b258b40 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C @@ -26,7 +26,7 @@ License #include "kineticTheoryModel.H" #include "surfaceInterpolate.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "fvCFD.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -204,7 +204,7 @@ void Foam::kineticTheoryModel::solve() volScalarField alpha = alpha_; 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_); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.C index 2a1c00b188d1429659ce63b1cca8a997f6f02c8e..a6026440be413d654800fa08cec23898cf0db6ed 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "GidaspowViscosity.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -70,7 +70,7 @@ Foam::kineticTheoryModels::GidaspowViscosity::mua const dimensionedScalar& e ) const { - const scalar sqrtPi = sqrt(constant::math::pi); + const scalar sqrtPi = sqrt(constant::mathematical::pi); return rhoa*da*sqrt(Theta)* ( diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C index b5e60e94c26d8fdf077e6ccd46c3289bc99a1112..fb7584d1560ce81dd7d8ff6c3441f67cf4e72ceb 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "HrenyaSinclairViscosity.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -77,7 +77,7 @@ Foam::kineticTheoryModels::HrenyaSinclairViscosity::mua const dimensionedScalar& e ) const { - const scalar sqrtPi = sqrt(constant::math::pi); + const scalar sqrtPi = sqrt(constant::mathematical::pi); volScalarField lamda = scalar(1) + da/(6.0*sqrt(2.0)*(alpha + scalar(1.0e-5)))/L_; diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.C index 892319df6c65ce387ad79148333707d9d07f898d..e913b3562001f99d58ff40d6eee0094e81077760 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "SyamlalViscosity.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -69,7 +69,7 @@ Foam::tmp<Foam::volScalarField> Foam::kineticTheoryModels::SyamlalViscosity::mua const dimensionedScalar& e ) const { - const scalar sqrtPi = sqrt(constant::math::pi); + const scalar sqrtPi = sqrt(constant::mathematical::pi); return rhoa*da*sqrt(Theta)* ( diff --git a/applications/test/graphXi/graphXi.C b/applications/test/graphXi/graphXi.C index c717f6cc1f963f9269da2040b80a0c87c7499246..86f1eb18fd7cbd81d73970acd8f62d201cf97b06 100644 --- a/applications/test/graphXi/graphXi.C +++ b/applications/test/graphXi/graphXi.C @@ -32,7 +32,7 @@ Description #include "graph.H" #include "OFstream.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" using namespace Foam; @@ -50,7 +50,7 @@ int main() scalarField b = 0.5*(1.0 + erf(x)); 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; r = lapb*b*c/(gradb*gradb); diff --git a/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C b/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C index 0905771d199c1d865be6f87e424a5b9b05771ce4..2ce7f8ba80c734caa456aba557739915f918c98f 100644 --- a/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C +++ b/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C @@ -47,7 +47,7 @@ Description #include "polyTopoChanger.H" #include "polyMesh.H" #include "mapPolyMesh.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "PackedBoolList.H" #include "SortableList.H" @@ -467,7 +467,7 @@ int main(int argc, char *argv[]) scalar angle(readScalar(IStringStream(args.additionalArgs()[1])())); 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 << " edges with length less than " << minLen << " meters" << nl diff --git a/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C b/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C index de7af2b077d21defaec9e20829f605c2b14a75db..54fd1bdf4ff208d9bb10456b2fdc1b70391bddc8 100644 --- a/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C +++ b/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C @@ -53,7 +53,7 @@ Description #include "removePoints.H" #include "polyMesh.H" #include "mapPolyMesh.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" using namespace Foam; @@ -445,12 +445,12 @@ int main(int argc, char *argv[]) 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; 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 overwrite = args.optionFound("overwrite"); diff --git a/applications/utilities/mesh/advanced/splitCells/splitCells.C b/applications/utilities/mesh/advanced/splitCells/splitCells.C index 1d9c0e5b5430df6bd27a9144ef0263544d3d67c3..c83ab27583cf69bea1709c15bde09a17ff3cffc8 100644 --- a/applications/utilities/mesh/advanced/splitCells/splitCells.C +++ b/applications/utilities/mesh/advanced/splitCells/splitCells.C @@ -49,7 +49,7 @@ Description #include "cellSet.H" #include "cellModeller.H" #include "meshCutter.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "geomCellLooper.H" #include "plane.H" #include "edgeVertex.H" @@ -539,7 +539,7 @@ int main(int argc, char *argv[]) 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 minSin = Foam::sin(radAngle); diff --git a/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C b/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C index 996cd67d4ce6735e503482a67d41c64ee102ac2a..1da7ba049e4202ae5e2065fe3f9be3fd0a5502a6 100644 --- a/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C +++ b/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C @@ -43,7 +43,7 @@ Description #include "symmetryPolyPatch.H" #include "wedgePolyPatch.H" #include "cyclicPolyPatch.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" using namespace Foam; diff --git a/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H b/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H index f1ec25a59c19f67f81fd2edfeb20f0438e36b544..9ed5e27004f9543efa8a55e574120435d1b8cd16 100644 --- a/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H +++ b/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H @@ -434,7 +434,7 @@ if (pFaces[WEDGE].size() && pFaces[WEDGE][0].size()) { // 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 iterb = pFaces[WEDGE][1].begin(); diff --git a/applications/utilities/mesh/conversion/polyDualMesh/polyDualMeshApp.C b/applications/utilities/mesh/conversion/polyDualMesh/polyDualMeshApp.C index 65dd5c952d93891bcb39ee37c3f6665f2638a82d..740b87a391764df9a6841cea83390f48b9b7f0ad 100644 --- a/applications/utilities/mesh/conversion/polyDualMesh/polyDualMeshApp.C +++ b/applications/utilities/mesh/conversion/polyDualMesh/polyDualMeshApp.C @@ -59,7 +59,7 @@ Usage #include "Time.H" #include "timeSelector.H" #include "fvMesh.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "polyTopoChange.H" #include "mapPolyMesh.H" #include "PackedBoolList.H" @@ -91,7 +91,7 @@ void simpleMarkFeatures 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(); @@ -387,7 +387,7 @@ int main(int argc, char *argv[]) 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 << "minCos :" << minCos << endl diff --git a/applications/utilities/mesh/conversion/starToFoam/createCoupleMatches.C b/applications/utilities/mesh/conversion/starToFoam/createCoupleMatches.C index 0b135188e00e173b0f92f870698762e535373157..bfd1dae88261ceeabad72f0bdb2cf64a35113079 100644 --- a/applications/utilities/mesh/conversion/starToFoam/createCoupleMatches.C +++ b/applications/utilities/mesh/conversion/starToFoam/createCoupleMatches.C @@ -33,7 +33,7 @@ Description #include "IOmanip.H" #include "boundBox.H" #include "Map.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -99,7 +99,7 @@ void starMesh::createCoupleMatches() << coupleI << ". STAR couple ID: " << couples_[coupleI].coupleID() << endl << "The angle between face normals is " - << Foam::acos(faceAreaAngle)/constant::math::pi*180 + << Foam::acos(faceAreaAngle)/constant::mathematical::pi*180 << " deg." << endl << "master cell: " << fp.masterCell() << " STAR number: " << starCellID_[fp.masterCell()] diff --git a/applications/utilities/mesh/generation/blockMesh/curvedEdges/arcEdge.C b/applications/utilities/mesh/generation/blockMesh/curvedEdges/arcEdge.C index 2039ffb0bbfe18e67da5d6c9b7a6f69e809f07af..4de0d7df350754ad542853681662e404a9f4c45b 100644 --- a/applications/utilities/mesh/generation/blockMesh/curvedEdges/arcEdge.C +++ b/applications/utilities/mesh/generation/blockMesh/curvedEdges/arcEdge.C @@ -29,7 +29,7 @@ Description \*---------------------------------------------------------------------------*/ #include "arcEdge.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -78,7 +78,7 @@ Foam::cylindricalCS Foam::arcEdge::calcAngle() // find angles 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 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 Foam::scalar Foam::arcEdge::length() const { - return angle_*radius_*constant::math::pi/180.0; + return angle_*radius_*constant::mathematical::pi/180.0; } diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/wedge/wedge.C b/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/wedge/wedge.C index 07ddf34eaf83b4056d5b4a8f146093ecf4224741..eac10738cf9df9170264476def02155da24f35b1 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/wedge/wedge.C +++ b/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/wedge/wedge.C @@ -26,7 +26,7 @@ License #include "wedge.H" #include "addToRunTimeSelectionTable.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -52,7 +52,7 @@ wedge::wedge(const dictionary& dict) angle_ ( readScalar(coeffDict_.lookup("angle")) - *constant::math::pi/180.0 + *constant::mathematical::pi/180.0 ) {} diff --git a/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C b/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C index 3c48f6d7d7e86b2fadd1b07dadde324ea0f95534..7161e6bb706679b9ced55362cf473951459de8e9 100644 --- a/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C +++ b/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C @@ -33,7 +33,7 @@ Description #include "Time.H" #include "boundaryMesh.H" #include "repatchPolyTopoChanger.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "OFstream.H" #include "ListOps.H" @@ -93,7 +93,7 @@ int main(int argc, char *argv[]) scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])())); 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 << "minCos :" << minCos << endl diff --git a/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C b/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C index c6d7b8f61eeb832985ab9769291a72355af232b6..a76c4ad327b9939e7d26ce5ad7c604aa0602b9c4 100644 --- a/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C +++ b/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C @@ -67,10 +67,10 @@ Usage #include "transformField.H" #include "transformGeometricField.H" #include "IStringStream.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" using namespace Foam; -using namespace Foam::constant::math; +using namespace Foam::constant::mathematical; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/utilities/preProcessing/engineSwirl/engineSwirl.C b/applications/utilities/preProcessing/engineSwirl/engineSwirl.C index 92e305709398933d4823f398f7122a0b6e9b78c7..089689b47b0ffe6ea3bf9cedc1445d97bb1d1d83 100644 --- a/applications/utilities/preProcessing/engineSwirl/engineSwirl.C +++ b/applications/utilities/preProcessing/engineSwirl/engineSwirl.C @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ #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 b2 = 2.0*b1/swirlProfile.value() - j0(swirlProfile).value(); diff --git a/applications/utilities/surface/surfaceTransformPoints/surfaceTransformPoints.C b/applications/utilities/surface/surfaceTransformPoints/surfaceTransformPoints.C index 78716d63c789fd9c9883f23220f128d291d2ac41..1b9fcf0d0a30c0f0f3a00af661464b22484a2931 100644 --- a/applications/utilities/surface/surfaceTransformPoints/surfaceTransformPoints.C +++ b/applications/utilities/surface/surfaceTransformPoints/surfaceTransformPoints.C @@ -43,10 +43,10 @@ Description #include "transformField.H" #include "Pair.H" #include "quaternion.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" using namespace Foam; -using namespace Foam::constant::math; +using namespace Foam::constant::mathematical; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/global/dimensionedConstants/constants/atomic/atomicConstants.C b/src/OpenFOAM/global/dimensionedConstants/constants/atomic/atomicConstants.C index 943bdc5c38cd4c9c33a3a35587c50e3f948c5e79..4edebcbe5d159dc89046844df677605b49af028d 100644 --- a/src/OpenFOAM/global/dimensionedConstants/constants/atomic/atomicConstants.C +++ b/src/OpenFOAM/global/dimensionedConstants/constants/atomic/atomicConstants.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "universalConstants.H" #include "electromagneticConstants.H" #include "atomicConstants.H" @@ -83,7 +83,7 @@ const Foam::dimensionedScalar Foam::constant::atomic::a0 ( "a0", 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", sqr(constant::electromagnetic::e) /( - dimensionedScalar("C", dimless, 4.0*constant::math::pi) + dimensionedScalar("C", dimless, 4.0*constant::mathematical::pi) *constant::electromagnetic::epsilon0 *me *sqr(constant::universal::c) diff --git a/src/OpenFOAM/global/dimensionedConstants/constants/constants.H b/src/OpenFOAM/global/dimensionedConstants/constants/constants.H index 14ab108667e1dcb2f7232fbd31045b1749c6af63..ad66c608aa274f1406103ef6a8417fbe09c31e71 100644 --- a/src/OpenFOAM/global/dimensionedConstants/constants/constants.H +++ b/src/OpenFOAM/global/dimensionedConstants/constants/constants.H @@ -38,7 +38,7 @@ Description // Dimensionless coefficents // Mathematical constants -#include "mathConstants.H" +#include "mathematicalConstants.H" // Dimensioned constants diff --git a/src/OpenFOAM/global/dimensionedConstants/constants/electromagnetic/electromagneticConstants.C b/src/OpenFOAM/global/dimensionedConstants/constants/electromagnetic/electromagneticConstants.C index 77e2fec40cac3551c3bb9db3a491fd06b79ddeb9..11377233b081b005f2b82270c0fdb0a13ee564ef 100644 --- a/src/OpenFOAM/global/dimensionedConstants/constants/electromagnetic/electromagneticConstants.C +++ b/src/OpenFOAM/global/dimensionedConstants/constants/electromagnetic/electromagneticConstants.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "universalConstants.H" #include "electromagneticConstants.H" #include "atomicConstants.H" @@ -46,7 +46,7 @@ const Foam::dimensionedScalar Foam::constant::electromagnetic::mu0 ( "mu0", 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 ( "kappa", - dimensionedScalar("C", dimless, 1.0/(4.0*constant::math::pi)) + dimensionedScalar("C", dimless, 1.0/(4.0*constant::mathematical::pi)) /epsilon0 ) ) diff --git a/src/OpenFOAM/global/dimensionedConstants/constants/math/mathConstants.H b/src/OpenFOAM/global/dimensionedConstants/constants/math/mathematicalConstants.H similarity index 90% rename from src/OpenFOAM/global/dimensionedConstants/constants/math/mathConstants.H rename to src/OpenFOAM/global/dimensionedConstants/constants/math/mathematicalConstants.H index f18f97d749608843aeb1907e3c2e03aead26579b..0c7e584ed89169188e9430616c2edb79934fd3c5 100644 --- a/src/OpenFOAM/global/dimensionedConstants/constants/math/mathConstants.H +++ b/src/OpenFOAM/global/dimensionedConstants/constants/math/mathematicalConstants.H @@ -23,15 +23,15 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Namespace - Foam::constant::math + Foam::constant::mathematical Description mathematical constants \*---------------------------------------------------------------------------*/ -#ifndef mathConstants_H -#define mathConstants_H +#ifndef mathematicalConstants_H +#define mathematicalConstants_H #include "scalar.H" @@ -41,12 +41,12 @@ namespace Foam { namespace constant { -namespace math +namespace mathematical { // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - static word group = "math"; + static word group = "mathematical"; const scalar e(M_E); const scalar pi(M_PI); @@ -55,7 +55,7 @@ namespace math // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace math +} // End namespace mathematical } // end namespace constant } // End namespace Foam @@ -64,6 +64,3 @@ namespace math #endif // ************************************************************************* // - - - diff --git a/src/OpenFOAM/global/dimensionedConstants/constants/physicoChemical/physicoChemicalConstants.C b/src/OpenFOAM/global/dimensionedConstants/constants/physicoChemical/physicoChemicalConstants.C index 7446c67d9739924a27a342fbcd26b0b0782baf8e..d7f9b6a0a8fde39d6b36b5bb99480e5224bb29b0 100644 --- a/src/OpenFOAM/global/dimensionedConstants/constants/physicoChemical/physicoChemicalConstants.C +++ b/src/OpenFOAM/global/dimensionedConstants/constants/physicoChemical/physicoChemicalConstants.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "universalConstants.H" #include "electromagneticConstants.H" #include "physicoChemicalConstants.H" @@ -75,7 +75,7 @@ const Foam::dimensionedScalar Foam::constant::physicoChemical::sigma dimensionedScalar ( "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)) ) ) @@ -107,7 +107,7 @@ const Foam::dimensionedScalar Foam::constant::physicoChemical::c1 dimensionedScalar ( "c1", - dimensionedScalar("C", dimless, constant::math::twoPi) + dimensionedScalar("C", dimless, constant::mathematical::twoPi) *constant::universal::h*sqr(constant::universal::c) ) ) diff --git a/src/OpenFOAM/global/dimensionedConstants/constants/universal/universalConstants.C b/src/OpenFOAM/global/dimensionedConstants/constants/universal/universalConstants.C index 3284c51d4dbe4018d86c48b787b230d839a67113..a8930a3fd406eec813ea0db673e523661bd01846 100644 --- a/src/OpenFOAM/global/dimensionedConstants/constants/universal/universalConstants.C +++ b/src/OpenFOAM/global/dimensionedConstants/constants/universal/universalConstants.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "universalConstants.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "dimensionedConstants.H" @@ -43,7 +43,7 @@ const Foam::dimensionedScalar Foam::constant::universal::hr dimensionedScalar ( "hr", - h/(dimensionedScalar("C", dimless, constant::math::twoPi)) + h/(dimensionedScalar("C", dimless, constant::mathematical::twoPi)) ) ) ); diff --git a/src/OpenFOAM/meshes/meshShapes/face/face.C b/src/OpenFOAM/meshes/meshShapes/face/face.C index a7bbf88005239266d53604d7aa633c1c1541b50c..55be336fa21d507fb467995251712a1a6e449ead 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/face.C +++ b/src/OpenFOAM/meshes/meshShapes/face/face.C @@ -27,7 +27,7 @@ License #include "face.H" #include "triFace.H" #include "triPointRef.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -99,13 +99,13 @@ Foam::label Foam::face::mostConcaveAngle if ((edgeNormal & n) > 0) { // Concave angle. - angle = constant::math::pi + edgeAngle; + angle = constant::mathematical::pi + edgeAngle; } else { // Convex angle. Note '-' to take into account that rightEdge // and leftEdge are head-to-tail connected. - angle = constant::math::pi - edgeAngle; + angle = constant::mathematical::pi - edgeAngle; } if (angle > maxAngle) @@ -214,7 +214,7 @@ Foam::label Foam::face::split label index = fcIndex(fcIndex(startIndex)); label minIndex = index; - scalar minDiff = constant::math::pi; + scalar minDiff = constant::mathematical::pi; for(label i = 0; i < size() - 3; i++) { diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C index 01879f089f8e3ff815cc301b0d3314d4e908661e..258cb163a17e50ff9ea275df93d4bc26bcbd88a4 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C @@ -27,7 +27,7 @@ License #include "primitiveMesh.H" #include "pyramidPointFaceRef.H" #include "ListOps.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "SortableList.H" @@ -410,7 +410,7 @@ bool Foam::primitiveMesh::checkFaceOrthogonality // Severe nonorthogonality threshold const scalar severeNonorthogonalityThreshold = - ::cos(nonOrthThreshold_/180.0*constant::math::pi); + ::cos(nonOrthThreshold_/180.0*constant::mathematical::pi); scalar minDDotS = GREAT; @@ -472,9 +472,9 @@ bool Foam::primitiveMesh::checkFaceOrthogonality if (debug || report) { Info<< " Mesh non-orthogonality Max: " - << ::acos(minDDotS)/constant::math::pi*180.0 + << ::acos(minDDotS)/constant::mathematical::pi*180.0 << " average: " << - ::acos(sumDDotS/neiSize)/constant::math::pi*180.0 + ::acos(sumDDotS/neiSize)/constant::mathematical::pi*180.0 << endl; } } @@ -839,7 +839,7 @@ bool Foam::primitiveMesh::checkFaceAngles << 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 faceList& fcs = faces(); @@ -916,7 +916,7 @@ bool Foam::primitiveMesh::checkFaceAngles { scalar maxConcaveDegr = Foam::asin(Foam::min(1.0, maxEdgeSin)) - *180.0/constant::math::pi; + *180.0/constant::mathematical::pi; if (debug || report) { diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheckMotion.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheckMotion.C index 1dafd61f61bdb0819d9bd6465a38abe54a116df5..688bdd81a2d38cf2d5c8259b1694af772dddb455 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheckMotion.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheckMotion.C @@ -31,7 +31,7 @@ Description #include "primitiveMesh.H" #include "pyramidPointFaceRef.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 " << 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; nDotProductErrors++; diff --git a/src/OpenFOAM/meshes/primitiveShapes/triangle/triangleI.H b/src/OpenFOAM/meshes/primitiveShapes/triangle/triangleI.H index 881fb1d5202073f820d28c4e8db22703ed139038..40fa909b16633aa89fcc629a672a2197ced9a27f 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/triangle/triangleI.H +++ b/src/OpenFOAM/meshes/primitiveShapes/triangle/triangleI.H @@ -26,7 +26,7 @@ License #include "IOstreams.H" #include "pointHit.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -307,7 +307,7 @@ inline scalar triangle<Point, PointRef>::quality() const return mag() / ( - constant::math::pi + constant::mathematical::pi *Foam::sqr(circumRadius()) *0.413497 + VSMALL diff --git a/src/OpenFOAM/primitives/Tensor/tensor/tensor.C b/src/OpenFOAM/primitives/Tensor/tensor/tensor.C index 6ecc1da31351422682e4311569a88b2c9948e7c7..fd573c9fd03bb89d1e7a7d53b8f7b7575e241575 100644 --- a/src/OpenFOAM/primitives/Tensor/tensor/tensor.C +++ b/src/OpenFOAM/primitives/Tensor/tensor/tensor.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "tensor.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -150,8 +150,8 @@ vector eigenValues(const tensor& t) scalar aBy3 = a/3; i = m2SqrtQ*cos(theta/3) - aBy3; - ii = m2SqrtQ*cos((theta + constant::math::twoPi)/3) - aBy3; - iii = m2SqrtQ*cos((theta - constant::math::twoPi)/3) - aBy3; + ii = m2SqrtQ*cos((theta + constant::mathematical::twoPi)/3) - aBy3; + iii = m2SqrtQ*cos((theta - constant::mathematical::twoPi)/3) - aBy3; } else { @@ -343,8 +343,8 @@ vector eigenValues(const symmTensor& t) scalar aBy3 = a/3; i = m2SqrtQ*cos(theta/3) - aBy3; - ii = m2SqrtQ*cos((theta + constant::math::twoPi)/3) - aBy3; - iii = m2SqrtQ*cos((theta - constant::math::twoPi)/3) - aBy3; + ii = m2SqrtQ*cos((theta + constant::mathematical::twoPi)/3) - aBy3; + iii = m2SqrtQ*cos((theta - constant::mathematical::twoPi)/3) - aBy3; } else { diff --git a/src/OpenFOAM/primitives/transform/transform.H b/src/OpenFOAM/primitives/transform/transform.H index 8d6657b41f915e2459ac55d787c1a755d1e4f011..cab0d8901c9509a8916cc3bd04fa4b4dceed7b69 100644 --- a/src/OpenFOAM/primitives/transform/transform.H +++ b/src/OpenFOAM/primitives/transform/transform.H @@ -34,7 +34,7 @@ Description #define transform_H #include "tensor.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -205,11 +205,11 @@ inline scalar pseudoAngle if (sin < -SMALL) { - return (3.0 + cos)*constant::math::piByTwo; + return (3.0 + cos)*constant::mathematical::piByTwo; } else { - return (1.0 - cos)*constant::math::piByTwo; + return (1.0 - cos)*constant::mathematical::piByTwo; } } diff --git a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C index c9bc6c71697613f50e3e3690eed4e19b8b17d4ef..3a870136d08a77b6a2f3008152e3405800307b1f 100644 --- a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C +++ b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C @@ -34,7 +34,7 @@ Description #include "removePoints.H" #include "pointFields.H" #include "motionSmoother.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "pointSet.H" #include "faceSet.H" #include "cellSet.H" @@ -2480,10 +2480,10 @@ void Foam::autoLayerDriver::mergePatchFacesUndo ) { scalar minCos = - Foam::cos(layerParams.featureAngle()*constant::math::pi/180.0); + Foam::cos(layerParams.featureAngle()*constant::mathematical::pi/180.0); scalar concaveCos = - Foam::cos(layerParams.concaveAngle()*constant::math::pi/180.0); + Foam::cos(layerParams.concaveAngle()*constant::mathematical::pi/180.0); Info<< nl << "Merging all faces of a cell" << nl @@ -2602,7 +2602,7 @@ void Foam::autoLayerDriver::addLayers ( pp, meshEdges, - layerParams.featureAngle()*constant::math::pi/180.0, + layerParams.featureAngle()*constant::mathematical::pi/180.0, patchDisp, patchNLayers, diff --git a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C index 41fe3853142d559b3a1245c3c9cf21d59e1739e5..b8c13d83d99ce6c53967dc7d4cf597a241f4abff 100644 --- a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C +++ b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C @@ -681,8 +681,8 @@ void Foam::autoRefineDriver::mergePatchFaces meshRefiner_.mergePatchFaces ( - Foam::cos(45*constant::math::pi/180.0), - Foam::cos(45*constant::math::pi/180.0), + Foam::cos(45*constant::mathematical::pi/180.0), + Foam::cos(45*constant::mathematical::pi/180.0), meshRefiner_.meshedPatches() ); @@ -691,7 +691,7 @@ void Foam::autoRefineDriver::mergePatchFaces meshRefiner_.checkData(); } - meshRefiner_.mergeEdges(Foam::cos(45*constant::math::pi/180.0)); + meshRefiner_.mergeEdges(Foam::cos(45*constant::mathematical::pi/180.0)); if (debug) { diff --git a/src/autoMesh/autoHexMesh/autoHexMeshDriver/layerParameters/layerParameters.C b/src/autoMesh/autoHexMesh/autoHexMeshDriver/layerParameters/layerParameters.C index ea57136c1d66f6e859c6336d103d771234f6ceb8..4e73157996a6869fd5c7b85a9370cfe1de924c70 100644 --- a/src/autoMesh/autoHexMesh/autoHexMeshDriver/layerParameters/layerParameters.C +++ b/src/autoMesh/autoHexMesh/autoHexMeshDriver/layerParameters/layerParameters.C @@ -26,7 +26,7 @@ License #include "layerParameters.H" #include "polyBoundaryMesh.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "refinementSurfaces.H" #include "searchableSurfaces.H" #include "regExp.H" @@ -192,7 +192,7 @@ Foam::layerParameters::layerParameters ), layerTerminationCos_ ( - Foam::cos(0.5*featureAngle_*constant::math::pi/180.0) + Foam::cos(0.5*featureAngle_*constant::mathematical::pi/180.0) ), maxThicknessToMedialRatio_ ( @@ -201,7 +201,7 @@ Foam::layerParameters::layerParameters minMedianAxisAngleCos_ ( Foam::cos(readScalar(dict.lookup("minMedianAxisAngle"))) - *constant::math::pi/180.0 + *constant::mathematical::pi/180.0 ), nBufferCellsNoExtrude_ ( @@ -269,7 +269,7 @@ Foam::layerParameters::layerParameters ), layerTerminationCos_ ( - Foam::cos(0.5*featureAngle_*constant::math::pi/180.0) + Foam::cos(0.5*featureAngle_*constant::mathematical::pi/180.0) ), maxThicknessToMedialRatio_ ( @@ -278,7 +278,7 @@ Foam::layerParameters::layerParameters minMedianAxisAngleCos_ ( Foam::cos(readScalar(dict.lookup("minMedianAxisAngle"))) - *constant::math::pi/180.0 + *constant::mathematical::pi/180.0 ), nBufferCellsNoExtrude_ ( diff --git a/src/autoMesh/autoHexMesh/autoHexMeshDriver/refinementParameters/refinementParameters.C b/src/autoMesh/autoHexMesh/autoHexMeshDriver/refinementParameters/refinementParameters.C index 8c79ab9c6c4b30ab37e6e8ff134bf67f3cae2f46..d3c656a6d42895c999f44ad36af14dc4a7d02dda 100644 --- a/src/autoMesh/autoHexMesh/autoHexMeshDriver/refinementParameters/refinementParameters.C +++ b/src/autoMesh/autoHexMesh/autoHexMeshDriver/refinementParameters/refinementParameters.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "refinementParameters.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "polyMesh.H" #include "globalIndex.H" @@ -65,7 +65,7 @@ Foam::refinementParameters::refinementParameters(const dictionary& dict) } else { - curvature_ = Foam::cos(featAngle*constant::math::pi/180.0); + curvature_ = Foam::cos(featAngle*constant::mathematical::pi/180.0); } } diff --git a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C index 2f3f4e60cafb2f82684a9643faea59ed2bfc551b..578d21be1b37bf92a0a376e2d19d16c11c566cb4 100644 --- a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C +++ b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C @@ -37,7 +37,7 @@ License #include "searchableSurfaces.H" #include "polyMeshGeometry.H" #include "IOmanip.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -247,7 +247,7 @@ Foam::Map<Foam::label> Foam::meshRefinement::findEdgeConnectedProblemCells nearestRegion[i] ); - scalar angle = perpendicularAngle[region]/180.0*constant::math::pi; + scalar angle = perpendicularAngle[region]/180.0*constant::mathematical::pi; if (angle >= 0) { diff --git a/src/dynamicFvMesh/Make/files b/src/dynamicFvMesh/Make/files index 84749dfcaa5ee6e79b0318e0d014bcd0dfc978ad..ca9a99aca6fcaeb8837b1725331977cd89cf075a 100644 --- a/src/dynamicFvMesh/Make/files +++ b/src/dynamicFvMesh/Make/files @@ -10,7 +10,7 @@ solidBodyMotionFunctions = solidBodyMotionFvMesh/solidBodyMotionFunctions $(solidBodyMotionFunctions)/solidBodyMotionFunction/solidBodyMotionFunction.C $(solidBodyMotionFunctions)/solidBodyMotionFunction/newSolidBodyMotionFunction.C $(solidBodyMotionFunctions)/SDA/SDA.C -$(solidBodyMotionFunctions)/SKA/SKA.C +$(solidBodyMotionFunctions)/tabulated6DoFMotion/tabulated6DoFMotion.C $(solidBodyMotionFunctions)/linearMotion/linearMotion.C $(solidBodyMotionFunctions)/rotatingMotion/rotatingMotion.C $(solidBodyMotionFunctions)/multiMotion/multiMotion.C diff --git a/src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C b/src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C index 5fa27e142a6e5e6d36790663a5d4e22e1f73a048..1e519e4b13283d4bad17b3e52c67b1433904ff18 100644 --- a/src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C +++ b/src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C @@ -27,7 +27,7 @@ License #include "dynamicInkJetFvMesh.H" #include "addToRunTimeSelectionTable.H" #include "volFields.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -90,7 +90,7 @@ Foam::dynamicInkJetFvMesh::~dynamicInkJetFvMesh() bool Foam::dynamicInkJetFvMesh::update() { 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: " << scalingFunction << endl; diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/SDA/SDA.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/SDA/SDA.C index 1fbd323685f026335b1f1ef9326976fa9195f307..c7f34b90dec252d144f5a42c60b2b3dd76999d81 100644 --- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/SDA/SDA.C +++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/SDA/SDA.C @@ -26,9 +26,9 @@ License #include "SDA.H" #include "addToRunTimeSelectionTable.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" -using namespace Foam::constant::math; +using namespace Foam::constant::mathematical; // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/oscillatingRotatingMotion/oscillatingRotatingMotion.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/oscillatingRotatingMotion/oscillatingRotatingMotion.C index 1e6ddffb12e23a81519a47ef1725b49f052303ab..39b58706811ae7dd3b5fd83916b55ccf7e5fb78b 100644 --- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/oscillatingRotatingMotion/oscillatingRotatingMotion.C +++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/oscillatingRotatingMotion/oscillatingRotatingMotion.C @@ -26,9 +26,9 @@ License #include "oscillatingRotatingMotion.H" #include "addToRunTimeSelectionTable.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" -using namespace Foam::constant::math; +using namespace Foam::constant::mathematical; // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/rotatingMotion/rotatingMotion.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/rotatingMotion/rotatingMotion.C index 467af4973c9fc97f0472e6a8799f07210e8101cb..b865ceb9306061bbcbb81bd9641f8aa0e1432359 100644 --- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/rotatingMotion/rotatingMotion.C +++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/rotatingMotion/rotatingMotion.C @@ -26,9 +26,9 @@ License #include "rotatingMotion.H" #include "addToRunTimeSelectionTable.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" -using namespace Foam::constant::math; +using namespace Foam::constant::mathematical; // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.C index e15523f9832c1c2b7afb69cd1f61d6faf99175eb..c58fa9852e12b2a54976a86e5abf61451c49c01b 100644 --- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.C +++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.C @@ -24,14 +24,14 @@ License \*---------------------------------------------------------------------------*/ -#include "SKA.H" +#include "tabulated6DoFMotion.H" #include "addToRunTimeSelectionTable.H" #include "Tuple2.H" #include "IFstream.H" #include "interpolateXY.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" -using namespace Foam::constant::math; +using namespace Foam::constant::mathematical; // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -39,15 +39,20 @@ namespace Foam { namespace solidBodyMotionFunctions { - defineTypeNameAndDebug(SKA, 0); - addToRunTimeSelectionTable(solidBodyMotionFunction, SKA, dictionary); + defineTypeNameAndDebug(tabulated6DoFMotion, 0); + addToRunTimeSelectionTable + ( + solidBodyMotionFunction, + tabulated6DoFMotion, + dictionary + ); }; }; // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::solidBodyMotionFunctions::SKA::SKA +Foam::solidBodyMotionFunctions::tabulated6DoFMotion::tabulated6DoFMotion ( const dictionary& SBMFCoeffs, const Time& runTime @@ -61,13 +66,14 @@ Foam::solidBodyMotionFunctions::SKA::SKA // * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * // -Foam::solidBodyMotionFunctions::SKA::~SKA() +Foam::solidBodyMotionFunctions::tabulated6DoFMotion::~tabulated6DoFMotion() {} // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -Foam::septernion Foam::solidBodyMotionFunctions::SKA::transformation() const +Foam::septernion +Foam::solidBodyMotionFunctions::tabulated6DoFMotion::transformation() const { scalar t = time_.value(); @@ -75,7 +81,7 @@ Foam::septernion Foam::solidBodyMotionFunctions::SKA::transformation() const { FatalErrorIn ( - "solidBodyMotionFunctions::SKA::transformation()" + "solidBodyMotionFunctions::tabulated6DoFMotion::transformation()" ) << "current time (" << t << ") is less than the minimum in the data table (" << times_[0] << ')' @@ -86,7 +92,7 @@ Foam::septernion Foam::solidBodyMotionFunctions::SKA::transformation() const { FatalErrorIn ( - "solidBodyMotionFunctions::SKA::transformation()" + "solidBodyMotionFunctions::tabulated6DoFMotion::transformation()" ) << "current time (" << t << ") is greater than the maximum in the data table (" << 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()); septernion TR(septernion(CofG_ + TRV[0])*R*septernion(-CofG_)); - Info<< "solidBodyMotionFunctions::SKA::transformation(): " + Info<< "solidBodyMotionFunctions::tabulated6DoFMotion::transformation(): " << "Time = " << t << " transformation: " << TR << endl; return TR; } -bool Foam::solidBodyMotionFunctions::SKA::read(const dictionary& SBMFCoeffs) +bool Foam::solidBodyMotionFunctions::tabulated6DoFMotion::read +( + const dictionary& SBMFCoeffs +) { solidBodyMotionFunction::read(SBMFCoeffs); @@ -147,7 +156,8 @@ bool Foam::solidBodyMotionFunctions::SKA::read(const dictionary& SBMFCoeffs) { FatalErrorIn ( - "solidBodyMotionFunctions::SKA::read(const dictionary&)" + "solidBodyMotionFunctions::tabulated6DoFMotion::read" + "(const dictionary&)" ) << "Cannot open time data file " << timeDataFileName_ << exit(FatalError); } diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.H b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.H index 539129d2166ffd79eac13feb69f7846a36430633..1b9cd96f1998153bc1931810cb9caa1e5ef21a70 100644 --- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.H +++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.H @@ -23,25 +23,22 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::solidBodyMotionFunctions::SKA + Foam::solidBodyMotionFunctions::tabulated6DoFMotion Description - Sea Keeping Analysis (SKA) 6DoF motion function. + Tabulated 6DoF motion function. Obtained by interpolating tabulated data for surge (x-translation), sway (y-translation), heave (z-translation), roll (rotation about x), pitch (rotation about y) and yaw (rotation about z). -See Also - SDA (Ship design analysis) for 3DoF motion. - SourceFiles - SKA.C + tabulated6DoFMotion.C \*---------------------------------------------------------------------------*/ -#ifndef SKA_H -#define SKA_H +#ifndef tabulated6DoFMotion_H +#define tabulated6DoFMotion_H #include "solidBodyMotionFunction.H" #include "primitiveFields.H" @@ -55,10 +52,10 @@ namespace solidBodyMotionFunctions { /*---------------------------------------------------------------------------*\ - Class SKA Declaration + Class tabulated6DoFMotion Declaration \*---------------------------------------------------------------------------*/ -class SKA +class tabulated6DoFMotion : public solidBodyMotionFunction { @@ -83,22 +80,22 @@ class SKA // Private Member Functions //- Disallow copy construct - SKA(const SKA&); + tabulated6DoFMotion(const tabulated6DoFMotion&); //- Disallow default bitwise assignment - void operator=(const SKA&); + void operator=(const tabulated6DoFMotion&); public: //- Runtime type information - TypeName("SKA"); + TypeName("tabulated6DoFMotion"); // Constructors //- Construct from components - SKA + tabulated6DoFMotion ( const dictionary& SBMFCoeffs, const Time& runTime @@ -107,7 +104,7 @@ public: // Destructor - virtual ~SKA(); + virtual ~tabulated6DoFMotion(); // Member Functions diff --git a/src/dynamicMesh/meshCut/cellLooper/topoCellLooper.C b/src/dynamicMesh/meshCut/cellLooper/topoCellLooper.C index 8f4a57aca7f2f3dde505f14a508267b1269a8e9e..5e83fd9e7833036a091331a0402bd6823d9dd99f 100644 --- a/src/dynamicMesh/meshCut/cellLooper/topoCellLooper.C +++ b/src/dynamicMesh/meshCut/cellLooper/topoCellLooper.C @@ -27,7 +27,7 @@ License #include "topoCellLooper.H" #include "cellFeatures.H" #include "polyMesh.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "DynamicList.H" #include "ListOps.H" #include "meshTools.H" @@ -45,7 +45,7 @@ namespace Foam // Angle for polys to be considered splitHexes. 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 * * * * * * * * * * * // diff --git a/src/dynamicMesh/meshCut/meshModifiers/undoableMeshCutter/undoableMeshCutter.C b/src/dynamicMesh/meshCut/meshModifiers/undoableMeshCutter/undoableMeshCutter.C index 57dd15eb545adb1c5d4477ded509b3796bab3cfb..ea8ab52a7fc9a20ca0f56274f6474269425b2027 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/undoableMeshCutter/undoableMeshCutter.C +++ b/src/dynamicMesh/meshCut/meshModifiers/undoableMeshCutter/undoableMeshCutter.C @@ -32,7 +32,7 @@ License #include "cellCuts.H" #include "splitCell.H" #include "mapPolyMesh.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "meshTools.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -192,7 +192,7 @@ Foam::undoableMeshCutter::undoableMeshCutter faceRemover_ ( mesh, - Foam::cos(30.0/180.0*constant::math::pi) + Foam::cos(30.0/180.0*constant::mathematical::pi) ) {} diff --git a/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C b/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C index 4fbd137526c0906aeaeab48818ce9145a0684576..d95e1f34e990da0b82686620d8a15434d16917a3 100644 --- a/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C +++ b/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C @@ -27,7 +27,7 @@ License #include "polyMeshGeometry.H" #include "pyramidPointFaceRef.H" #include "syncTools.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" namespace Foam { @@ -248,7 +248,7 @@ Foam::scalar Foam::polyMeshGeometry::checkNonOrtho << " between cells " << mesh.faceOwner()[faceI] << " and " << nei << ": Angle = " - << ::acos(dDotS)/constant::math::pi*180.0 + << ::acos(dDotS)/constant::mathematical::pi*180.0 << " deg." << endl; } @@ -269,7 +269,7 @@ Foam::scalar Foam::polyMeshGeometry::checkNonOrtho << " between cells " << mesh.faceOwner()[faceI] << " and " << nei << ": Angle = " - << ::acos(dDotS)/constant::math::pi*180.0 + << ::acos(dDotS)/constant::mathematical::pi*180.0 << " deg." << endl; } @@ -369,7 +369,7 @@ bool Foam::polyMeshGeometry::checkFaceDotProduct // Severe nonorthogonality threshold const scalar severeNonorthogonalityThreshold = - ::cos(orthWarn/180.0*constant::math::pi); + ::cos(orthWarn/180.0*constant::mathematical::pi); // Calculate coupled cell centre @@ -504,9 +504,9 @@ bool Foam::polyMeshGeometry::checkFaceDotProduct if (nDDotS > 0) { Info<< "Mesh non-orthogonality Max: " - << ::acos(minDDotS)/constant::math::pi*180.0 + << ::acos(minDDotS)/constant::mathematical::pi*180.0 << " average: " << - ::acos(sumDDotS/nDDotS)/constant::math::pi*180.0 + ::acos(sumDDotS/nDDotS)/constant::mathematical::pi*180.0 << endl; } } @@ -1258,7 +1258,7 @@ bool Foam::polyMeshGeometry::checkFaceAngles << 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(); @@ -1339,7 +1339,7 @@ bool Foam::polyMeshGeometry::checkFaceAngles { scalar maxConcaveDegr = Foam::asin(Foam::min(1.0, maxEdgeSin)) - *180.0/constant::math::pi; + *180.0/constant::mathematical::pi; Info<< "There are " << nConcave << " faces with concave angles between consecutive" diff --git a/src/engine/engineTime/engineTime.C b/src/engine/engineTime/engineTime.C index 8756cff006047d6bd8eb600765fde9a351894d33..ef0d016880f9d5bd0df32e55da14142fdb428086 100644 --- a/src/engine/engineTime/engineTime.C +++ b/src/engine/engineTime/engineTime.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "engineTime.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -125,7 +125,7 @@ bool Foam::engineTime::read() Foam::scalar Foam::engineTime::degToRad(const scalar deg) const { - return constant::math::pi*deg/180.0; + return constant::mathematical::pi*deg/180.0; } diff --git a/src/engine/include/StCorr.H b/src/engine/include/StCorr.H index 21e5491f103048780ceb0a6904e1047b21622162..6e08edcf1997fc1701edc4ab6ecca05956b8a74f 100644 --- a/src/engine/include/StCorr.H +++ b/src/engine/include/StCorr.H @@ -27,11 +27,11 @@ ) ); - Ak = sphereFraction*4.0*constant::math::pi + Ak = sphereFraction*4.0*constant::mathematical::pi *pow ( 3.0*Vk - /(sphereFraction*4.0*constant::math::pi), + /(sphereFraction*4.0*constant::mathematical::pi), 2.0/3.0 ); } @@ -56,11 +56,11 @@ ) ); - Ak = circleFraction*constant::math::pi*thickness + Ak = circleFraction*constant::mathematical::pi*thickness *sqrt ( 4.0*Vk - /(circleFraction*thickness*constant::math::pi) + /(circleFraction*thickness*constant::mathematical::pi) ); } break; diff --git a/src/finiteVolume/cfdTools/general/SRF/SRFModel/rpm/rpm.C b/src/finiteVolume/cfdTools/general/SRF/SRFModel/rpm/rpm.C index 6eae867a24f72bd53a58db0d7b5374987a2d7afb..32effaa965c7dbd8723b6806003f267673a5fe35 100644 --- a/src/finiteVolume/cfdTools/general/SRF/SRFModel/rpm/rpm.C +++ b/src/finiteVolume/cfdTools/general/SRF/SRFModel/rpm/rpm.C @@ -26,7 +26,7 @@ License #include "rpm.H" #include "addToRunTimeSelectionTable.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -56,7 +56,7 @@ Foam::SRF::rpm::rpm rpm_(readScalar(SRFModelCoeffs_.lookup("rpm"))) { // 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_; // Update angular velocity - omega_.value() = axis_*rpm_*(constant::math::twoPi/60.0); + omega_.value() = axis_*rpm_*(constant::mathematical::twoPi/60.0); return true; } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchField.C index 912dbf3ea35b0b129a56db7c438fd25d703010f4..d086a46786cffff23b077c9849d4469fd0a86ed1 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchField.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "oscillatingFixedValueFvPatchField.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -40,7 +40,7 @@ scalar oscillatingFixedValueFvPatchField<Type>::currentScale() const return 1.0 + amplitude_ - *sin(constant::math::twoPi*frequency_*this->db().time().value()); + *sin(constant::mathematical::twoPi*frequency_*this->db().time().value()); } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C index b6ead004e7e679f543bd016435144484dadf5337..87cc39bfdc7a4c988456c53565fc59f13269ba2d 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C @@ -32,7 +32,7 @@ Description #include "surfaceFields.H" #include "demandDrivenData.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(), 1.0 ) - )*180.0/constant::math::pi; + )*180.0/constant::mathematical::pi; } if (debug) diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C index cdea75f6a4c164996c0a9ad9eb5db6ac9d804f5b..1e9d5858b3b67dd78226101479ca5a009babf388 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "COxidationDiffusionLimitedRate.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -124,7 +124,7 @@ Foam::scalar Foam::COxidationDiffusionLimitedRate<CloudType>::calculate const scalar YO2 = this->owner().mcCarrierThermo().Y(O2GlobalId_)[cellI]; // 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 dmC = min(mass*fComb, dmC); diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C index d2cfccc5a3f00cf0fb2267578f2433920dc93956..4798e63e331f4e85b5a6804b0adede66649d5365 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "COxidationKineticDiffusionLimitedRate.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -138,7 +138,7 @@ Foam::scalar Foam::COxidationKineticDiffusionLimitedRate<CloudType>::calculate const scalar Rk = C2_*exp(-E_/(specie::RR*Tc)); // Particle surface area - const scalar Ap = constant::math::pi*sqr(d); + const scalar Ap = constant::mathematical::pi*sqr(d); // Change in C mass [kg] scalar dmC = Ap*rhoc*specie::RR*Tc*YO2/WO2_*D0*Rk/(D0 + Rk); diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C index 39f4f2d28a762ce9c77c0b5d4f09553de5325b39..b411b3e9c20997dc87dd09dbfd9869d6fb2169b1 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "COxidationMurphyShaddix.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -134,7 +134,7 @@ Foam::scalar Foam::COxidationMurphyShaddix<CloudType>::calculate } // 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 // and density [m^2/s] diff --git a/src/lagrangian/dieselSpray/injector/commonRailInjector/commonRailInjector.C b/src/lagrangian/dieselSpray/injector/commonRailInjector/commonRailInjector.C index ea3f54f0e01bdb2982b02750f3f414e7bc03076c..72acb4167969fbb2899b004c33ad4d80f1d73863 100644 --- a/src/lagrangian/dieselSpray/injector/commonRailInjector/commonRailInjector.C +++ b/src/lagrangian/dieselSpray/injector/commonRailInjector/commonRailInjector.C @@ -27,7 +27,7 @@ License #include "commonRailInjector.H" #include "addToRunTimeSelectionTable.H" #include "Random.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam @@ -244,7 +244,7 @@ Foam::vector Foam::commonRailInjector::position { // otherwise, disc injection scalar iRadius = d_*rndGen.scalar01(); - scalar iAngle = constant::math::twoPi*rndGen.scalar01(); + scalar iAngle = constant::mathematical::twoPi*rndGen.scalar01(); return ( @@ -297,7 +297,7 @@ Foam::scalar Foam::commonRailInjector::mass // correct mass if calculation is 2D if (twoD) { - mInj *= 0.5*angleOfWedge/constant::math::pi; + mInj *= 0.5*angleOfWedge/constant::mathematical::pi; } return mInj; @@ -404,7 +404,7 @@ void Foam::commonRailInjector::correctProfiles 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 rho = fuel.rho(pDummy, T_, X_); diff --git a/src/lagrangian/dieselSpray/injector/definedInjector/definedInjector.C b/src/lagrangian/dieselSpray/injector/definedInjector/definedInjector.C index a9557c4f09fbab93df6f37e893c94c70b5d81af4..4cd8780535accd344672733b51379515086e9dce 100644 --- a/src/lagrangian/dieselSpray/injector/definedInjector/definedInjector.C +++ b/src/lagrangian/dieselSpray/injector/definedInjector/definedInjector.C @@ -27,7 +27,7 @@ License #include "definedInjector.H" #include "addToRunTimeSelectionTable.H" #include "Random.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam @@ -226,7 +226,7 @@ Foam::vector Foam::definedInjector::position { // otherwise, disc injection scalar iRadius = d_*rndGen.scalar01(); - scalar iAngle = constant::math::twoPi*rndGen.scalar01(); + scalar iAngle = constant::mathematical::twoPi*rndGen.scalar01(); return ( @@ -280,7 +280,7 @@ Foam::scalar Foam::definedInjector::mass // correct mass if calculation is 2D if (twoD) { - mInj *= 0.5*angleOfWedge/constant::math::pi; + mInj *= 0.5*angleOfWedge/constant::mathematical::pi; } return mInj; @@ -374,7 +374,7 @@ void Foam::definedInjector::correctProfiles 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 rho = fuel.rho(pDummy, T_, X_); diff --git a/src/lagrangian/dieselSpray/injector/multiHoleInjector/multiHoleInjector.C b/src/lagrangian/dieselSpray/injector/multiHoleInjector/multiHoleInjector.C index 44f963f014ad7a9196a72992eb3940658b675fd8..b518d41254b9b7faa5cc89db3a4933d58830c873 100644 --- a/src/lagrangian/dieselSpray/injector/multiHoleInjector/multiHoleInjector.C +++ b/src/lagrangian/dieselSpray/injector/multiHoleInjector/multiHoleInjector.C @@ -27,7 +27,7 @@ License #include "multiHoleInjector.H" #include "addToRunTimeSelectionTable.H" #include "Random.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam @@ -165,7 +165,7 @@ Foam::multiHoleInjector::~multiHoleInjector() void Foam::multiHoleInjector::setTangentialVectors() { - scalar pi180 = constant::math::pi/180.0; + scalar pi180 = constant::mathematical::pi/180.0; scalar alpha = xyAngle_*pi180; scalar phi = zAngle_*pi180; @@ -267,7 +267,7 @@ Foam::vector Foam::multiHoleInjector::position { // otherwise, disc injection scalar iRadius = d_*rndGen.scalar01(); - scalar iAngle = constant::math::twoPi*rndGen.scalar01(); + scalar iAngle = constant::mathematical::twoPi*rndGen.scalar01(); return ( @@ -319,7 +319,7 @@ Foam::scalar Foam::multiHoleInjector::mass // correct mass if calculation is 2D if (twoD) { - mInj *= 0.5*angleOfWedge/constant::math::pi; + mInj *= 0.5*angleOfWedge/constant::mathematical::pi; } return mInj; @@ -429,7 +429,7 @@ void Foam::multiHoleInjector::correctProfiles 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) { diff --git a/src/lagrangian/dieselSpray/injector/swirlInjector/swirlInjector.C b/src/lagrangian/dieselSpray/injector/swirlInjector/swirlInjector.C index 0ade2f8f0503cccc6c7bbcf8b80cc7343fd0f2a8..7d05a29a5c2526006631e75d5567f92e68ee3a2b 100644 --- a/src/lagrangian/dieselSpray/injector/swirlInjector/swirlInjector.C +++ b/src/lagrangian/dieselSpray/injector/swirlInjector/swirlInjector.C @@ -27,7 +27,7 @@ License #include "swirlInjector.H" #include "addToRunTimeSelectionTable.H" #include "Random.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -246,7 +246,7 @@ Foam::vector Foam::swirlInjector::position { // otherwise, disc injection scalar iRadius = d_*rndGen.scalar01(); - scalar iAngle = constant::math::twoPi*rndGen.scalar01(); + scalar iAngle = constant::mathematical::twoPi*rndGen.scalar01(); return ( @@ -300,7 +300,7 @@ Foam::scalar Foam::swirlInjector::mass // correct mass if calculation is 2D if (twoD) { - mInj *= 0.5*angleOfWedge/constant::math::pi; + mInj *= 0.5*angleOfWedge/constant::mathematical::pi; } return mInj; @@ -415,7 +415,7 @@ void Foam::swirlInjector::correctProfiles 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 rho = fuel.rho(pDummy, T_, X_); diff --git a/src/lagrangian/dieselSpray/injector/unitInjector/unitInjector.C b/src/lagrangian/dieselSpray/injector/unitInjector/unitInjector.C index f6439faf1128547bd28aa4b75d8bfe3976368530..a3a1093eb624a12d152b7c6bee958ba5fe03ce2f 100644 --- a/src/lagrangian/dieselSpray/injector/unitInjector/unitInjector.C +++ b/src/lagrangian/dieselSpray/injector/unitInjector/unitInjector.C @@ -27,7 +27,7 @@ License #include "unitInjector.H" #include "addToRunTimeSelectionTable.H" #include "Random.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -220,7 +220,7 @@ Foam::vector Foam::unitInjector::position { // otherwise, disc injection scalar iRadius = d_*rndGen.scalar01(); - scalar iAngle = constant::math::twoPi*rndGen.scalar01(); + scalar iAngle = constant::mathematical::twoPi*rndGen.scalar01(); return ( @@ -273,7 +273,7 @@ Foam::scalar Foam::unitInjector::mass // correct mass if calculation is 2D if (twoD) { - mInj *= 0.5*angleOfWedge/constant::math::pi; + mInj *= 0.5*angleOfWedge/constant::mathematical::pi; } return mInj; @@ -364,7 +364,7 @@ void Foam::unitInjector::correctProfiles 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; forAll(velocityProfile_, i) diff --git a/src/lagrangian/dieselSpray/parcel/parcelFunctions.C b/src/lagrangian/dieselSpray/parcel/parcelFunctions.C index 55647326442908c14c679cc298c1898bccab8cfd..a9ab22d3535b484432a500172658a99877e96f8a 100644 --- a/src/lagrangian/dieselSpray/parcel/parcelFunctions.C +++ b/src/lagrangian/dieselSpray/parcel/parcelFunctions.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "parcel.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -102,13 +102,13 @@ scalar parcel::Pr 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 { - return pow3(d_)*constant::math::pi/6.0; + return pow3(d_)*constant::mathematical::pi/6.0; } diff --git a/src/lagrangian/dieselSpray/spray/spray.C b/src/lagrangian/dieselSpray/spray/spray.C index f576ba67d966f23163bc139e2e6d04fe36fb9d16..de2a05687af4e74d8cb61ebde892144bd7717cff 100644 --- a/src/lagrangian/dieselSpray/spray/spray.C +++ b/src/lagrangian/dieselSpray/spray/spray.C @@ -41,7 +41,7 @@ License #include "symmetryPolyPatch.H" #include "wedgePolyPatch.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -290,17 +290,17 @@ Foam::spray::spray axisOfWedgeNormal_ /= mag(axisOfWedgeNormal_); scalar arcCos = (v1 & v2)/mag(v1); - angleOfWedge_ = constant::math::pi - acos(arcCos); + angleOfWedge_ = constant::mathematical::pi - acos(arcCos); Info<< "Calculated angle of wedge is " - << angleOfWedge_*180/constant::math::pi << " deg." + << angleOfWedge_*180/constant::mathematical::pi << " deg." << endl; } else { if (symPlaneExist) { - angleOfWedge_ = constant::math::pi; + angleOfWedge_ = constant::mathematical::pi; Info<< "Constructing 180 deg three dimensional spray injection." << endl; } diff --git a/src/lagrangian/dieselSpray/spray/sprayFunctions.C b/src/lagrangian/dieselSpray/spray/sprayFunctions.C index 43b14b477816dde0b3fe2b3bbf07535e15b77d10..fb3e9541b15d0eb6f50acefa228ff1ecb2cee026 100644 --- a/src/lagrangian/dieselSpray/spray/sprayFunctions.C +++ b/src/lagrangian/dieselSpray/spray/sprayFunctions.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "spray.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -106,7 +106,7 @@ scalar spray::liquidMass() const if (twoD()) { - sum *= constant::math::twoPi/angleOfWedge(); + sum *= constant::mathematical::twoPi/angleOfWedge(); } reduce(sum, sumOp<scalar>()); @@ -148,7 +148,7 @@ scalar spray::liquidEnthalpy() const if (twoD()) { - sum *= constant::math::twoPi/angleOfWedge(); + sum *= constant::mathematical::twoPi/angleOfWedge(); } reduce(sum, sumOp<scalar>()); @@ -193,7 +193,7 @@ scalar spray::liquidTotalEnthalpy() const if (twoD()) { - sum *= constant::math::twoPi/angleOfWedge(); + sum *= constant::mathematical::twoPi/angleOfWedge(); } reduce(sum, sumOp<scalar>()); @@ -218,7 +218,7 @@ scalar spray::liquidKineticEnergy() const if (twoD()) { - sum *= constant::math::twoPi/angleOfWedge(); + sum *= constant::mathematical::twoPi/angleOfWedge(); } reduce(sum, sumOp<scalar>()); diff --git a/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/LISA/LISA.C b/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/LISA/LISA.C index 36bbbfce715d0622035f5e09b3849a1e12fe5d27..2478061ab1416b29378f6088a8039e5fb5261d9e 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/LISA/LISA.C +++ b/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/LISA/LISA.C @@ -27,7 +27,7 @@ License #include "LISA.H" #include "addToRunTimeSelectionTable.H" #include "basicMultiComponentMixture.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "RosinRammler.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -155,7 +155,7 @@ void LISA::atomizeParcel 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()); @@ -249,7 +249,7 @@ void LISA::atomizeParcel 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 ambientPressure = 1.0e+5; diff --git a/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/blobsSheetAtomization/blobsSheetAtomization.C b/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/blobsSheetAtomization/blobsSheetAtomization.C index 371c44cb844673c658777b097756ff6c3adc768b..c98aa9513174790cdd2c3dc8fbf51ce8c85e2c13 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/blobsSheetAtomization/blobsSheetAtomization.C +++ b/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/blobsSheetAtomization/blobsSheetAtomization.C @@ -27,7 +27,7 @@ License #include "blobsSheetAtomization.H" #include "addToRunTimeSelectionTable.H" #include "basicMultiComponentMixture.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "RosinRammler.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -127,7 +127,7 @@ void blobsSheetAtomization::atomizeParcel scalar lBU = 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) ); diff --git a/src/lagrangian/dieselSpray/spraySubModels/breakupModel/ETAB/ETAB.C b/src/lagrangian/dieselSpray/spraySubModels/breakupModel/ETAB/ETAB.C index bbb079469beb2e8cd31371dee4cf65d8a03b1d6f..db8438ca9af81471b1b92ebacfa34c2dfc9e0ca3 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/breakupModel/ETAB/ETAB.C +++ b/src/lagrangian/dieselSpray/spraySubModels/breakupModel/ETAB/ETAB.C @@ -26,7 +26,7 @@ License #include "ETAB.H" #include "addToRunTimeSelectionTable.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -128,7 +128,7 @@ void ETAB::breakupParcel scalar quad = -y2/a; if (quad < 0) { - phi = constant::math::twoPi - phit; + phi = constant::mathematical::twoPi - phit; } scalar tb = 0; @@ -139,11 +139,11 @@ void ETAB::breakupParcel if (theta < phi) { - if (constant::math::twoPi - theta >= phi) + if (constant::mathematical::twoPi - theta >= phi) { theta = -theta; } - theta += constant::math::twoPi; + theta += constant::mathematical::twoPi; } tb = (theta-phi)*romega; diff --git a/src/lagrangian/dieselSpray/spraySubModels/breakupModel/SHF/SHF.C b/src/lagrangian/dieselSpray/spraySubModels/breakupModel/SHF/SHF.C index 879a0e0c893d773c9a1db2681453a6f090e1bd10..8382251ad60d8d3237259a1a79281acc18536e32 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/breakupModel/SHF/SHF.C +++ b/src/lagrangian/dieselSpray/spraySubModels/breakupModel/SHF/SHF.C @@ -26,7 +26,7 @@ License #include "SHF.H" #include "addToRunTimeSelectionTable.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -196,7 +196,7 @@ void SHF::breakupParcel px = x - /(2.0*sqrt(constant::math::twoPi)*sigma_) + /(2.0*sqrt(constant::mathematical::twoPi)*sigma_) *exp(-0.5*sqr((x-mu_)/sigma_)); } while (y >= px); @@ -227,7 +227,7 @@ void SHF::breakupParcel px = x - /(2.0*sqrt(constant::math::twoPi)*sigma_) + /(2.0*sqrt(constant::mathematical::twoPi)*sigma_) *exp(-0.5*sqr((x-mu_)/sigma_)); } while (y >= px); diff --git a/src/lagrangian/dieselSpray/spraySubModels/breakupModel/TAB/TAB.C b/src/lagrangian/dieselSpray/spraySubModels/breakupModel/TAB/TAB.C index e05b6d1bf1caa5d33d67fff1bef22d8da04522ad..b47bcc968b8674a2b2bbb27c1d649e6a1cec2118 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/breakupModel/TAB/TAB.C +++ b/src/lagrangian/dieselSpray/spraySubModels/breakupModel/TAB/TAB.C @@ -26,7 +26,7 @@ License #include "TAB.H" #include "addToRunTimeSelectionTable.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -130,7 +130,7 @@ void TAB::breakupParcel scalar quad = -y2/a; if (quad < 0) { - phi = constant::math::twoPi - phit; + phi = constant::mathematical::twoPi - phit; } scalar tb = 0; @@ -147,11 +147,11 @@ void TAB::breakupParcel if (theta < phi) { - if (constant::math::twoPi - theta >= phi) + if (constant::mathematical::twoPi - theta >= phi) { theta = -theta; } - theta += constant::math::twoPi; + theta += constant::mathematical::twoPi; } tb = (theta - phi)/omega; diff --git a/src/lagrangian/dieselSpray/spraySubModels/breakupModel/reitzKHRT/reitzKHRT.C b/src/lagrangian/dieselSpray/spraySubModels/breakupModel/reitzKHRT/reitzKHRT.C index 3443e3883ea42c81079faaf84b4d2dab872a97d4..6d9ab7cd8160d451d940de4a37767e0732329816 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/breakupModel/reitzKHRT/reitzKHRT.C +++ b/src/lagrangian/dieselSpray/spraySubModels/breakupModel/reitzKHRT/reitzKHRT.C @@ -26,7 +26,7 @@ License #include "reitzKHRT.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)); // 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 // 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 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; // Total number of parcels for the whole injection event diff --git a/src/lagrangian/dieselSpray/spraySubModels/collisionModel/ORourke/ORourkeCollisionModel.C b/src/lagrangian/dieselSpray/spraySubModels/collisionModel/ORourke/ORourkeCollisionModel.C index f1983375052067efd94ede19767754300da06b73..24f7565ea05257eba1dbeb1d91fe4272c92d82e5 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/collisionModel/ORourke/ORourkeCollisionModel.C +++ b/src/lagrangian/dieselSpray/spraySubModels/collisionModel/ORourke/ORourkeCollisionModel.C @@ -26,7 +26,7 @@ License #include "ORourkeCollisionModel.H" #include "addToRunTimeSelectionTable.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/dieselSpray/spraySubModels/collisionModel/ORourke/sameCell.H b/src/lagrangian/dieselSpray/spraySubModels/collisionModel/ORourke/sameCell.H index 67085739ecbbbe56f5bfc2808bd8b3df1526dc99..12a819a76ab172cd9343a7b3b1640b8e0ebf649b 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/collisionModel/ORourke/sameCell.H +++ b/src/lagrangian/dieselSpray/spraySubModels/collisionModel/ORourke/sameCell.H @@ -31,7 +31,7 @@ scalar nMin = pMin().N(rhoMin); 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 collProb = exp(-nu); scalar xx = rndGen_.scalar01(); diff --git a/src/lagrangian/dieselSpray/spraySubModels/collisionModel/trajectoryModel/trajectoryCM.H b/src/lagrangian/dieselSpray/spraySubModels/collisionModel/trajectoryModel/trajectoryCM.H index fdc520610252cdbd1f4401d7f61e3d21c820c939..b8cecf2f9bc29f86d67b60c50cbc75a8d45400ea 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/collisionModel/trajectoryModel/trajectoryCM.H +++ b/src/lagrangian/dieselSpray/spraySubModels/collisionModel/trajectoryModel/trajectoryCM.H @@ -129,7 +129,7 @@ if (vAlign > 0) pMax().d() = pow ( - 6.0*newMaxMass/(rhoMax*constant::math::pi*nMax), + 6.0*newMaxMass/(rhoMax*constant::mathematical::pi*nMax), 1.0/3.0 ); diff --git a/src/lagrangian/dieselSpray/spraySubModels/collisionModel/trajectoryModel/trajectoryModel.C b/src/lagrangian/dieselSpray/spraySubModels/collisionModel/trajectoryModel/trajectoryModel.C index bda1b361ccaac9e1ea0f828dbc87ab4d4de891ab..3d6be9b7929027427f1b42feb87910b6dbd35cac 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/collisionModel/trajectoryModel/trajectoryModel.C +++ b/src/lagrangian/dieselSpray/spraySubModels/collisionModel/trajectoryModel/trajectoryModel.C @@ -26,7 +26,7 @@ License #include "trajectoryModel.H" #include "addToRunTimeSelectionTable.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/dieselSpray/spraySubModels/evaporationModel/RutlandFlashBoil/RutlandFlashBoil.C b/src/lagrangian/dieselSpray/spraySubModels/evaporationModel/RutlandFlashBoil/RutlandFlashBoil.C index fbb7d3447252a7b8b901b8b43e6d6c5a8c44a60b..7ba41141ba35b3840a8a49aad639506e370db833 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/evaporationModel/RutlandFlashBoil/RutlandFlashBoil.C +++ b/src/lagrangian/dieselSpray/spraySubModels/evaporationModel/RutlandFlashBoil/RutlandFlashBoil.C @@ -28,7 +28,7 @@ License #include "RutlandFlashBoil.H" #include "addToRunTimeSelectionTable.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -229,7 +229,7 @@ scalar RutlandFlashBoil::boilingTime 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) { break; @@ -257,7 +257,7 @@ scalar RutlandFlashBoil::boilingTime } 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 // conditions (temperature>tBoilingSurface) @@ -269,7 +269,7 @@ scalar RutlandFlashBoil::boilingTime mag((vapourFarEnthalpy-vapourSurfaceEnthalpy)/heatOfVapour); // 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 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); } diff --git a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/Chomiak/Chomiak.C b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/Chomiak/Chomiak.C index faedf5d5f92d570626cd3492372ad0d8bba6bea9..5a48bc9fca537473609780e30b5fac2a1531bc52 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/Chomiak/Chomiak.C +++ b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/Chomiak/Chomiak.C @@ -26,7 +26,7 @@ License #include "Chomiak.H" #include "addToRunTimeSelectionTable.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -118,11 +118,11 @@ vector ChomiakInjector::direction scalar angle = (d - dMax)*maxSprayAngle_[n] /(dMin - dMax) - *constant::math::pi/360.0; + *constant::mathematical::pi/360.0; scalar alpha = sin(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 vector normal = vector::zero; @@ -132,7 +132,7 @@ vector ChomiakInjector::direction scalar reduce = 0.01; // correct beta if this is a 2D run // 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(); normal = diff --git a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/blobsSwirl/blobsSwirlInjector.C b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/blobsSwirl/blobsSwirlInjector.C index 80601db2d1cd73faa039551d7df004593c3c5f18..025c0ec692ab25dfae8eec3546df34cd65e92383 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/blobsSwirl/blobsSwirlInjector.C +++ b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/blobsSwirl/blobsSwirlInjector.C @@ -26,7 +26,7 @@ License #include "blobsSwirlInjector.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_ *= constant::math::pi/180.0; + angle_ *= constant::mathematical::pi/180.0; scalar injectedMassFlow = it.massFlowRate(t); @@ -144,7 +144,7 @@ vector blobsSwirlInjector::direction { scalar alpha = sin(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 vector normal = vector::zero; @@ -155,7 +155,7 @@ vector blobsSwirlInjector::direction // correct beta if this is a 2D run // 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(); normal = alpha @@ -240,7 +240,7 @@ void blobsSwirlInjector::calculateHX ( (A_[inj]*cTau_[inj]*muFuel*massFlow*(1.0 + x_)) /( - constant::math::pi + constant::mathematical::pi *injectorDiameter *rhoFuel *dPressure @@ -260,7 +260,7 @@ void blobsSwirlInjector::calculateHX ( (A_[inj]*cTau_[inj]*muFuel*massFlow*(1.0 + x_)) /( - constant::math::pi + constant::mathematical::pi *injectorDiameter *rhoFuel *dPressure diff --git a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/constant/constInjector.C b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/constant/constInjector.C index 1b89c250bc26d3fdad6fd9bf626d2aa97400aec0..bc58618be6b4e4f4b242832af42ccaea4d95eaaa 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/constant/constInjector.C +++ b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/constant/constInjector.C @@ -26,7 +26,7 @@ License #include "constInjector.H" #include "addToRunTimeSelectionTable.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -133,11 +133,11 @@ vector constInjector::direction 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 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 vector normal = vector::zero; @@ -147,7 +147,7 @@ vector constInjector::direction scalar reduce = 0.01; // correct beta if this is a 2D run // 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(); normal = diff --git a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/definedHollowCone/definedHollowCone.C b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/definedHollowCone/definedHollowCone.C index 78740f67daebb317404b8168fce8b7c2149005bf..bc5add5df31f8972658707242d00f158acd2d812 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/definedHollowCone/definedHollowCone.C +++ b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/definedHollowCone/definedHollowCone.C @@ -26,7 +26,7 @@ License #include "definedHollowCone.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 scalar angle = angleInner + rndGen_.scalar01()*(angleOuter - angleInner); - scalar alpha = sin(angle*constant::math::pi/360.0); - scalar dcorr = cos(angle*constant::math::pi/360.0); - scalar beta = constant::math::twoPi*rndGen_.scalar01(); + scalar alpha = sin(angle*constant::mathematical::pi/360.0); + scalar dcorr = cos(angle*constant::mathematical::pi/360.0); + scalar beta = constant::mathematical::twoPi*rndGen_.scalar01(); // randomly distributed vector normal to the injection vector vector normal = vector::zero; @@ -176,7 +176,7 @@ vector definedHollowConeInjector::direction // correct beta if this is a 2D run // 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(); normal = alpha diff --git a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/definedPressureSwirl/definedPressureSwirl.C b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/definedPressureSwirl/definedPressureSwirl.C index 7257ae0a03304ad1c611a85bc6c9633305e40e55..0308dcb1327fbc99330ff016e7f7ad9d79702ea1 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/definedPressureSwirl/definedPressureSwirl.C +++ b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/definedPressureSwirl/definedPressureSwirl.C @@ -26,7 +26,7 @@ License #include "definedPressureSwirl.H" #include "addToRunTimeSelectionTable.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -174,7 +174,7 @@ scalar definedPressureSwirlInjector::d0 // end modifications - angle_ *= constant::math::pi/360.0; + angle_ *= constant::mathematical::pi/360.0; scalar injectedMassFlow = it.massFlowRate(t); @@ -191,7 +191,7 @@ scalar definedPressureSwirlInjector::d0 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 // modified by multiplying the sheet tickness for the cone angle cosinus. @@ -216,7 +216,7 @@ vector definedPressureSwirlInjector::direction { scalar alpha = sin(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 vector normal = vector::zero; @@ -227,7 +227,7 @@ vector definedPressureSwirlInjector::direction // correct beta if this is a 2D run // 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(); normal = alpha @@ -296,7 +296,7 @@ scalar definedPressureSwirlInjector::kv scalar coneAngle = it.getTableValue(coneAngle_, t); - coneAngle *= constant::math::pi/360.0; + coneAngle *= constant::mathematical::pi/360.0; scalar cosAngle = cos(coneAngle); scalar Tav = it.integrateTable(it.T())/(it.teoi() - it.tsoi()); @@ -309,7 +309,7 @@ scalar definedPressureSwirlInjector::kv it.getTableValue(maxKv_, t), 4.0*massFlow *sqrt(rhoFuel/2.0/dPressure) - /(constant::math::pi*sqr(injectorDiameter)*rhoFuel*cosAngle) + /(constant::mathematical::pi*sqr(injectorDiameter)*rhoFuel*cosAngle) ); return min(1.0, kv); diff --git a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/hollowCone/hollowCone.C b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/hollowCone/hollowCone.C index 3c89eaba4fae1831d6a46da90bde9ee081cae1d3..3d77b3aed39cf22ae2e4b98b30664cfffa3b6694 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/hollowCone/hollowCone.C +++ b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/hollowCone/hollowCone.C @@ -26,7 +26,7 @@ License #include "hollowCone.H" #include "addToRunTimeSelectionTable.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -130,9 +130,9 @@ vector hollowConeInjector::direction { scalar angle = innerAngle_[n] + rndGen_.scalar01()*(outerAngle_[n]-innerAngle_[n]); - scalar alpha = sin(angle*constant::math::pi/360.0); - scalar dcorr = cos(angle*constant::math::pi/360.0); - scalar beta = constant::math::twoPi*rndGen_.scalar01(); + scalar alpha = sin(angle*constant::mathematical::pi/360.0); + scalar dcorr = cos(angle*constant::mathematical::pi/360.0); + scalar beta = constant::mathematical::twoPi*rndGen_.scalar01(); // randomly distributed vector normal to the injection vector vector normal = vector::zero; @@ -143,7 +143,7 @@ vector hollowConeInjector::direction // correct beta if this is a 2D run // 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(); normal = alpha diff --git a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/pressureSwirl/pressureSwirlInjector.C b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/pressureSwirl/pressureSwirlInjector.C index c5510ecc26a829e80a101287176c92ef3d3f9d22..04f5807fe550976174997d0df5ee5c91059a4d3b 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/pressureSwirl/pressureSwirlInjector.C +++ b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/pressureSwirl/pressureSwirlInjector.C @@ -26,7 +26,7 @@ License #include "pressureSwirlInjector.H" #include "addToRunTimeSelectionTable.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -107,7 +107,7 @@ scalar pressureSwirlInjector::d0 scalar c = rndGen_.scalar01(); 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); @@ -122,7 +122,7 @@ scalar pressureSwirlInjector::d0 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; } @@ -138,7 +138,7 @@ vector pressureSwirlInjector::direction { scalar alpha = sin(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 vector normal = vector::zero; @@ -149,7 +149,7 @@ vector pressureSwirlInjector::direction // correct beta if this is a 2D run // 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(); normal = alpha @@ -217,7 +217,7 @@ scalar pressureSwirlInjector::kv scalar coneAngle = coneAngle_[inj]; - coneAngle *= constant::math::pi/360.0; + coneAngle *= constant::mathematical::pi/360.0; scalar cosAngle = cos(coneAngle); scalar Tav = it.integrateTable(it.T())/(it.teoi()-it.tsoi()); @@ -230,7 +230,7 @@ scalar pressureSwirlInjector::kv maxKv_[inj], 4.0*massFlow *sqrt(rhoFuel/2.0/dPressure) - /(constant::math::pi*sqr(injectorDiameter)*rhoFuel*cosAngle) + /(constant::mathematical::pi*sqr(injectorDiameter)*rhoFuel*cosAngle) ); return min(1.0, kv); diff --git a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudI.H b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudI.H index 1c58b87c247623989077ef6bf4897cfc609d1519..58a152acec3e84faa24a09540d722e0518079559 100644 --- a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudI.H +++ b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudI.H @@ -27,6 +27,7 @@ License #include "constants.H" using namespace Foam::constant; +using namespace Foam::constant::mathematical; // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -317,7 +318,7 @@ inline Foam::scalar Foam::DsmcCloud<ParcelType>::maxwellianAverageSpeed ) const { 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 { return - 2.0*sqrt(2.0*physicoChemical::k.value()*temperature/(math::pi*mass)); + 2.0*sqrt(2.0*physicoChemical::k.value()*temperature/(pi*mass)); } diff --git a/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcelI.H b/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcelI.H index 274d634b3f6d43f0046a582002dca68acb1b4a9e..506ead2510fcc69969f0ef45e97b5ba70949d0b1 100644 --- a/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcelI.H +++ b/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcelI.H @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -103,7 +103,7 @@ template <class ParcelType> inline Foam::scalar Foam::DsmcParcel<ParcelType>::constantProperties::sigmaT() const { - return constant::math::pi*d_*d_; + return constant::mathematical::pi*d_*d_; } diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.C b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.C index e445f7cde5b1dd52b2338078ad947692eadb9e07..277939617eaa70add40abcc905dc9d87f88dffb2 100644 --- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.C +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.C @@ -27,7 +27,7 @@ License #include "LarsenBorgnakkeVariableHardSphere.H" #include "constants.H" -using namespace Foam::constant; +using namespace Foam::constant::mathematical; // * * * * * * * * * * * * * 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 scalar sigmaTPQ = - math::pi*dPQ*dPQ + pi*dPQ*dPQ *pow(2.0*physicoChemical::k.value()*Tref_/(mR*cR*cR), omegaPQ - 0.5) /exp(Foam::lgamma(2.5 - omegaPQ)); @@ -255,7 +255,7 @@ void Foam::LarsenBorgnakkeVariableHardSphere<CloudType>::collide scalar sinTheta = sqrt(1.0 - cosTheta*cosTheta); - scalar phi = math::twoPi*rndGen.scalar01(); + scalar phi = twoPi*rndGen.scalar01(); vector postCollisionRelU = cR diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.C b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.C index 3174445ac6f02ad18650addf5bd7291b810c4a4e..7e4830896757934616a7c6b998e997e92dd0f053 100644 --- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.C +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.C @@ -27,7 +27,7 @@ License #include "VariableHardSphere.H" #include "constants.H" -using namespace Foam::constant; +using namespace Foam::constant::mathematical; // * * * * * * * * * * * * * * * * 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 scalar sigmaTPQ = - math::pi*dPQ*dPQ + pi*dPQ*dPQ *pow(2.0*physicoChemical::k.value()*Tref_/(mR*cR*cR), omegaPQ - 0.5) /exp(Foam::lgamma(2.5 - omegaPQ)); @@ -128,7 +128,7 @@ void Foam::VariableHardSphere<CloudType>::collide scalar sinTheta = sqrt(1.0 - cosTheta*cosTheta); - scalar phi = math::twoPi*rndGen.scalar01(); + scalar phi = twoPi*rndGen.scalar01(); vector postCollisionRelU = cR diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.C b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.C index e3cc0d0fd836c07162cfe1e1ae81737697b1dd66..03fc89d032ce48bdd93b61763c67cd7781e0a374 100644 --- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.C +++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.C @@ -27,7 +27,7 @@ License #include "FreeStream.H" #include "constants.H" -using namespace Foam::constant; +using namespace Foam::constant::mathematical; // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -133,7 +133,7 @@ void Foam::FreeStream<CloudType>::inflow() Random& rndGen(cloud.rndGen()); - scalar sqrtPi = sqrt(math::pi); + scalar sqrtPi = sqrt(pi); label particlesInserted = 0; diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H index 84ccbdec5e46da8947bfabaa52c4751f5b9c8279..f7b485f265025e130432a8e7496c5008ebc445c5 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H @@ -24,9 +24,9 @@ License \*---------------------------------------------------------------------------*/ -#include "mathConstants.H" +#include "mathematicalConstants.H" -using namespace Foam::constant; +using namespace Foam::constant::mathematical; // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -353,7 +353,7 @@ template <class ParcelType> inline Foam::scalar 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 Foam::KinematicParcel<ParcelType>::areaS(const scalar d) const { - return math::pi*d*d; + return pi*d*d; } diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C index c035ecf2dcb74f8403cc78ffbe427ca3fe79cd59..5c3d3d06856b632567259732526b6344f5907513 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C @@ -25,9 +25,9 @@ License \*---------------------------------------------------------------------------*/ #include "ReactingMultiphaseParcel.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" -using namespace Foam::constant; +using namespace Foam::constant::mathematical; // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -497,7 +497,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc } else { - this->d_ = cbrt(mass1/this->rho_*6.0/math::pi); + this->d_ = cbrt(mass1/this->rho_*6.0/pi); } } } diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C index 0be19914dc783d079c4b807e13dad469d929a977..f5975720e460357323ad33bc6da09682f785c557 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C @@ -25,10 +25,10 @@ License \*---------------------------------------------------------------------------*/ #include "ReactingParcel.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "specie.H" -using namespace Foam::constant; +using namespace Foam::constant::mathematical; // * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * // @@ -393,7 +393,7 @@ void Foam::ReactingParcel<ParcelType>::calc } else { - this->d_ = cbrt(mass1/this->rho_*6.0/math::pi); + this->d_ = cbrt(mass1/this->rho_*6.0/pi); } } } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C index dd14fe9240fa41edaf2eb42338317f2da97b0685..b9cbf0f9210c0e056525974d62299b5031fac3bb 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C @@ -26,9 +26,9 @@ License #include "ConeInjection.H" #include "DataEntry.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" -using namespace Foam::constant; +using namespace Foam::constant::mathematical; // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // @@ -203,7 +203,7 @@ void Foam::ConeInjection<CloudType>::setProperties ) { // set particle velocity - const scalar deg2Rad = math::pi/180.0; + const scalar deg2Rad = pi/180.0; scalar t = time - this->SOI_; scalar ti = thetaInner_().value(t); @@ -213,7 +213,7 @@ void Foam::ConeInjection<CloudType>::setProperties coneAngle *= deg2Rad; scalar alpha = sin(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 dirVec = dcorr*direction_; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.C index e8eb092a39e15aa27b113b148672601c044a71a8..e59eba322e2c9e7fb50c8550542bef75c3c9d313 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.C @@ -26,9 +26,9 @@ License #include "ConeInjectionMP.H" #include "DataEntry.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" -using namespace Foam::constant; +using namespace Foam::constant::mathematical; // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // @@ -249,7 +249,7 @@ void Foam::ConeInjectionMP<CloudType>::setProperties // set particle velocity const label i = parcelI%positions_.size(); - const scalar deg2Rad = math::pi/180.0; + const scalar deg2Rad = pi/180.0; scalar t = time - this->SOI_; scalar ti = thetaInner_().value(t); @@ -259,7 +259,7 @@ void Foam::ConeInjectionMP<CloudType>::setProperties coneAngle *= deg2Rad; scalar alpha = sin(coneAngle); scalar dcorr = cos(coneAngle); - scalar beta = math::twoPi*this->owner().rndGen().scalar01(); + scalar beta = twoPi*this->owner().rndGen().scalar01(); vector normal = alpha*(tanVec1_[i]*cos(beta) + tanVec2_[i]*sin(beta)); vector dirVec = dcorr*axes_[i]; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C index 7e8fc31e187a62a7346a92cc260134069c637ffa..a1353be80c46df3dbd593867192c42e1c17915b6 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C @@ -26,9 +26,9 @@ License #include "FieldActivatedInjection.H" #include "volFields.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" -using namespace Foam::constant; +using namespace Foam::constant::mathematical; // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // @@ -130,7 +130,7 @@ Foam::FieldActivatedInjection<CloudType>::FieldActivatedInjection // Determine total volume of particles to inject this->volumeTotal_ = - nParcelsPerInjector_*sum(pow3(diameters_))*math::pi/6.0; + nParcelsPerInjector_*sum(pow3(diameters_))*pi/6.0; // Set/cache the injector cells forAll(positions_, i) diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C index 7f5f3e6c478272edb9e15c7977bab497c933832a..7ba1e5ca78c674a4512f324400087b2fdaa63cdf 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C @@ -25,10 +25,10 @@ License \*---------------------------------------------------------------------------*/ #include "InjectionModel.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "meshTools.H" -using namespace Foam::constant; +using namespace Foam::constant::mathematical; // * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * // @@ -200,7 +200,7 @@ Foam::scalar Foam::InjectionModel<CloudType>::setNumberOfParticles nP = volume/volumeTotal_ *massTotal_/rho - /(parcels*math::pi/6.0*pow3(diameter)); + /(parcels*pi/6.0*pow3(diameter)); break; } case pbNumber: diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C index 8ebf75af0b34c1ccc495a6817364ef10a043a8ac..ad829f39788c86207340f6fd44dbdcec16656aea 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C @@ -25,9 +25,9 @@ License \*---------------------------------------------------------------------------*/ #include "ManualInjection.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" -using namespace Foam::constant; +using namespace Foam::constant::mathematical; // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // @@ -108,7 +108,7 @@ Foam::ManualInjection<CloudType>::ManualInjection } // Determine volume of particles to inject - this->volumeTotal_ = sum(pow3(diameters_))*math::pi/6.0; + this->volumeTotal_ = sum(pow3(diameters_))*pi/6.0; } diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C index 25898132890a8a090180b9d56dc996034df50df0..d763866a49ca60bcec630bf42a356009320bf166 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C @@ -26,9 +26,9 @@ License #include "LiquidEvaporation.H" #include "specie.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" -using namespace Foam::constant; +using namespace Foam::constant::mathematical; // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -150,7 +150,7 @@ void Foam::LiquidEvaporation<CloudType>::calculate scalarField Xc = calcXc(cellI); // droplet surface area - scalar A = math::pi*sqr(d); + scalar A = pi*sqr(d); // calculate mass transfer of each specie in liquid forAll(activeLiquids_, i) diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C index d51e92f4533b579cc521b55b5b3516218ae6e917..f341267b846c696c5703118c70d57bd1916f8be5 100644 --- a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C +++ b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C @@ -26,9 +26,9 @@ License #include "moleculeCloud.H" #include "fvMesh.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" -using namespace Foam::constant; +using namespace Foam::constant::mathematical; // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -606,11 +606,11 @@ void Foam::moleculeCloud::initialiseMolecules zoneDict.lookup("orientationAngles") ); - scalar phi(orientationAngles.x()*math::pi/180.0); + scalar phi(orientationAngles.x()*pi/180.0); - scalar theta(orientationAngles.y()*math::pi/180.0); + scalar theta(orientationAngles.y()*pi/180.0); - scalar psi(orientationAngles.z()*math::pi/180.0); + scalar psi(orientationAngles.z()*pi/180.0); const tensor R ( @@ -976,11 +976,11 @@ void Foam::moleculeCloud::createMolecule { pi = equipartitionAngularMomentum(temperature, cP); - scalar phi(rndGen_.scalar01()*math::twoPi); + scalar phi(rndGen_.scalar01()*twoPi); - scalar theta(rndGen_.scalar01()*math::twoPi); + scalar theta(rndGen_.scalar01()*twoPi); - scalar psi(rndGen_.scalar01()*math::twoPi); + scalar psi(rndGen_.scalar01()*twoPi); Q = tensor ( diff --git a/src/lagrangian/molecularDynamics/potential/electrostaticPotential/electrostaticPotential.C b/src/lagrangian/molecularDynamics/potential/electrostaticPotential/electrostaticPotential.C index b6f5886f67bd54892a35a6abbc9712cf2d06185f..3fe31364604bd8f9127c73bd34d862d75fd6fbeb 100644 --- a/src/lagrangian/molecularDynamics/potential/electrostaticPotential/electrostaticPotential.C +++ b/src/lagrangian/molecularDynamics/potential/electrostaticPotential/electrostaticPotential.C @@ -25,13 +25,13 @@ License \*---------------------------------------------------------------------------*/ #include "electrostaticPotential.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::electrostaticPotential::electrostaticPotential() : - prefactor(1.0/(4.0*constant::math::pi*8.854187817e-12)) + prefactor(1.0/(4.0*constant::mathematical::pi*8.854187817e-12)) {} // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/coulomb/coulomb.C b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/coulomb/coulomb.C index f66971bf8ed8b931474ffd9f30c44db25f68cbe0..856f58f033da0314b8363e2a636ca175dddf8a00 100644 --- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/coulomb/coulomb.C +++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/coulomb/coulomb.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "coulomb.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -47,7 +47,7 @@ addToRunTimeSelectionTable ); scalar coulomb::oneOverFourPiEps0 = - 1.0/(4.0*constant::math::pi*8.854187817e-12); + 1.0/(4.0*constant::mathematical::pi*8.854187817e-12); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/dampedCoulomb/dampedCoulomb.C b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/dampedCoulomb/dampedCoulomb.C index 5fbf371f6463e1921db0fc9283d02e4891b287a4..da39c0b49fda82cac41f972b5dcffd5d48c2f3b7 100644 --- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/dampedCoulomb/dampedCoulomb.C +++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/dampedCoulomb/dampedCoulomb.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "dampedCoulomb.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -47,7 +47,7 @@ addToRunTimeSelectionTable ); scalar dampedCoulomb::oneOverFourPiEps0 = - 1.0/(4.0*constant::math::pi*8.854187817e-12); + 1.0/(4.0*constant::mathematical::pi*8.854187817e-12); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/meshTools/cellQuality/cellQuality.C b/src/meshTools/cellQuality/cellQuality.C index 19bef0e5face5e7cc6a162f1fc4d656e925cac56..0d32f64ef42dd5754a7f298e853afd55a3a99390 100644 --- a/src/meshTools/cellQuality/cellQuality.C +++ b/src/meshTools/cellQuality/cellQuality.C @@ -26,7 +26,7 @@ License \*---------------------------------------------------------------------------*/ #include "cellQuality.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -67,7 +67,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::nonOrthogonality() const scalar cosDDotS = Foam::acos(min(1.0, (d & s)/(mag(d)*magS + VSMALL))) - *180.0/constant::math::pi; + *180.0/constant::mathematical::pi; result[own[faceI]] = max(cosDDotS, result[own[faceI]]); @@ -93,7 +93,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::nonOrthogonality() const scalar cosDDotS = Foam::acos(min(1.0, (d & s)/(mag(d)*magS + VSMALL))) - *180.0/constant::math::pi; + *180.0/constant::mathematical::pi; result[faceCells[faceI]] = max(cosDDotS, result[faceCells[faceI]]); } @@ -208,7 +208,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::faceNonOrthogonality() const scalar cosDDotS = Foam::acos(min(1.0, (d & s)/(mag(d)*magS + VSMALL))) - *180.0/constant::math::pi; + *180.0/constant::mathematical::pi; result[faceI] = cosDDotS; } @@ -234,7 +234,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::faceNonOrthogonality() const scalar cosDDotS = Foam::acos(min(1.0, (d & s)/(mag(d)*magS + VSMALL))) - *180.0/constant::math::pi; + *180.0/constant::mathematical::pi; result[globalFaceI++] = cosDDotS; } diff --git a/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.C b/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.C index f3afa950ae436b5c00db0c2cd5a5765a19ba95f5..05842f14f290ceecc50466d59d480ab351e0b80b 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.C +++ b/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.C @@ -27,7 +27,7 @@ License #include "EulerCoordinateRotation.H" #include "Switch.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -59,9 +59,9 @@ void Foam::EulerCoordinateRotation::calcTransform if (inDegrees) { - phi *= constant::math::pi/180.0; - theta *= constant::math::pi/180.0; - psi *= constant::math::pi/180.0; + phi *= constant::mathematical::pi/180.0; + theta *= constant::mathematical::pi/180.0; + psi *= constant::mathematical::pi/180.0; } tensor::operator= diff --git a/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.C b/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.C index 1350ed3bc56a60b8023d50b61a2482badc8a3cff..ade5e0635915a9caec201b96de546775fa14d52f 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.C +++ b/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.C @@ -27,7 +27,7 @@ License #include "STARCDCoordinateRotation.H" #include "Switch.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -60,9 +60,9 @@ void Foam::STARCDCoordinateRotation::calcTransform if (inDegrees) { - x *= constant::math::pi/180.0; - y *= constant::math::pi/180.0; - z *= constant::math::pi/180.0; + x *= constant::mathematical::pi/180.0; + y *= constant::mathematical::pi/180.0; + z *= constant::mathematical::pi/180.0; } tensor::operator= diff --git a/src/meshTools/coordinateSystems/cylindricalCS.C b/src/meshTools/coordinateSystems/cylindricalCS.C index 31d8456ec5d76c11c23eea6ebb2d32d4f4c28ac8..b55dadf014bcbd80f7b23fe35b3799fbcda4cae2 100644 --- a/src/meshTools/coordinateSystems/cylindricalCS.C +++ b/src/meshTools/coordinateSystems/cylindricalCS.C @@ -28,7 +28,7 @@ License #include "one.H" #include "Switch.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -133,7 +133,7 @@ Foam::vector Foam::cylindricalCS::localToGlobal { scalar theta ( - local.y()*(inDegrees_ ? constant::math::pi/180.0 : 1.0) + local.y()*(inDegrees_ ? constant::mathematical::pi/180.0 : 1.0) ); return coordinateSystem::localToGlobal @@ -153,7 +153,7 @@ Foam::tmp<Foam::vectorField> Foam::cylindricalCS::localToGlobal scalarField theta = ( local.component(vector::Y) - *(inDegrees_ ? constant::math::pi/180.0 : 1.0) + *(inDegrees_ ? constant::mathematical::pi/180.0 : 1.0) ); @@ -181,7 +181,7 @@ Foam::vector Foam::cylindricalCS::globalToLocal ( lc.y(), lc.x() - )*(inDegrees_ ? 180.0/constant::math::pi : 1.0), + )*(inDegrees_ ? 180.0/constant::mathematical::pi : 1.0), lc.z() ); } @@ -212,7 +212,7 @@ Foam::tmp<Foam::vectorField> Foam::cylindricalCS::globalToLocal ( lc.component(vector::Y), lc.component(vector::X) - )*(inDegrees_ ? 180.0/constant::math::pi : 1.0) + )*(inDegrees_ ? 180.0/constant::mathematical::pi : 1.0) ); result.replace(vector::Z, lc.component(vector::Z)); diff --git a/src/meshTools/coordinateSystems/sphericalCS.C b/src/meshTools/coordinateSystems/sphericalCS.C index e36d0e50a78b180cc25a794c4272e5fce8429def..e7edbbf8dccbe771adb22c132435fd15801bea0c 100644 --- a/src/meshTools/coordinateSystems/sphericalCS.C +++ b/src/meshTools/coordinateSystems/sphericalCS.C @@ -28,7 +28,7 @@ License #include "one.H" #include "Switch.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -135,12 +135,12 @@ Foam::vector Foam::sphericalCS::localToGlobal const scalar theta ( local.y() - *(inDegrees_ ? constant::math::pi/180.0 : 1.0) + *(inDegrees_ ? constant::mathematical::pi/180.0 : 1.0) ); const scalar phi ( local.z() - *(inDegrees_ ? constant::math::pi/180.0 : 1.0) + *(inDegrees_ ? constant::mathematical::pi/180.0 : 1.0) ); return coordinateSystem::localToGlobal @@ -161,12 +161,12 @@ Foam::tmp<Foam::vectorField> Foam::sphericalCS::localToGlobal const scalarField theta ( local.component(vector::Y) - *(inDegrees_ ? constant::math::pi/180.0 : 1.0) + *(inDegrees_ ? constant::mathematical::pi/180.0 : 1.0) ); const scalarField phi ( local.component(vector::Z) - *(inDegrees_ ? constant::math::pi/180.0 : 1.0) + *(inDegrees_ ? constant::mathematical::pi/180.0 : 1.0) ); vectorField lc(local.size()); @@ -193,11 +193,11 @@ Foam::vector Foam::sphericalCS::globalToLocal atan2 ( lc.y(), lc.x() - )*(inDegrees_ ? 180.0/constant::math::pi : 1.0), + )*(inDegrees_ ? 180.0/constant::mathematical::pi : 1.0), acos ( lc.z()/(r + SMALL) - )*(inDegrees_ ? 180.0/constant::math::pi : 1.0) + )*(inDegrees_ ? 180.0/constant::mathematical::pi : 1.0) ); } @@ -227,7 +227,7 @@ Foam::tmp<Foam::vectorField> Foam::sphericalCS::globalToLocal ( lc.component(vector::Y), lc.component(vector::X) - )*(inDegrees_ ? 180.0/constant::math::pi : 1.0) + )*(inDegrees_ ? 180.0/constant::mathematical::pi : 1.0) ); result.replace @@ -236,7 +236,7 @@ Foam::tmp<Foam::vectorField> Foam::sphericalCS::globalToLocal acos ( lc.component(vector::Z)/(r + SMALL) - )*(inDegrees_ ? 180.0/constant::math::pi : 1.0) + )*(inDegrees_ ? 180.0/constant::mathematical::pi : 1.0) ); return tresult; diff --git a/src/meshTools/coordinateSystems/toroidalCS.C b/src/meshTools/coordinateSystems/toroidalCS.C index c9d8c82f27011b341f7e97aae29b12fa4a8fd395..93495948fdf6947fbbcb6fa1e7f004afd38b5a19 100644 --- a/src/meshTools/coordinateSystems/toroidalCS.C +++ b/src/meshTools/coordinateSystems/toroidalCS.C @@ -26,7 +26,7 @@ License #include "toroidalCS.H" #include "addToRunTimeSelectionTable.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -72,8 +72,8 @@ Foam::vector Foam::toroidalCS::localToGlobal ) const { // Notation: r = local.x() - scalar theta = local.y()*constant::math::pi/180.0; - scalar phi = local.z()*constant::math::pi/180.0; + scalar theta = local.y()*constant::mathematical::pi/180.0; + scalar phi = local.z()*constant::mathematical::pi/180.0; scalar rprime = radius_ + local.x()*sin(phi); @@ -101,10 +101,10 @@ Foam::tmp<Foam::vectorField> Foam::toroidalCS::localToGlobal const scalarField r = local.component(vector::X); const scalarField theta = - local.component(vector::Y)*constant::math::pi/180.0; + local.component(vector::Y)*constant::mathematical::pi/180.0; const scalarField phi = - local.component(vector::Z)*constant::math::pi/180.0; + local.component(vector::Z)*constant::mathematical::pi/180.0; const scalarField rprime = radius_ + r*sin(phi); diff --git a/src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.C b/src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.C index 56e878938e6a2e17817c65276ab796cf77bbb9c4..69a67634bc21bb56e588fe911b620227c3bebae6 100644 --- a/src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.C +++ b/src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.C @@ -26,7 +26,7 @@ License #include "primitiveMeshGeometry.H" #include "pyramidPointFaceRef.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -272,7 +272,7 @@ bool Foam::primitiveMeshGeometry::checkFaceDotProduct // Severe nonorthogonality threshold const scalar severeNonorthogonalityThreshold = - ::cos(orthWarn/180.0*constant::math::pi); + ::cos(orthWarn/180.0*constant::mathematical::pi); scalar minDDotS = GREAT; @@ -304,7 +304,7 @@ bool Foam::primitiveMeshGeometry::checkFaceDotProduct << " between cells " << own[faceI] << " and " << nei[faceI] << ": Angle = " - << ::acos(dDotS)/constant::math::pi*180.0 + << ::acos(dDotS)/constant::mathematical::pi*180.0 << " deg." << endl; } @@ -330,7 +330,7 @@ bool Foam::primitiveMeshGeometry::checkFaceDotProduct << " between cells " << own[faceI] << " and " << nei[faceI] << ": Angle = " - << ::acos(dDotS)/constant::math::pi*180.0 + << ::acos(dDotS)/constant::mathematical::pi*180.0 << " deg." << endl; } @@ -376,9 +376,9 @@ bool Foam::primitiveMeshGeometry::checkFaceDotProduct if (neiSize > 0) { Info<< "Mesh non-orthogonality Max: " - << ::acos(minDDotS)/constant::math::pi*180.0 + << ::acos(minDDotS)/constant::mathematical::pi*180.0 << " average: " << - ::acos(sumDDotS/neiSize)/constant::math::pi*180.0 + ::acos(sumDDotS/neiSize)/constant::mathematical::pi*180.0 << endl; } } @@ -780,7 +780,7 @@ bool Foam::primitiveMeshGeometry::checkFaceAngles << 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(); @@ -861,7 +861,7 @@ bool Foam::primitiveMeshGeometry::checkFaceAngles { scalar maxConcaveDegr = Foam::asin(Foam::min(1.0, maxEdgeSin)) - *180.0/constant::math::pi; + *180.0/constant::mathematical::pi; Info<< "There are " << nConcave << " faces with concave angles between consecutive" diff --git a/src/meshTools/sets/cellSources/shapeToCell/shapeToCell.C b/src/meshTools/sets/cellSources/shapeToCell/shapeToCell.C index ba460f73813cd85078f7906c88974e6d144c1212..96b1b3562ba17885f657de446e98fdbcd58c03e1 100644 --- a/src/meshTools/sets/cellSources/shapeToCell/shapeToCell.C +++ b/src/meshTools/sets/cellSources/shapeToCell/shapeToCell.C @@ -26,7 +26,7 @@ License #include "shapeToCell.H" #include "polyMesh.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "hexMatcher.H" #include "cellFeatures.H" @@ -57,7 +57,7 @@ Foam::topoSetSource::addToUsageTable Foam::shapeToCell::usage_ // Angle for polys to be considered splitHexes. Foam::scalar Foam::shapeToCell::featureCos = - Foam::cos(10.0*Foam::constant::math::pi/180.0); + Foam::cos(10.0*Foam::constant::mathematical::pi/180.0); // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/src/meshTools/triSurface/booleanOps/surfaceIntersection/edgeIntersections.C b/src/meshTools/triSurface/booleanOps/surfaceIntersection/edgeIntersections.C index 1666da5a8eb8c518f2fe14b2d6310bbc0d45298d..fdd08569a698a5ebb23c6ef474df8ccefbf56e14 100644 --- a/src/meshTools/triSurface/booleanOps/surfaceIntersection/edgeIntersections.C +++ b/src/meshTools/triSurface/booleanOps/surfaceIntersection/edgeIntersections.C @@ -36,7 +36,7 @@ License #include "meshTools.H" #include "plane.H" #include "Random.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "treeBoundBox.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -44,7 +44,7 @@ License defineTypeNameAndDebug(Foam::edgeIntersections, 0); Foam::scalar Foam::edgeIntersections::alignedCos_ = - Foam::cos(89.0*Foam::constant::math::pi/180.0); + Foam::cos(89.0*Foam::constant::mathematical::pi/180.0); // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C b/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C index dceed6d2c991f8f9f09bc00296a120d06b81ffd1..8699b1be34a1f8e65fc66f5dc254487ef8047b37 100644 --- a/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C +++ b/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C @@ -33,7 +33,7 @@ License #include "linePointRef.H" #include "OFstream.H" #include "IFstream.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -491,7 +491,7 @@ Foam::labelList Foam::surfaceFeatures::selectFeatureEdges void Foam::surfaceFeatures::findFeatures(const scalar includedAngle) { scalar minCos = - Foam::cos((180.0 - includedAngle)*constant::math::pi/180.0); + Foam::cos((180.0 - includedAngle)*constant::mathematical::pi/180.0); const labelListList& edgeFaces = surf_.edgeFaces(); const vectorField& faceNormals = surf_.faceNormals(); diff --git a/src/randomProcesses/Kmesh/Kmesh.C b/src/randomProcesses/Kmesh/Kmesh.C index 93091114f19559168748584733ec1f07f564afd8..5ce3c85463ed5a96d166830f17257ddfeef0083f 100644 --- a/src/randomProcesses/Kmesh/Kmesh.C +++ b/src/randomProcesses/Kmesh/Kmesh.C @@ -27,7 +27,7 @@ License #include "Kmesh.H" #include "polyMesh.H" #include "volFields.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -89,15 +89,15 @@ Foam::Kmesh::Kmesh(const fvMesh& mesh) for (i=0; i<NN[0]; i++) { - scalar k1 = (i - NN[0]/2)*constant::math::twoPi/L[0]; + scalar k1 = (i - NN[0]/2)*constant::mathematical::twoPi/L[0]; for (label j=0; j<NN[1]; j++) { - scalar k2 = (j - NN[1]/2)*constant::math::twoPi/L[1]; + scalar k2 = (j - NN[1]/2)*constant::mathematical::twoPi/L[1]; for (label k=0; k<NN[2]; k++) { - scalar k3 = (k - NN[2]/2)*constant::math::twoPi/L[2]; + scalar k3 = (k - NN[2]/2)*constant::mathematical::twoPi/L[2]; (*this)[rep(i, j, k, NN)] = vector(k1, k2, k3); } diff --git a/src/randomProcesses/fft/kShellIntegration.C b/src/randomProcesses/fft/kShellIntegration.C index c007425c810dc4492310cabe2352ce5db739c33c..846de038028f1534a40c5d5b729e398cf164e3c7 100644 --- a/src/randomProcesses/fft/kShellIntegration.C +++ b/src/randomProcesses/fft/kShellIntegration.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "kShellIntegration.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -51,12 +51,12 @@ graph kShellIntegration // spectra E(k). int E(k) dk is now the total energy in a box // of side 2pi - y *= sqr(x)*4.0*constant::math::pi; + y *= sqr(x)*4.0*constant::mathematical::pi; // now scale this to get the energy in a box of side l0 scalar l0(K.sizeOfBox()[0]*(scalar(K.nn()[0])/(scalar(K.nn()[0]) - 1.0))); - scalar factor = pow3(l0/constant::math::twoPi); + scalar factor = pow3(l0/constant::mathematical::twoPi); y *= factor; diff --git a/src/randomProcesses/noise/noiseFFT.C b/src/randomProcesses/noise/noiseFFT.C index d843e871b72d97bdd38700b37e332aae3b645b68..73d177134014d4ccce2dfec26014c9cacf39774d 100644 --- a/src/randomProcesses/noise/noiseFFT.C +++ b/src/randomProcesses/noise/noiseFFT.C @@ -28,7 +28,7 @@ License #include "IFstream.H" #include "DynamicList.H" #include "fft.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "SubField.H" // * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * // @@ -170,7 +170,7 @@ Foam::tmp<Foam::scalarField> Foam::noiseFFT::Hanning(const label N) const scalar T = N*deltat_; - return 2*(0.5 - 0.5*cos(constant::math::twoPi*t/T)); + return 2*(0.5 - 0.5*cos(constant::mathematical::twoPi*t/T)); } diff --git a/src/randomProcesses/turbulence/turbGen.C b/src/randomProcesses/turbulence/turbGen.C index 6ac9c90804dab6e86a043e93e13d847f7800f6de..c129c1a0f0338084c74b277e8eac8f833a243b3c 100644 --- a/src/randomProcesses/turbulence/turbGen.C +++ b/src/randomProcesses/turbulence/turbGen.C @@ -29,7 +29,7 @@ License #include "Kmesh.H" #include "primitiveFields.H" #include "Ek.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -70,8 +70,8 @@ vectorField turbGen::U() complexVectorField up = fft::reverseTransform ( - ComplexField(cos(constant::math::twoPi*rndPhases)*s, - sin(constant::math::twoPi*rndPhases)*s), + ComplexField(cos(constant::mathematical::twoPi*rndPhases)*s, + sin(constant::mathematical::twoPi*rndPhases)*s), K.nn() ); diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C index 252bfbde1b4d8675175ccd87a78780e3515c0e7c..42f3ec841d08730c21648297fc46d1bc78c2b8fc 100644 --- a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C @@ -33,6 +33,7 @@ License #include "constants.H" using namespace Foam::constant; +using namespace Foam::constant::mathematical; // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -84,7 +85,7 @@ greyDiffusiveRadiationMixedFvPatchScalarField patch().lookupPatchField<volScalarField, scalar>(TName_); refValue() = - emissivity_*4.0*physicoChemical::sigma.value()*pow4(Tp)/math::pi; + emissivity_*4.0*physicoChemical::sigma.value()*pow4(Tp)/pi; refGrad() = 0.0; @@ -199,9 +200,7 @@ updateCoeffs() ( Ir*(1.0 - emissivity_) + emissivity_*physicoChemical::sigma.value()*pow4(Tp[faceI]) - ) - /constant::math::pi; - + )/pi; } else { diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C index 6201dc66ed12a003f527a45fe5ec57b52301071c..a0a83e9e843d37a36a83f01dc6f6b4d3164e19d2 100644 --- a/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C @@ -34,6 +34,7 @@ License #include "constants.H" using namespace Foam::constant; +using namespace Foam::constant::mathematical; // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -85,7 +86,7 @@ wideBandDiffusiveRadiationMixedFvPatchScalarField patch().lookupPatchField<volScalarField, scalar>(TName_); refValue() = - emissivity_*4.0*physicoChemical::sigma.value()*pow4(Tp)/math::pi; + emissivity_*4.0*physicoChemical::sigma.value()*pow4(Tp)/pi; refGrad() = 0.0; if (dict.found("value")) @@ -197,8 +198,7 @@ updateCoeffs() ( Ir*(1.0 - emissivity_) + emissivity_*Eb[faceI] - ) - /math::pi; + )/pi; } else { diff --git a/src/thermophysicalModels/radiation/radiationModel/fvDOM/fvDOM/fvDOM.C b/src/thermophysicalModels/radiation/radiationModel/fvDOM/fvDOM/fvDOM.C index aaf5b544966535ac78974b45594bc79b5a038b53..d57b13866abe422a195317116896fe86512b86a6 100644 --- a/src/thermophysicalModels/radiation/radiationModel/fvDOM/fvDOM/fvDOM.C +++ b/src/thermophysicalModels/radiation/radiationModel/fvDOM/fvDOM/fvDOM.C @@ -32,6 +32,7 @@ License #include "constants.H" using namespace Foam::constant; +using namespace Foam::constant::mathematical; // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -135,8 +136,8 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T) { nRay_ = 4*nPhi_*nTheta_; IRay_.setSize(nRay_); - scalar deltaPhi = math::pi/(2.0*nPhi_); - scalar deltaTheta = math::pi/nTheta_; + scalar deltaPhi = pi/(2.0*nPhi_); + scalar deltaTheta = pi/nTheta_; label i = 0; for (label n = 1; n <= nTheta_; n++) { @@ -168,11 +169,11 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T) { if (mesh_.nSolutionD() == 2) //2D (X & Y) { - scalar thetai = math::piByTwo; - scalar deltaTheta = math::pi; + scalar thetai = piByTwo; + scalar deltaTheta = pi; nRay_ = 4*nPhi_; IRay_.setSize(nRay_); - scalar deltaPhi = math::pi/(2.0*nPhi_); + scalar deltaPhi = pi/(2.0*nPhi_); label i = 0; for (label m = 1; m <= 4*nPhi_; m++) { @@ -198,11 +199,11 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T) } else //1D (X) { - scalar thetai = math::piByTwo; - scalar deltaTheta = math::pi; + scalar thetai = piByTwo; + scalar deltaTheta = pi; nRay_ = 2; IRay_.setSize(nRay_); - scalar deltaPhi = math::pi; + scalar deltaPhi = pi; label i = 0; for (label m = 1; m <= 2; m++) { diff --git a/src/thermophysicalModels/radiation/radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C b/src/thermophysicalModels/radiation/radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C index b589f356b7d94ab1a905a1a5e8059b8c6d0dc6bb..eac7274d2296945040845e462ea7aa2d17511b2b 100644 --- a/src/thermophysicalModels/radiation/radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C +++ b/src/thermophysicalModels/radiation/radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C @@ -199,7 +199,7 @@ Foam::scalar Foam::radiation::radiativeIntensityRay::correct() fvm::div(Ji, ILambda_[lambdaI], "div(Ji,Ii_h)") + fvm::Sp(k*omega_, ILambda_[lambdaI]) == - 1.0/constant::math::pi*omega_ + 1.0/constant::mathematical::pi*omega_ *( k*blackBody_.bLambda(lambdaI) + absorptionEmission_.ECont(lambdaI) diff --git a/src/transportModels/interfaceProperties/interfaceProperties.C b/src/transportModels/interfaceProperties/interfaceProperties.C index 22f4da24b3e31445d46ee80963dc7419bb016d75..4e5a8c0116ebd22d2c01c6cf5d7b3968ac5036f2 100644 --- a/src/transportModels/interfaceProperties/interfaceProperties.C +++ b/src/transportModels/interfaceProperties/interfaceProperties.C @@ -26,7 +26,7 @@ License #include "interfaceProperties.H" #include "alphaContactAngleFvPatchScalarField.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" #include "surfaceInterpolate.H" #include "fvcDiv.H" #include "fvcGrad.H" @@ -35,7 +35,7 @@ License // * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * // const Foam::scalar Foam::interfaceProperties::convertToRad = - Foam::constant::math::pi/180.0; + Foam::constant::mathematical::pi/180.0; // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/datToFoam/datToFoam.C b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/datToFoam/datToFoam.C index 82454b8c2eb37ac89d03e5c9f197352672619533..8ff4a0c063b1253dfa21c5d413711344858a55be 100644 --- a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/datToFoam/datToFoam.C +++ b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/datToFoam/datToFoam.C @@ -43,7 +43,7 @@ Description #include "cellShape.H" #include "cellModeller.H" #include "mergePoints.H" -#include "mathConstants.H" +#include "mathematicalConstants.H" using namespace Foam; @@ -128,7 +128,7 @@ int main(int argc, char *argv[]) fileName pointsFile(runTime.constantPath()/"points.tmp"); OFstream pFile(pointsFile); - scalar a(0.1*constant::math::pi/180.0); + scalar a(0.1*constant::mathematical::pi/180.0); tensor rotateZ = tensor (