diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C index 2161aa75a35a0205b1b8916e733ee0530bc74735..eb41aa2bbf0a217662f2b0b90ac396932875c948 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -45,9 +46,6 @@ namespace Foam defineTypeNameAndDebug(multiphaseMixtureThermo, 0); } -const Foam::scalar Foam::multiphaseMixtureThermo::convertToRad = - Foam::constant::mathematical::pi/180.0; - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.H b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.H index 18ddba8962f9542659da6ef7afc73b7b49ad5a69..368df01043d0bd8eb865b72658815b27b1892889 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.H +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.H @@ -139,10 +139,6 @@ private: //- Stabilisation for normalisation of the interface normal const dimensionedScalar deltaN_; - //- Conversion factor for degrees into radians - static const scalar convertToRad; - - // Private member functions diff --git a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/multiphaseSystem/multiphaseSystem.C b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/multiphaseSystem/multiphaseSystem.C index dce78c2b96095f8222a95bcd5755598c932bb67f..4af3fb946791a35ba31f80ba362d19c21afbb31a 100644 --- a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/multiphaseSystem/multiphaseSystem.C +++ b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/multiphaseSystem/multiphaseSystem.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -38,11 +39,7 @@ License #include "fvcFlux.H" #include "fvcAverage.H" -// * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * // - -const Foam::scalar Foam::multiphaseSystem::convertToRad = - Foam::constant::mathematical::pi/180.0; - +#include "unitConversion.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -281,7 +278,7 @@ void Foam::multiphaseSystem::correctContactAngle bool matched = (tp.key().first() == phase1.name()); - scalar theta0 = convertToRad*tp().theta0(matched); + const scalar theta0 = degToRad(tp().theta0(matched)); scalarField theta(boundary[patchi].size(), theta0); scalar uTheta = tp().uTheta(); @@ -289,8 +286,8 @@ void Foam::multiphaseSystem::correctContactAngle // Calculate the dynamic contact angle if required if (uTheta > SMALL) { - scalar thetaA = convertToRad*tp().thetaA(matched); - scalar thetaR = convertToRad*tp().thetaR(matched); + const scalar thetaA = degToRad(tp().thetaA(matched)); + const scalar thetaR = degToRad(tp().thetaR(matched)); // Calculated the component of the velocity parallel to the wall vectorField Uwall diff --git a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/multiphaseSystem/multiphaseSystem.H b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/multiphaseSystem/multiphaseSystem.H index 039e85a964b069e23413e5519fb4a747852dd21f..18c1cfc628229e53c2371ee9037237b8c60f88bc 100644 --- a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/multiphaseSystem/multiphaseSystem.H +++ b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/multiphaseSystem/multiphaseSystem.H @@ -190,9 +190,6 @@ private: //- Stabilisation for normalisation of the interface normal const dimensionedScalar deltaN_; - //- Conversion factor for degrees into radians - static const scalar convertToRad; - // Private member functions diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/multiphaseSystem/multiphaseSystem.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/multiphaseSystem/multiphaseSystem.C index d66041e205772af4454e30d38bf4fad7623ebddd..2d67872d910ee0e3f648aa48e9dcd2c9c0250d59 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/multiphaseSystem/multiphaseSystem.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/multiphaseSystem/multiphaseSystem.C @@ -44,6 +44,8 @@ License #include "fvmLaplacian.H" #include "fvmSup.H" +#include "unitConversion.H" + // * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * // namespace Foam @@ -52,9 +54,6 @@ namespace Foam defineRunTimeSelectionTable(multiphaseSystem, dictionary); } -const Foam::scalar Foam::multiphaseSystem::convertToRad = - Foam::constant::mathematical::pi/180.0; - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -425,7 +424,7 @@ void Foam::multiphaseSystem::correctContactAngle bool matched = (tp.key().first() == phase1.name()); - scalar theta0 = convertToRad*tp().theta0(matched); + scalar theta0 = degToRad(tp().theta0(matched)); scalarField theta(boundary[patchi].size(), theta0); scalar uTheta = tp().uTheta(); @@ -433,8 +432,8 @@ void Foam::multiphaseSystem::correctContactAngle // Calculate the dynamic contact angle if required if (uTheta > SMALL) { - scalar thetaA = convertToRad*tp().thetaA(matched); - scalar thetaR = convertToRad*tp().thetaR(matched); + const scalar thetaA = degToRad(tp().thetaA(matched)); + const scalar thetaR = degToRad(tp().thetaR(matched)); // Calculated the component of the velocity parallel to the wall vectorField Uwall diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/multiphaseSystem/multiphaseSystem.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/multiphaseSystem/multiphaseSystem.H index f76c20117290c6ae339f670b5dfc70548f81afe3..e2f32da038025b10107c11d748216f26f8180f33 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/multiphaseSystem/multiphaseSystem.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/multiphaseSystem/multiphaseSystem.H @@ -75,9 +75,6 @@ private: //- Stabilisation for normalisation of the interface normal const dimensionedScalar deltaN_; - //- Conversion factor for degrees into radians - static const scalar convertToRad; - // Private member functions