Commit 01cbbdef authored by Mark Olesen's avatar Mark Olesen

STYLE: use unitConversion

parent ef1d4d77
......@@ -27,6 +27,7 @@ Author
\*---------------------------------------------------------------------------*/
#include "PoliquenForterre.H"
#include "unitConversion.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
......@@ -82,21 +83,21 @@ Foam::frictionModels::PoliquenForterre::PoliquenForterre
)
)
{
zeta1_ *= M_PI/180.;
zeta2_ *= M_PI/180.;
zeta3_ *= M_PI/180.;
Info<< " " << L_ << endl
<< " " << beta_ << endl
<< " " << 180./M_PI*zeta1_ << endl
<< " " << 180./M_PI*zeta2_ << endl
<< " " << 180./M_PI*zeta3_ << endl << endl;
// Report information in degrees
Info<< " " << L_ << nl
<< " " << beta_ << nl
<< " " << zeta1_ << nl
<< " " << zeta2_ << nl
<< " " << zeta3_ << nl << endl;
zeta1_ *= degToRad();
zeta2_ *= degToRad();
zeta3_ *= degToRad();
}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
const Foam::areaVectorField&
Foam::frictionModels::PoliquenForterre::tauSc() const
{
......
......@@ -92,6 +92,7 @@ class PoliquenForterre
//gravity constant
uniformDimensionedVectorField g_;
public:
//- Runtime type information
......
......@@ -26,7 +26,9 @@ Author
Matthias Rauter matthias.rauter@uibk.ac.at
\*---------------------------------------------------------------------------*/
#include "SimpleSlope.H"
#include "unitConversion.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
......@@ -56,11 +58,12 @@ Foam::elevationModels::SimpleSlope::SimpleSlope
b_(elevationProperties_.subDict("SimpleSlopeCoeffs").lookupOrDefault<scalar>("b", 21.5))
{
alpha_ = alpha_/180.*M_PI;
beta_ = beta_/180.*M_PI;
alpha_ = degToRad(alpha_);
beta_ = degToRad(beta_);
ab_ = b_-a_;
Info << "Creating simple slope, transfer between " << globalZ(a_) << " and " << globalZ(b_) << endl;
Info<< "Creating simple slope, transfer between "
<< globalZ(a_) << " and " << globalZ(b_) << endl;
}
......@@ -116,4 +119,6 @@ Foam::scalar Foam::elevationModels::SimpleSlope::globalZ(scalar x) const
+ab_/(alpha_-beta_)*cos(alpha_)
-sin(beta_)*(x-b_);
}
// ************************************************************************* //
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