diff --git a/applications/solvers/combustion/dieselEngineFoam/createSpray.H b/applications/solvers/combustion/dieselEngineFoam/createSpray.H index 6b78689f09..8c6706e0ba 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 709b70f7a6..eaf3219445 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 2bacaa91ee..5c1e43dc99 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 8d5dd0d9fa..63549b99a5 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 8ff998217d..dd584d03e2 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 276cac6ae0..5423a70e3b 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 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 7cf2ab1f25..ec8f777542 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& ppsi = patch().lookupPatchField("psi"); - Field C1 = sqrt(ppsi*constant::math::piByTwo) + Field C1 = sqrt(ppsi*constant::mathematical::piByTwo) *(2.0 - accommodationCoeff_)/accommodationCoeff_; Field pnu = pmu/prho; diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H index 4bbb449df7..11768ea2f6 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H @@ -21,7 +21,7 @@ fvm::laplacian(rhorUAf, p) == fvc::div(phi) ); - pEqn.setReference(pRefCell, p[pRefCell]); + pEqn.setReference(pRefCell, pRefValue); // retain the residual from the first iteration if (nonOrth == 0) diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C index 03e46a5c63..7762bcbfc9 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 2ebb83c2fc..6d32abd9c7 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 fe24603713..ce1fff38d7 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::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 2d0acca9fa..a1a2894ae1 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::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 40c296f7e0..f2a4225d71 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::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 dd3f345179..2869cbef77 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 2a1c00b188..a6026440be 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 b5e60e94c2..fb7584d156 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 892319df6c..e913b35620 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::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 c717f6cc1f..86f1eb18fd 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 0905771d19..2ce7f8ba80 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 de7af2b077..d16f4f23cc 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(degToRad(featureAngle)); scalar concaveAngle = defaultConcaveAngle; args.optionReadIfPresent("concaveAngle", concaveAngle); - scalar concaveSin = Foam::sin(concaveAngle*constant::math::pi/180.0); + scalar concaveSin = Foam::sin(degToRad(concaveAngle)); 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 1d9c0e5b54..f9f47c815a 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,9 +539,8 @@ int main(int argc, char *argv[]) scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])())); - scalar radAngle = featureAngle*constant::math::pi/180.0; - scalar minCos = Foam::cos(radAngle); - scalar minSin = Foam::sin(radAngle); + scalar minCos = Foam::cos(degToRad(featureAngle)); + scalar minSin = Foam::sin(degToRad(featureAngle)); bool readSet = args.optionFound("set"); bool geometry = args.optionFound("geometry"); diff --git a/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C b/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C index 996cd67d4c..1da7ba049e 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 f1ec25a59c..ba2b615df1 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(degToRad(2.5)); SLList::iterator iterf = pFaces[WEDGE][0].begin(); SLList::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 65dd5c952d..af2c429bdc 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(degToRad(featureAngle)); 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(degToRad(featureAngle)); 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 0b135188e0..da0f868388 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 + << radToDeg(Foam::acos(faceAreaAngle)) << " deg." << endl << "master cell: " << fp.masterCell() << " STAR number: " << starCellID_[fp.masterCell()] diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/wedge/wedge.C b/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/wedge/wedge.C index 07ddf34eaf..67abf36564 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" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -51,8 +51,7 @@ wedge::wedge(const dictionary& dict) axis_(coeffDict_.lookup("axis")), angle_ ( - readScalar(coeffDict_.lookup("angle")) - *constant::math::pi/180.0 + degToRad(readScalar(coeffDict_.lookup("angle"))) ) {} diff --git a/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C b/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C index 3c48f6d7d7..15affd66e0 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(degToRad(featureAngle)); 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 c6d7b8f61e..a76c4ad327 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 92e3057093..089689b47b 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 78716d63c7..1b9fcf0d0a 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/Make/files b/src/OpenFOAM/Make/files index 6ba6b90cf1..2823c2a9ec 100644 --- a/src/OpenFOAM/Make/files +++ b/src/OpenFOAM/Make/files @@ -1,6 +1,6 @@ global/global.Cver -global/dimensionedConstants/dimensionedConstants.C -global/dimensionedConstants/constants/constants.C +global/constants/constants.C +global/constants/dimensionedConstants.C global/argList/argList.C global/clock/clock.C diff --git a/src/OpenFOAM/global/dimensionedConstants/constants/atomic/atomicConstants.C b/src/OpenFOAM/global/constants/atomic/atomicConstants.C similarity index 96% rename from src/OpenFOAM/global/dimensionedConstants/constants/atomic/atomicConstants.C rename to src/OpenFOAM/global/constants/atomic/atomicConstants.C index 943bdc5c38..4edebcbe5d 100644 --- a/src/OpenFOAM/global/dimensionedConstants/constants/atomic/atomicConstants.C +++ b/src/OpenFOAM/global/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/atomic/atomicConstants.H b/src/OpenFOAM/global/constants/atomic/atomicConstants.H similarity index 97% rename from src/OpenFOAM/global/dimensionedConstants/constants/atomic/atomicConstants.H rename to src/OpenFOAM/global/constants/atomic/atomicConstants.H index c257374441..b732207d2c 100644 --- a/src/OpenFOAM/global/dimensionedConstants/constants/atomic/atomicConstants.H +++ b/src/OpenFOAM/global/constants/atomic/atomicConstants.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Namespace - Foam::constant::atom + Foam::constant::atomic Description Atomic constants @@ -68,7 +68,7 @@ namespace atomic // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace atomic -} // end namespace constant +} // End namespace constant } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/global/dimensionedConstants/constants/constants.C b/src/OpenFOAM/global/constants/constants.C similarity index 96% rename from src/OpenFOAM/global/dimensionedConstants/constants/constants.C rename to src/OpenFOAM/global/constants/constants.C index f921cba983..079343360f 100644 --- a/src/OpenFOAM/global/dimensionedConstants/constants/constants.C +++ b/src/OpenFOAM/global/constants/constants.C @@ -22,9 +22,6 @@ License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Description - Collection of dimensioned constants - \*---------------------------------------------------------------------------*/ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/global/dimensionedConstants/constants/constants.H b/src/OpenFOAM/global/constants/constants.H similarity index 98% rename from src/OpenFOAM/global/dimensionedConstants/constants/constants.H rename to src/OpenFOAM/global/constants/constants.H index 14ab108667..ad66c608aa 100644 --- a/src/OpenFOAM/global/dimensionedConstants/constants/constants.H +++ b/src/OpenFOAM/global/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/dimensionedConstants.C b/src/OpenFOAM/global/constants/dimensionedConstants.C similarity index 100% rename from src/OpenFOAM/global/dimensionedConstants/dimensionedConstants.C rename to src/OpenFOAM/global/constants/dimensionedConstants.C diff --git a/src/OpenFOAM/global/dimensionedConstants/dimensionedConstants.H b/src/OpenFOAM/global/constants/dimensionedConstants.H similarity index 93% rename from src/OpenFOAM/global/dimensionedConstants/dimensionedConstants.H rename to src/OpenFOAM/global/constants/dimensionedConstants.H index 989089c0b0..fbba918e24 100644 --- a/src/OpenFOAM/global/dimensionedConstants/dimensionedConstants.H +++ b/src/OpenFOAM/global/constants/dimensionedConstants.H @@ -27,9 +27,10 @@ Global Description Dictionary reading and supplying the dimensioned constants used within - OpenFOAM particularly for thermodynamics. The values are read from the - OpenFOAM controlDict and should be changed to run with a different set of - units from the default SI units. + OpenFOAM, particularly for thermodynamics. + + The values are read from the OpenFOAM etc/controlDict and should be + changed to run with a different set of units from the default SI units. SourceFiles dimensionedConstants.C diff --git a/src/OpenFOAM/global/dimensionedConstants/constants/electromagnetic/electromagneticConstants.C b/src/OpenFOAM/global/constants/electromagnetic/electromagneticConstants.C similarity index 97% rename from src/OpenFOAM/global/dimensionedConstants/constants/electromagnetic/electromagneticConstants.C rename to src/OpenFOAM/global/constants/electromagnetic/electromagneticConstants.C index 77e2fec40c..11377233b0 100644 --- a/src/OpenFOAM/global/dimensionedConstants/constants/electromagnetic/electromagneticConstants.C +++ b/src/OpenFOAM/global/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/electromagnetic/electromagneticConstants.H b/src/OpenFOAM/global/constants/electromagnetic/electromagneticConstants.H similarity index 97% rename from src/OpenFOAM/global/dimensionedConstants/constants/electromagnetic/electromagneticConstants.H rename to src/OpenFOAM/global/constants/electromagnetic/electromagneticConstants.H index 54586cda47..0d4cd6df14 100644 --- a/src/OpenFOAM/global/dimensionedConstants/constants/electromagnetic/electromagneticConstants.H +++ b/src/OpenFOAM/global/constants/electromagnetic/electromagneticConstants.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Namespace - Foam::constant::em + Foam::constant::electromagnetic Description Electromagnetic constants @@ -77,7 +77,7 @@ namespace electromagnetic // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace electromagnetic -} // end namespace constant +} // End namespace constant } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/global/dimensionedConstants/constants/fundamental/fundamentalConstants.C b/src/OpenFOAM/global/constants/fundamental/fundamentalConstants.C similarity index 100% rename from src/OpenFOAM/global/dimensionedConstants/constants/fundamental/fundamentalConstants.C rename to src/OpenFOAM/global/constants/fundamental/fundamentalConstants.C diff --git a/src/OpenFOAM/global/dimensionedConstants/constants/fundamental/fundamentalConstants.H b/src/OpenFOAM/global/constants/fundamental/fundamentalConstants.H similarity index 100% rename from src/OpenFOAM/global/dimensionedConstants/constants/fundamental/fundamentalConstants.H rename to src/OpenFOAM/global/constants/fundamental/fundamentalConstants.H diff --git a/src/OpenFOAM/global/dimensionedConstants/constants/math/mathConstants.H b/src/OpenFOAM/global/constants/math/mathematicalConstants.H similarity index 76% rename from src/OpenFOAM/global/dimensionedConstants/constants/math/mathConstants.H rename to src/OpenFOAM/global/constants/math/mathematicalConstants.H index f18f97d749..02ceea194c 100644 --- a/src/OpenFOAM/global/dimensionedConstants/constants/math/mathConstants.H +++ b/src/OpenFOAM/global/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 + mathematical constants and conversion functions \*---------------------------------------------------------------------------*/ -#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,8 +55,21 @@ namespace math // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace math -} // end namespace constant +} // End namespace mathematical +} // End namespace constant + + //- Conversion from degrees to radians + inline scalar degToRad(const scalar& deg) + { + return (deg * constant::mathematical::pi/180.0); + } + + //- Conversion from radians to degrees + inline scalar radToDeg(const scalar& rad) + { + return (rad * 180.0/constant::mathematical::pi); + } + } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -64,6 +77,3 @@ namespace math #endif // ************************************************************************* // - - - diff --git a/src/OpenFOAM/global/dimensionedConstants/constants/physicoChemical/physicoChemicalConstants.C b/src/OpenFOAM/global/constants/physicoChemical/physicoChemicalConstants.C similarity index 94% rename from src/OpenFOAM/global/dimensionedConstants/constants/physicoChemical/physicoChemicalConstants.C rename to src/OpenFOAM/global/constants/physicoChemical/physicoChemicalConstants.C index 7446c67d97..d7f9b6a0a8 100644 --- a/src/OpenFOAM/global/dimensionedConstants/constants/physicoChemical/physicoChemicalConstants.C +++ b/src/OpenFOAM/global/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/physicoChemical/physicoChemicalConstants.H b/src/OpenFOAM/global/constants/physicoChemical/physicoChemicalConstants.H similarity index 97% rename from src/OpenFOAM/global/dimensionedConstants/constants/physicoChemical/physicoChemicalConstants.H rename to src/OpenFOAM/global/constants/physicoChemical/physicoChemicalConstants.H index 7f25e0dfb7..920f390e27 100644 --- a/src/OpenFOAM/global/dimensionedConstants/constants/physicoChemical/physicoChemicalConstants.H +++ b/src/OpenFOAM/global/constants/physicoChemical/physicoChemicalConstants.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Namespace - Foam::constant::phys + Foam::constant::physicoChemical Description Physico-chemical constants @@ -71,7 +71,7 @@ namespace physicoChemical // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace physicoChemical -} // end namespace constant +} // End namespace constant } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/global/dimensionedConstants/constants/universal/universalConstants.C b/src/OpenFOAM/global/constants/universal/universalConstants.C similarity index 93% rename from src/OpenFOAM/global/dimensionedConstants/constants/universal/universalConstants.C rename to src/OpenFOAM/global/constants/universal/universalConstants.C index 3284c51d4d..a8930a3fd4 100644 --- a/src/OpenFOAM/global/dimensionedConstants/constants/universal/universalConstants.C +++ b/src/OpenFOAM/global/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/global/dimensionedConstants/constants/universal/universalConstants.H b/src/OpenFOAM/global/constants/universal/universalConstants.H similarity index 98% rename from src/OpenFOAM/global/dimensionedConstants/constants/universal/universalConstants.H rename to src/OpenFOAM/global/constants/universal/universalConstants.H index 305e30fe19..85f8f1d9d8 100644 --- a/src/OpenFOAM/global/dimensionedConstants/constants/universal/universalConstants.H +++ b/src/OpenFOAM/global/constants/universal/universalConstants.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Namespace - Foam::constant::uni + Foam::constant::universal Description Universal constants diff --git a/src/OpenFOAM/meshes/meshShapes/face/face.C b/src/OpenFOAM/meshes/meshShapes/face/face.C index a7bbf88005..55be336fa2 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/meshShapes/face/faceIntersection.C b/src/OpenFOAM/meshes/meshShapes/face/faceIntersection.C index c5f9a80250..cf7dfc9400 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/faceIntersection.C +++ b/src/OpenFOAM/meshes/meshShapes/face/faceIntersection.C @@ -159,9 +159,9 @@ Foam::pointHit Foam::face::intersection if (curHit.hit()) { - if (Foam::mag(curHit.distance()) < nearestHitDist) + if (Foam::mag(curHit.distance()) < Foam::mag(nearestHitDist)) { - nearestHitDist = Foam::mag(curHit.distance()); + nearestHitDist = curHit.distance(); nearest.setHit(); nearest.setPoint(curHit.hitPoint()); } diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C index 01879f089f..6350c93446 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(degToRad(nonOrthThreshold_)); scalar minDDotS = GREAT; @@ -472,9 +472,8 @@ bool Foam::primitiveMesh::checkFaceOrthogonality if (debug || report) { Info<< " Mesh non-orthogonality Max: " - << ::acos(minDDotS)/constant::math::pi*180.0 - << " average: " << - ::acos(sumDDotS/neiSize)/constant::math::pi*180.0 + << radToDeg(::acos(minDDotS)) + << " average: " << radToDeg(::acos(sumDDotS/neiSize)) << endl; } } @@ -839,7 +838,7 @@ bool Foam::primitiveMesh::checkFaceAngles << exit(FatalError); } - const scalar maxSin = Foam::sin(maxDeg/180.0*constant::math::pi); + const scalar maxSin = Foam::sin(degToRad(maxDeg)); const pointField& p = points(); const faceList& fcs = faces(); @@ -915,8 +914,7 @@ bool Foam::primitiveMesh::checkFaceAngles if (nConcave > 0) { scalar maxConcaveDegr = - Foam::asin(Foam::min(1.0, maxEdgeSin)) - *180.0/constant::math::pi; + radToDeg(Foam::asin(Foam::min(1.0, maxEdgeSin))); if (debug || report) { diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheckMotion.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheckMotion.C index 1dafd61f61..8fce92f3c8 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 = " << radToDeg(::acos(dDotS)) << " deg." << endl; nDotProductErrors++; diff --git a/src/OpenFOAM/meshes/primitiveShapes/triangle/triangleI.H b/src/OpenFOAM/meshes/primitiveShapes/triangle/triangleI.H index 881fb1d520..40fa909b16 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::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 6ecc1da313..fd573c9fd0 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 8d6657b41f..cab0d8901c 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/dynamicFvMesh/Make/files b/src/dynamicFvMesh/Make/files index cf61902462..ca9a99aca6 100644 --- a/src/dynamicFvMesh/Make/files +++ b/src/dynamicFvMesh/Make/files @@ -10,9 +10,11 @@ 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)/rotationMotion/rotationMotion.C +$(solidBodyMotionFunctions)/rotatingMotion/rotatingMotion.C $(solidBodyMotionFunctions)/multiMotion/multiMotion.C +$(solidBodyMotionFunctions)/oscillatingLinearMotion/oscillatingLinearMotion.C +$(solidBodyMotionFunctions)/oscillatingRotatingMotion/oscillatingRotatingMotion.C LIB = $(FOAM_LIBBIN)/libdynamicFvMesh diff --git a/src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C b/src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C index 5fa27e142a..1e519e4b13 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 1fbd323685..c7f34b90de 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/oscillatingLinearMotion/oscillatingLinearMotion.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/oscillatingLinearMotion/oscillatingLinearMotion.C new file mode 100644 index 0000000000..c662b59d9f --- /dev/null +++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/oscillatingLinearMotion/oscillatingLinearMotion.C @@ -0,0 +1,99 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "oscillatingLinearMotion.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace solidBodyMotionFunctions +{ + defineTypeNameAndDebug(oscillatingLinearMotion, 0); + addToRunTimeSelectionTable + ( + solidBodyMotionFunction, + oscillatingLinearMotion, + dictionary + ); +}; +}; + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::solidBodyMotionFunctions::oscillatingLinearMotion::oscillatingLinearMotion +( + const dictionary& SBMFCoeffs, + const Time& runTime +) +: + solidBodyMotionFunction(SBMFCoeffs, runTime) +{ + read(SBMFCoeffs); +} + + +// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * // + +Foam::solidBodyMotionFunctions::oscillatingLinearMotion::~oscillatingLinearMotion() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +Foam::septernion +Foam::solidBodyMotionFunctions::oscillatingLinearMotion::transformation() const +{ + scalar t = time_.value(); + + const vector displacement = amplitude_*sin(omega_*t); + + quaternion R(0, 0, 0); + septernion TR(septernion(displacement)*R); + + Info<< "solidBodyMotionFunctions::oscillatingLinearMotion::transformation(): " + << "Time = " << t << " transformation: " << TR << endl; + + return TR; +} + + +bool Foam::solidBodyMotionFunctions::oscillatingLinearMotion::read +( + const dictionary& SBMFCoeffs +) +{ + solidBodyMotionFunction::read(SBMFCoeffs); + + SBMFCoeffs_.lookup("amplitude") >> amplitude_; + SBMFCoeffs_.lookup("omega") >> omega_; + + return true; +} + +// ************************************************************************* // diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/oscillatingLinearMotion/oscillatingLinearMotion.H b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/oscillatingLinearMotion/oscillatingLinearMotion.H new file mode 100644 index 0000000000..9d4079f4ce --- /dev/null +++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/oscillatingLinearMotion/oscillatingLinearMotion.H @@ -0,0 +1,116 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Class + Foam::solidBodyMotionFunctions::oscillatingLinearMotion + +Description + SolidBodyMotionFvMesh 6DoF motion function. Oscillating displacement. + +SourceFiles + oscillatingLinearMotion.C + +\*---------------------------------------------------------------------------*/ + +#ifndef oscillatingLinearMotion_H +#define oscillatingLinearMotion_H + +#include "solidBodyMotionFunction.H" +#include "primitiveFields.H" +#include "point.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace solidBodyMotionFunctions +{ + +/*---------------------------------------------------------------------------*\ + Class oscillatingLinearMotion Declaration +\*---------------------------------------------------------------------------*/ + +class oscillatingLinearMotion +: + public solidBodyMotionFunction +{ + // Private data + + //- Amplitude + vector amplitude_; + + //- Radial velocity + scalar omega_; + + + // Private Member Functions + + //- Disallow copy construct + oscillatingLinearMotion(const oscillatingLinearMotion&); + + //- Disallow default bitwise assignment + void operator=(const oscillatingLinearMotion&); + + +public: + + //- Runtime type information + TypeName("oscillatingLinearMotion"); + + + // Constructors + + //- Construct from components + oscillatingLinearMotion + ( + const dictionary& SBMFCoeffs, + const Time& runTime + ); + + + // Destructor + + virtual ~oscillatingLinearMotion(); + + + // Member Functions + + //- Return the solid-body motion transformation septernion + virtual septernion transformation() const; + + //- Update properties from given dictionary + virtual bool read(const dictionary& SBMFCoeffs); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace solidBodyMotionFunctions +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/oscillatingRotatingMotion/oscillatingRotatingMotion.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/oscillatingRotatingMotion/oscillatingRotatingMotion.C new file mode 100644 index 0000000000..39b5870681 --- /dev/null +++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/oscillatingRotatingMotion/oscillatingRotatingMotion.C @@ -0,0 +1,106 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "oscillatingRotatingMotion.H" +#include "addToRunTimeSelectionTable.H" +#include "mathematicalConstants.H" + +using namespace Foam::constant::mathematical; + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace solidBodyMotionFunctions +{ + defineTypeNameAndDebug(oscillatingRotatingMotion, 0); + addToRunTimeSelectionTable + ( + solidBodyMotionFunction, + oscillatingRotatingMotion, + dictionary + ); +}; +}; + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::solidBodyMotionFunctions::oscillatingRotatingMotion::oscillatingRotatingMotion +( + const dictionary& SBMFCoeffs, + const Time& runTime +) +: + solidBodyMotionFunction(SBMFCoeffs, runTime) +{ + read(SBMFCoeffs); +} + + +// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * // + +Foam::solidBodyMotionFunctions::oscillatingRotatingMotion::~oscillatingRotatingMotion() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +Foam::septernion +Foam::solidBodyMotionFunctions::oscillatingRotatingMotion::transformation() const +{ + scalar t = time_.value(); + + vector eulerAngles = amplitude_*sin(omega_*t); + + // Convert the rotational motion from deg to rad + eulerAngles *= pi/180.0; + + quaternion R(eulerAngles.x(), eulerAngles.y(), eulerAngles.z()); + septernion TR(septernion(CofG_)*R*septernion(-CofG_)); + + Info<< "solidBodyMotionFunctions::oscillatingRotatingMotion::transformation(): " + << "Time = " << t << " transformation: " << TR << endl; + + return TR; +} + + +bool Foam::solidBodyMotionFunctions::oscillatingRotatingMotion::read +( + const dictionary& SBMFCoeffs +) +{ + solidBodyMotionFunction::read(SBMFCoeffs); + + SBMFCoeffs_.lookup("CofG") >> CofG_; + SBMFCoeffs_.lookup("amplitude") >> amplitude_; + SBMFCoeffs_.lookup("omega") >> omega_; + + return true; +} + +// ************************************************************************* // diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/oscillatingRotatingMotion/oscillatingRotatingMotion.H b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/oscillatingRotatingMotion/oscillatingRotatingMotion.H new file mode 100644 index 0000000000..253c7df64d --- /dev/null +++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/oscillatingRotatingMotion/oscillatingRotatingMotion.H @@ -0,0 +1,119 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Class + Foam::solidBodyMotionFunctions::oscillatingRotatingMotion + +Description + SolidBodyMotionFvMesh 6DoF motion function. Oscillating rotation. + +SourceFiles + oscillatingRotatingMotion.C + +\*---------------------------------------------------------------------------*/ + +#ifndef oscillatingRotatingMotion_H +#define oscillatingRotatingMotion_H + +#include "solidBodyMotionFunction.H" +#include "primitiveFields.H" +#include "point.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace solidBodyMotionFunctions +{ + +/*---------------------------------------------------------------------------*\ + Class oscillatingRotatingMotion Declaration +\*---------------------------------------------------------------------------*/ + +class oscillatingRotatingMotion +: + public solidBodyMotionFunction +{ + // Private data + + //- Centre of gravity + point CofG_; + + //- Amplitude + vector amplitude_; + + //- Radial velocity + scalar omega_; + + + // Private Member Functions + + //- Disallow copy construct + oscillatingRotatingMotion(const oscillatingRotatingMotion&); + + //- Disallow default bitwise assignment + void operator=(const oscillatingRotatingMotion&); + + +public: + + //- Runtime type information + TypeName("oscillatingRotatingMotion"); + + + // Constructors + + //- Construct from components + oscillatingRotatingMotion + ( + const dictionary& SBMFCoeffs, + const Time& runTime + ); + + + // Destructor + + virtual ~oscillatingRotatingMotion(); + + + // Member Functions + + //- Return the solid-body motion transformation septernion + virtual septernion transformation() const; + + //- Update properties from given dictionary + virtual bool read(const dictionary& SBMFCoeffs); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace solidBodyMotionFunctions +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/rotationMotion/rotationMotion.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/rotatingMotion/rotatingMotion.C similarity index 84% rename from src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/rotationMotion/rotationMotion.C rename to src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/rotatingMotion/rotatingMotion.C index d6a2131f0c..b865ceb930 100644 --- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/rotationMotion/rotationMotion.C +++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/rotatingMotion/rotatingMotion.C @@ -24,11 +24,11 @@ License \*---------------------------------------------------------------------------*/ -#include "rotationMotion.H" +#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 * * * * * * * * * * * * * // @@ -36,11 +36,11 @@ namespace Foam { namespace solidBodyMotionFunctions { - defineTypeNameAndDebug(rotationMotion, 0); + defineTypeNameAndDebug(rotatingMotion, 0); addToRunTimeSelectionTable ( solidBodyMotionFunction, - rotationMotion, + rotatingMotion, dictionary ); }; @@ -49,7 +49,7 @@ namespace solidBodyMotionFunctions // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::solidBodyMotionFunctions::rotationMotion::rotationMotion +Foam::solidBodyMotionFunctions::rotatingMotion::rotatingMotion ( const dictionary& SBMFCoeffs, const Time& runTime @@ -63,14 +63,14 @@ Foam::solidBodyMotionFunctions::rotationMotion::rotationMotion // * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * // -Foam::solidBodyMotionFunctions::rotationMotion::~rotationMotion() +Foam::solidBodyMotionFunctions::rotatingMotion::~rotatingMotion() {} // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // Foam::septernion -Foam::solidBodyMotionFunctions::rotationMotion::transformation() const +Foam::solidBodyMotionFunctions::rotatingMotion::transformation() const { scalar t = time_.value(); @@ -85,14 +85,14 @@ Foam::solidBodyMotionFunctions::rotationMotion::transformation() const quaternion R(eulerAngles.x(), eulerAngles.y(), eulerAngles.z()); septernion TR(septernion(CofG_)*R*septernion(-CofG_)); - Info<< "solidBodyMotionFunctions::rotationMotion::transformation(): " + Info<< "solidBodyMotionFunctions::rotatingMotion::transformation(): " << "Time = " << t << " transformation: " << TR << endl; return TR; } -bool Foam::solidBodyMotionFunctions::rotationMotion::read +bool Foam::solidBodyMotionFunctions::rotatingMotion::read ( const dictionary& SBMFCoeffs ) diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/rotationMotion/rotationMotion.H b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/rotatingMotion/rotatingMotion.H similarity index 87% rename from src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/rotationMotion/rotationMotion.H rename to src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/rotatingMotion/rotatingMotion.H index 27ea7a6d18..da38f67368 100644 --- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/rotationMotion/rotationMotion.H +++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/rotatingMotion/rotatingMotion.H @@ -23,19 +23,19 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::solidBodyMotionFunctions::rotationMotion + Foam::solidBodyMotionFunctions::rotatingMotion Description SolidBodyMotionFvMesh 6DoF motion function. Constant velocity rotation around CoG. SourceFiles - rotationMotion.C + rotatingMotion.C \*---------------------------------------------------------------------------*/ -#ifndef rotationMotion_H -#define rotationMotion_H +#ifndef rotatingMotion_H +#define rotatingMotion_H #include "solidBodyMotionFunction.H" #include "primitiveFields.H" @@ -49,10 +49,10 @@ namespace solidBodyMotionFunctions { /*---------------------------------------------------------------------------*\ - Class rotationMotion Declaration + Class rotatingMotion Declaration \*---------------------------------------------------------------------------*/ -class rotationMotion +class rotatingMotion : public solidBodyMotionFunction { @@ -68,22 +68,22 @@ class rotationMotion // Private Member Functions //- Disallow copy construct - rotationMotion(const rotationMotion&); + rotatingMotion(const rotatingMotion&); //- Disallow default bitwise assignment - void operator=(const rotationMotion&); + void operator=(const rotatingMotion&); public: //- Runtime type information - TypeName("rotationMotion"); + TypeName("rotatingMotion"); // Constructors //- Construct from components - rotationMotion + rotatingMotion ( const dictionary& SBMFCoeffs, const Time& runTime @@ -92,7 +92,7 @@ public: // Destructor - virtual ~rotationMotion(); + virtual ~rotatingMotion(); // Member Functions diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/SKA/SKA.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.C similarity index 79% rename from src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/SKA/SKA.C rename to src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.C index e15523f983..c58fa9852e 100644 --- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/SKA/SKA.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/SKA/SKA.H b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.H similarity index 87% rename from src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/SKA/SKA.H rename to src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.H index 539129d216..1b9cd96f19 100644 --- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/SKA/SKA.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 8f4a57aca7..f17e07c323 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" @@ -44,8 +44,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); +const Foam::scalar Foam::topoCellLooper::featureCos = Foam::cos(degToRad(10.0)); // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/src/dynamicMesh/meshCut/meshModifiers/undoableMeshCutter/undoableMeshCutter.C b/src/dynamicMesh/meshCut/meshModifiers/undoableMeshCutter/undoableMeshCutter.C index 57dd15eb54..16606233d0 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(degToRad(30.0)) ) {} diff --git a/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C b/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C index 4fbd137526..83d0000ea3 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 + << radToDeg(::acos(dDotS)) << " 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 + << radToDeg(::acos(dDotS)) << " deg." << endl; } @@ -368,8 +368,7 @@ bool Foam::polyMeshGeometry::checkFaceDotProduct const polyBoundaryMesh& patches = mesh.boundaryMesh(); // Severe nonorthogonality threshold - const scalar severeNonorthogonalityThreshold = - ::cos(orthWarn/180.0*constant::math::pi); + const scalar severeNonorthogonalityThreshold = ::cos(degToRad(orthWarn)); // Calculate coupled cell centre @@ -504,9 +503,8 @@ bool Foam::polyMeshGeometry::checkFaceDotProduct if (nDDotS > 0) { Info<< "Mesh non-orthogonality Max: " - << ::acos(minDDotS)/constant::math::pi*180.0 - << " average: " << - ::acos(sumDDotS/nDDotS)/constant::math::pi*180.0 + << radToDeg(::acos(minDDotS)) + << " average: " << radToDeg(::acos(sumDDotS/nDDotS)) << endl; } } @@ -1258,7 +1256,7 @@ bool Foam::polyMeshGeometry::checkFaceAngles << abort(FatalError); } - const scalar maxSin = Foam::sin(maxDeg/180.0*constant::math::pi); + const scalar maxSin = Foam::sin(degToRad(maxDeg)); const faceList& fcs = mesh.faces(); @@ -1338,8 +1336,7 @@ bool Foam::polyMeshGeometry::checkFaceAngles if (maxEdgeSin > SMALL) { scalar maxConcaveDegr = - Foam::asin(Foam::min(1.0, maxEdgeSin)) - *180.0/constant::math::pi; + radToDeg(Foam::asin(Foam::min(1.0, maxEdgeSin))); 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 8756cff006..8adf64fdcd 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 * * * * * * * * * * * // @@ -123,12 +123,6 @@ bool Foam::engineTime::read() } -Foam::scalar Foam::engineTime::degToRad(const scalar deg) const -{ - return constant::math::pi*deg/180.0; -} - - Foam::scalar Foam::engineTime::degToTime(const scalar theta) const { // 6 * rpm => deg/s diff --git a/src/engine/engineTime/engineTime.H b/src/engine/engineTime/engineTime.H index f97701d240..e63a7caa0b 100644 --- a/src/engine/engineTime/engineTime.H +++ b/src/engine/engineTime/engineTime.H @@ -121,9 +121,6 @@ public: // Conversion - //- Convert degrees to radians - scalar degToRad(const scalar rad) const; - //- Convert degrees to seconds (for given engine speed in RPM) scalar degToTime(const scalar theta) const; diff --git a/src/engine/include/StCorr.H b/src/engine/include/StCorr.H index 21e5491f10..6e08edcf19 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 6eae867a24..32effaa965 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 912dbf3ea3..d086a46786 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::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 b6ead004e7..5bcb692065 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" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -345,7 +345,8 @@ void surfaceInterpolation::makeCorrectionVectors() const // Calculate the non-orthogonality for meshes with 1 face or more if (returnReduce(magSf.size(), sumOp