STYLE: use degToRad() instead of pi/180

This commit is contained in:
Mark Olesen
2019-04-26 11:48:27 +02:00
parent 70f3424842
commit 6e2c454344
16 changed files with 60 additions and 79 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd |
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2017 OpenFOAM Foundation
@ -27,7 +27,7 @@ License
#include "JohnsonJacksonFrictionalStress.H"
#include "addToRunTimeSelectionTable.H"
#include "mathematicalConstants.H"
#include "unitConversion.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -66,7 +66,7 @@ JohnsonJackson
phi_("phi", dimless, coeffDict_),
alphaDeltaMin_("alphaDeltaMin", dimless, coeffDict_)
{
phi_ *= constant::mathematical::pi/180.0;
phi_ *= degToRad();
}
@ -139,7 +139,7 @@ bool Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::read()
p_.read(coeffDict_);
phi_.read(coeffDict_);
phi_ *= constant::mathematical::pi/180.0;
phi_ *= degToRad();
alphaDeltaMin_.read(coeffDict_);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd |
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2016-2017 OpenFOAM Foundation
@ -27,7 +27,7 @@ License
#include "JohnsonJacksonSchaefferFrictionalStress.H"
#include "addToRunTimeSelectionTable.H"
#include "mathematicalConstants.H"
#include "unitConversion.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -66,7 +66,7 @@ JohnsonJacksonSchaeffer::JohnsonJacksonSchaeffer
phi_("phi", dimless, coeffDict_),
alphaDeltaMin_("alphaDeltaMin", dimless, coeffDict_)
{
phi_ *= constant::mathematical::pi/180.0;
phi_ *= degToRad();
}
@ -199,7 +199,7 @@ JohnsonJacksonSchaeffer::read()
p_.read(coeffDict_);
phi_.read(coeffDict_);
phi_ *= constant::mathematical::pi/180.0;
phi_ *= degToRad();
alphaDeltaMin_.read(coeffDict_);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd |
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2017 OpenFOAM Foundation
@ -27,6 +27,7 @@ License
#include "SchaefferFrictionalStress.H"
#include "addToRunTimeSelectionTable.H"
#include "unitConversion.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -60,7 +61,7 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::Schaeffer
coeffDict_(dict.optionalSubDict(typeName + "Coeffs")),
phi_("phi", dimless, coeffDict_)
{
phi_ *= constant::mathematical::pi/180.0;
phi_ *= degToRad();
}
@ -183,7 +184,7 @@ bool Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::read()
coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs");
phi_.read(coeffDict_);
phi_ *= constant::mathematical::pi/180.0;
phi_ *= degToRad();
return true;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd |
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2017 OpenFOAM Foundation
@ -27,7 +27,7 @@ License
#include "JohnsonJacksonFrictionalStress.H"
#include "addToRunTimeSelectionTable.H"
#include "mathematicalConstants.H"
#include "unitConversion.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -66,7 +66,7 @@ JohnsonJackson
phi_("phi", dimless, coeffDict_),
alphaDeltaMin_("alphaDeltaMin", dimless, coeffDict_)
{
phi_ *= constant::mathematical::pi/180.0;
phi_ *= degToRad();
}
@ -139,7 +139,7 @@ bool Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::read()
p_.read(coeffDict_);
phi_.read(coeffDict_);
phi_ *= constant::mathematical::pi/180.0;
phi_ *= degToRad();
alphaDeltaMin_.read(coeffDict_);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd |
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2016-2017 OpenFOAM Foundation
@ -27,7 +27,7 @@ License
#include "JohnsonJacksonSchaefferFrictionalStress.H"
#include "addToRunTimeSelectionTable.H"
#include "mathematicalConstants.H"
#include "unitConversion.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -66,7 +66,7 @@ JohnsonJacksonSchaeffer::JohnsonJacksonSchaeffer
phi_("phi", dimless, coeffDict_),
alphaDeltaMin_("alphaDeltaMin", dimless, coeffDict_)
{
phi_ *= constant::mathematical::pi/180.0;
phi_ *= degToRad();
}
@ -199,7 +199,7 @@ JohnsonJacksonSchaeffer::read()
p_.read(coeffDict_);
phi_.read(coeffDict_);
phi_ *= constant::mathematical::pi/180.0;
phi_ *= degToRad();
alphaDeltaMin_.read(coeffDict_);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd |
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2017 OpenFOAM Foundation
@ -27,6 +27,7 @@ License
#include "SchaefferFrictionalStress.H"
#include "addToRunTimeSelectionTable.H"
#include "unitConversion.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -60,7 +61,7 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::Schaeffer
coeffDict_(dict.optionalSubDict(typeName + "Coeffs")),
phi_("phi", dimless, coeffDict_)
{
phi_ *= constant::mathematical::pi/180.0;
phi_ *= degToRad();
}
@ -183,7 +184,7 @@ bool Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::read()
coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs");
phi_.read(coeffDict_);
phi_ *= constant::mathematical::pi/180.0;
phi_ *= degToRad();
return true;
}