Commit 93ed9337 authored by Mark Olesen's avatar Mark Olesen Committed by Sergio Ferraris
Browse files

STYLE: use unitConversion degToRad() from instead of separate value

parent 915c0785
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2013-2017 OpenFOAM Foundation Copyright (C) 2013-2017 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -45,9 +46,6 @@ namespace Foam ...@@ -45,9 +46,6 @@ namespace Foam
defineTypeNameAndDebug(multiphaseMixtureThermo, 0); defineTypeNameAndDebug(multiphaseMixtureThermo, 0);
} }
const Foam::scalar Foam::multiphaseMixtureThermo::convertToRad =
Foam::constant::mathematical::pi/180.0;
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
......
...@@ -139,10 +139,6 @@ private: ...@@ -139,10 +139,6 @@ private:
//- Stabilisation for normalisation of the interface normal //- Stabilisation for normalisation of the interface normal
const dimensionedScalar deltaN_; const dimensionedScalar deltaN_;
//- Conversion factor for degrees into radians
static const scalar convertToRad;
// Private member functions // Private member functions
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2018 OpenFOAM Foundation Copyright (C) 2011-2018 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -38,11 +39,7 @@ License ...@@ -38,11 +39,7 @@ License
#include "fvcFlux.H" #include "fvcFlux.H"
#include "fvcAverage.H" #include "fvcAverage.H"
// * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * // #include "unitConversion.H"
const Foam::scalar Foam::multiphaseSystem::convertToRad =
Foam::constant::mathematical::pi/180.0;
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
...@@ -281,7 +278,7 @@ void Foam::multiphaseSystem::correctContactAngle ...@@ -281,7 +278,7 @@ void Foam::multiphaseSystem::correctContactAngle
bool matched = (tp.key().first() == phase1.name()); 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); scalarField theta(boundary[patchi].size(), theta0);
scalar uTheta = tp().uTheta(); scalar uTheta = tp().uTheta();
...@@ -289,8 +286,8 @@ void Foam::multiphaseSystem::correctContactAngle ...@@ -289,8 +286,8 @@ void Foam::multiphaseSystem::correctContactAngle
// Calculate the dynamic contact angle if required // Calculate the dynamic contact angle if required
if (uTheta > SMALL) if (uTheta > SMALL)
{ {
scalar thetaA = convertToRad*tp().thetaA(matched); const scalar thetaA = degToRad(tp().thetaA(matched));
scalar thetaR = convertToRad*tp().thetaR(matched); const scalar thetaR = degToRad(tp().thetaR(matched));
// Calculated the component of the velocity parallel to the wall // Calculated the component of the velocity parallel to the wall
vectorField Uwall vectorField Uwall
......
...@@ -190,9 +190,6 @@ private: ...@@ -190,9 +190,6 @@ private:
//- Stabilisation for normalisation of the interface normal //- Stabilisation for normalisation of the interface normal
const dimensionedScalar deltaN_; const dimensionedScalar deltaN_;
//- Conversion factor for degrees into radians
static const scalar convertToRad;
// Private member functions // Private member functions
......
...@@ -44,6 +44,8 @@ License ...@@ -44,6 +44,8 @@ License
#include "fvmLaplacian.H" #include "fvmLaplacian.H"
#include "fvmSup.H" #include "fvmSup.H"
#include "unitConversion.H"
// * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * //
namespace Foam namespace Foam
...@@ -52,9 +54,6 @@ namespace Foam ...@@ -52,9 +54,6 @@ namespace Foam
defineRunTimeSelectionTable(multiphaseSystem, dictionary); defineRunTimeSelectionTable(multiphaseSystem, dictionary);
} }
const Foam::scalar Foam::multiphaseSystem::convertToRad =
Foam::constant::mathematical::pi/180.0;
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
...@@ -425,7 +424,7 @@ void Foam::multiphaseSystem::correctContactAngle ...@@ -425,7 +424,7 @@ void Foam::multiphaseSystem::correctContactAngle
bool matched = (tp.key().first() == phase1.name()); 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); scalarField theta(boundary[patchi].size(), theta0);
scalar uTheta = tp().uTheta(); scalar uTheta = tp().uTheta();
...@@ -433,8 +432,8 @@ void Foam::multiphaseSystem::correctContactAngle ...@@ -433,8 +432,8 @@ void Foam::multiphaseSystem::correctContactAngle
// Calculate the dynamic contact angle if required // Calculate the dynamic contact angle if required
if (uTheta > SMALL) if (uTheta > SMALL)
{ {
scalar thetaA = convertToRad*tp().thetaA(matched); const scalar thetaA = degToRad(tp().thetaA(matched));
scalar thetaR = convertToRad*tp().thetaR(matched); const scalar thetaR = degToRad(tp().thetaR(matched));
// Calculated the component of the velocity parallel to the wall // Calculated the component of the velocity parallel to the wall
vectorField Uwall vectorField Uwall
......
...@@ -75,9 +75,6 @@ private: ...@@ -75,9 +75,6 @@ private:
//- Stabilisation for normalisation of the interface normal //- Stabilisation for normalisation of the interface normal
const dimensionedScalar deltaN_; const dimensionedScalar deltaN_;
//- Conversion factor for degrees into radians
static const scalar convertToRad;
// Private member functions // Private member functions
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment