mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
using new constant definitions
This commit is contained in:
@ -30,7 +30,7 @@ scalar gasMass0 = fvc::domainIntegrate(rho).value();
|
|||||||
|
|
||||||
if (dieselSpray.twoD())
|
if (dieselSpray.twoD())
|
||||||
{
|
{
|
||||||
gasMass0 *= 2.0*mathematicalConstant::pi/dieselSpray.angleOfWedge();
|
gasMass0 *= constant::math::twoPi/dieselSpray.angleOfWedge();
|
||||||
}
|
}
|
||||||
|
|
||||||
gasMass0 -=
|
gasMass0 -=
|
||||||
|
|||||||
@ -43,6 +43,7 @@ Description
|
|||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
#include "volPointInterpolation.H"
|
#include "volPointInterpolation.H"
|
||||||
#include "thermoPhysicsTypes.H"
|
#include "thermoPhysicsTypes.H"
|
||||||
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
if (dieselSpray.twoD())
|
if (dieselSpray.twoD())
|
||||||
{
|
{
|
||||||
gasMass *= 2.0*mathematicalConstant::pi/dieselSpray.angleOfWedge();
|
gasMass *= constant::math::twoPi/dieselSpray.angleOfWedge();
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar addedMass = gasMass - gasMass0;
|
scalar addedMass = gasMass - gasMass0;
|
||||||
|
|||||||
@ -41,6 +41,7 @@ Description
|
|||||||
#include "IFstream.H"
|
#include "IFstream.H"
|
||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
#include "Switch.H"
|
#include "Switch.H"
|
||||||
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -58,6 +58,7 @@ Description
|
|||||||
#include "ignition.H"
|
#include "ignition.H"
|
||||||
#include "Switch.H"
|
#include "Switch.H"
|
||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,7 @@ License
|
|||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "fvPatchFieldMapper.H"
|
#include "fvPatchFieldMapper.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -182,7 +182,7 @@ void smoluchowskiJumpTFvPatchScalarField::updateCoeffs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
Field<scalar> C2 = pmu/prho
|
Field<scalar> C2 = pmu/prho
|
||||||
*sqrt(ppsi*mathematicalConstant::pi/2.0)
|
*sqrt(ppsi*constant::math::piByTwo)
|
||||||
*2.0*gamma_/Pr.value()/(gamma_ + 1.0)
|
*2.0*gamma_/Pr.value()/(gamma_ + 1.0)
|
||||||
*(2.0 - accommodationCoeff_)/accommodationCoeff_;
|
*(2.0 - accommodationCoeff_)/accommodationCoeff_;
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,7 @@ Description
|
|||||||
|
|
||||||
#include "maxwellSlipUFvPatchVectorField.H"
|
#include "maxwellSlipUFvPatchVectorField.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
#include "fvPatchFieldMapper.H"
|
#include "fvPatchFieldMapper.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "surfaceFields.H"
|
#include "surfaceFields.H"
|
||||||
@ -147,7 +147,7 @@ void maxwellSlipUFvPatchVectorField::updateCoeffs()
|
|||||||
const fvPatchField<scalar>& ppsi =
|
const fvPatchField<scalar>& ppsi =
|
||||||
patch().lookupPatchField<volScalarField, scalar>("psi");
|
patch().lookupPatchField<volScalarField, scalar>("psi");
|
||||||
|
|
||||||
Field<scalar> C1 = sqrt(ppsi*mathematicalConstant::pi/2.0)
|
Field<scalar> C1 = sqrt(ppsi*constant::math::piByTwo)
|
||||||
*(2.0 - accommodationCoeff_)/accommodationCoeff_;
|
*(2.0 - accommodationCoeff_)/accommodationCoeff_;
|
||||||
|
|
||||||
Field<scalar> pnu = pmu/prho;
|
Field<scalar> pnu = pmu/prho;
|
||||||
|
|||||||
@ -25,7 +25,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "SchnerrSauer.H"
|
#include "SchnerrSauer.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
@ -77,7 +77,7 @@ Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::rRb
|
|||||||
{
|
{
|
||||||
return pow
|
return pow
|
||||||
(
|
(
|
||||||
((4*mathematicalConstant::pi*n_)/3)
|
((4*constant::math::pi*n_)/3)
|
||||||
*limitedAlpha1/(1.0 + alphaNuc() - limitedAlpha1),
|
*limitedAlpha1/(1.0 + alphaNuc() - limitedAlpha1),
|
||||||
1.0/3.0
|
1.0/3.0
|
||||||
);
|
);
|
||||||
@ -87,7 +87,7 @@ Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::rRb
|
|||||||
Foam::dimensionedScalar
|
Foam::dimensionedScalar
|
||||||
Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::alphaNuc() const
|
Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::alphaNuc() const
|
||||||
{
|
{
|
||||||
dimensionedScalar Vnuc = n_*mathematicalConstant::pi*pow3(dNuc_)/6;
|
dimensionedScalar Vnuc = n_*constant::math::pi*pow3(dNuc_)/6;
|
||||||
return Vnuc/(1 + Vnuc);
|
return Vnuc/(1 + Vnuc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -29,11 +29,12 @@ License
|
|||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "subCycle.H"
|
#include "subCycle.H"
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * //
|
||||||
|
|
||||||
const scalar Foam::multiphaseMixture::convertToRad =
|
const scalar Foam::multiphaseMixture::convertToRad =
|
||||||
Foam::mathematicalConstant::pi/180.0;
|
Foam::constant::math::pi/180.0;
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|||||||
@ -25,7 +25,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "GidaspowConductivity.H"
|
#include "GidaspowConductivity.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
@ -69,7 +69,7 @@ Foam::tmp<Foam::volScalarField> Foam::GidaspowConductivity::kappa
|
|||||||
const dimensionedScalar& e
|
const dimensionedScalar& e
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const scalar sqrtPi = sqrt(mathematicalConstant::pi);
|
const scalar sqrtPi = sqrt(constant::math::pi);
|
||||||
|
|
||||||
return rhoa*da*sqrt(Theta)*
|
return rhoa*da*sqrt(Theta)*
|
||||||
(
|
(
|
||||||
|
|||||||
@ -25,7 +25,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "HrenyaSinclairConductivity.H"
|
#include "HrenyaSinclairConductivity.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
@ -74,7 +74,7 @@ Foam::tmp<Foam::volScalarField> Foam::HrenyaSinclairConductivity::kappa
|
|||||||
const dimensionedScalar& e
|
const dimensionedScalar& e
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const scalar sqrtPi = sqrt(mathematicalConstant::pi);
|
const scalar sqrtPi = sqrt(constant::math::pi);
|
||||||
|
|
||||||
volScalarField lamda =
|
volScalarField lamda =
|
||||||
scalar(1) + da/(6.0*sqrt(2.0)*(alpha + scalar(1.0e-5)))/L_;
|
scalar(1) + da/(6.0*sqrt(2.0)*(alpha + scalar(1.0e-5)))/L_;
|
||||||
|
|||||||
@ -25,7 +25,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "SyamlalConductivity.H"
|
#include "SyamlalConductivity.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
@ -69,7 +69,7 @@ Foam::tmp<Foam::volScalarField> Foam::SyamlalConductivity::kappa
|
|||||||
const dimensionedScalar& e
|
const dimensionedScalar& e
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const scalar sqrtPi = sqrt(mathematicalConstant::pi);
|
const scalar sqrtPi = sqrt(constant::math::pi);
|
||||||
|
|
||||||
return rhoa*da*sqrt(Theta)*
|
return rhoa*da*sqrt(Theta)*
|
||||||
(
|
(
|
||||||
|
|||||||
@ -26,7 +26,7 @@ License
|
|||||||
|
|
||||||
#include "kineticTheoryModel.H"
|
#include "kineticTheoryModel.H"
|
||||||
#include "surfaceInterpolate.H"
|
#include "surfaceInterpolate.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
@ -204,7 +204,7 @@ void Foam::kineticTheoryModel::solve()
|
|||||||
|
|
||||||
volScalarField alpha = alpha_;
|
volScalarField alpha = alpha_;
|
||||||
alpha.max(1.0e-6);
|
alpha.max(1.0e-6);
|
||||||
const scalar sqrtPi = sqrt(mathematicalConstant::pi);
|
const scalar sqrtPi = sqrt(constant::math::pi);
|
||||||
|
|
||||||
surfaceScalarField phi = 1.5*rhoa_*phia_*fvc::interpolate(alpha_);
|
surfaceScalarField phi = 1.5*rhoa_*phia_*fvc::interpolate(alpha_);
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "GidaspowViscosity.H"
|
#include "GidaspowViscosity.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
@ -70,7 +70,7 @@ Foam::kineticTheoryModels::GidaspowViscosity::mua
|
|||||||
const dimensionedScalar& e
|
const dimensionedScalar& e
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const scalar sqrtPi = sqrt(mathematicalConstant::pi);
|
const scalar sqrtPi = sqrt(constant::math::pi);
|
||||||
|
|
||||||
return rhoa*da*sqrt(Theta)*
|
return rhoa*da*sqrt(Theta)*
|
||||||
(
|
(
|
||||||
|
|||||||
@ -25,7 +25,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "HrenyaSinclairViscosity.H"
|
#include "HrenyaSinclairViscosity.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
@ -77,7 +77,7 @@ Foam::kineticTheoryModels::HrenyaSinclairViscosity::mua
|
|||||||
const dimensionedScalar& e
|
const dimensionedScalar& e
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const scalar sqrtPi = sqrt(mathematicalConstant::pi);
|
const scalar sqrtPi = sqrt(constant::math::pi);
|
||||||
|
|
||||||
volScalarField lamda =
|
volScalarField lamda =
|
||||||
scalar(1) + da/(6.0*sqrt(2.0)*(alpha + scalar(1.0e-5)))/L_;
|
scalar(1) + da/(6.0*sqrt(2.0)*(alpha + scalar(1.0e-5)))/L_;
|
||||||
|
|||||||
@ -25,7 +25,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "SyamlalViscosity.H"
|
#include "SyamlalViscosity.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
@ -69,7 +69,7 @@ Foam::tmp<Foam::volScalarField> Foam::kineticTheoryModels::SyamlalViscosity::mua
|
|||||||
const dimensionedScalar& e
|
const dimensionedScalar& e
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const scalar sqrtPi = sqrt(mathematicalConstant::pi);
|
const scalar sqrtPi = sqrt(constant::math::pi);
|
||||||
|
|
||||||
return rhoa*da*sqrt(Theta)*
|
return rhoa*da*sqrt(Theta)*
|
||||||
(
|
(
|
||||||
|
|||||||
@ -32,7 +32,7 @@ Description
|
|||||||
|
|
||||||
#include "graph.H"
|
#include "graph.H"
|
||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ int main()
|
|||||||
|
|
||||||
scalarField b = 0.5*(1.0 + erf(x));
|
scalarField b = 0.5*(1.0 + erf(x));
|
||||||
scalarField c = 1.0 - b;
|
scalarField c = 1.0 - b;
|
||||||
scalarField gradb = (1/::sqrt(mathematicalConstant::pi))*exp(-sqr(x));
|
scalarField gradb = (1/::sqrt(constant::math::pi))*exp(-sqr(x));
|
||||||
scalarField lapb = -2*x*gradb;
|
scalarField lapb = -2*x*gradb;
|
||||||
|
|
||||||
r = lapb*b*c/(gradb*gradb);
|
r = lapb*b*c/(gradb*gradb);
|
||||||
|
|||||||
@ -47,7 +47,7 @@ Description
|
|||||||
#include "polyTopoChanger.H"
|
#include "polyTopoChanger.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "mapPolyMesh.H"
|
#include "mapPolyMesh.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
#include "PackedBoolList.H"
|
#include "PackedBoolList.H"
|
||||||
#include "SortableList.H"
|
#include "SortableList.H"
|
||||||
|
|
||||||
@ -467,7 +467,7 @@ int main(int argc, char *argv[])
|
|||||||
scalar angle(readScalar(IStringStream(args.additionalArgs()[1])()));
|
scalar angle(readScalar(IStringStream(args.additionalArgs()[1])()));
|
||||||
bool overwrite = args.optionFound("overwrite");
|
bool overwrite = args.optionFound("overwrite");
|
||||||
|
|
||||||
scalar maxCos = Foam::cos(angle*180/mathematicalConstant::pi);
|
scalar maxCos = Foam::cos(angle*180/constant::math::pi);
|
||||||
|
|
||||||
Info<< "Merging:" << nl
|
Info<< "Merging:" << nl
|
||||||
<< " edges with length less than " << minLen << " meters" << nl
|
<< " edges with length less than " << minLen << " meters" << nl
|
||||||
|
|||||||
@ -53,7 +53,7 @@ Description
|
|||||||
#include "removePoints.H"
|
#include "removePoints.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "mapPolyMesh.H"
|
#include "mapPolyMesh.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -445,12 +445,12 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
|
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
|
||||||
|
|
||||||
scalar minCos = Foam::cos(featureAngle*mathematicalConstant::pi/180.0);
|
scalar minCos = Foam::cos(featureAngle*constant::math::pi/180.0);
|
||||||
|
|
||||||
scalar concaveAngle = defaultConcaveAngle;
|
scalar concaveAngle = defaultConcaveAngle;
|
||||||
args.optionReadIfPresent("concaveAngle", concaveAngle);
|
args.optionReadIfPresent("concaveAngle", concaveAngle);
|
||||||
|
|
||||||
scalar concaveSin = Foam::sin(concaveAngle*mathematicalConstant::pi/180.0);
|
scalar concaveSin = Foam::sin(concaveAngle*constant::math::pi/180.0);
|
||||||
|
|
||||||
bool snapMeshDict = args.optionFound("snapMesh");
|
bool snapMeshDict = args.optionFound("snapMesh");
|
||||||
bool overwrite = args.optionFound("overwrite");
|
bool overwrite = args.optionFound("overwrite");
|
||||||
|
|||||||
@ -49,7 +49,7 @@ Description
|
|||||||
#include "cellSet.H"
|
#include "cellSet.H"
|
||||||
#include "cellModeller.H"
|
#include "cellModeller.H"
|
||||||
#include "meshCutter.H"
|
#include "meshCutter.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
#include "geomCellLooper.H"
|
#include "geomCellLooper.H"
|
||||||
#include "plane.H"
|
#include "plane.H"
|
||||||
#include "edgeVertex.H"
|
#include "edgeVertex.H"
|
||||||
@ -539,7 +539,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
|
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
|
||||||
|
|
||||||
scalar radAngle = featureAngle * mathematicalConstant::pi/180.0;
|
scalar radAngle = featureAngle*constant::math::pi/180.0;
|
||||||
scalar minCos = Foam::cos(radAngle);
|
scalar minCos = Foam::cos(radAngle);
|
||||||
scalar minSin = Foam::sin(radAngle);
|
scalar minSin = Foam::sin(radAngle);
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,7 @@ Description
|
|||||||
#include "symmetryPolyPatch.H"
|
#include "symmetryPolyPatch.H"
|
||||||
#include "wedgePolyPatch.H"
|
#include "wedgePolyPatch.H"
|
||||||
#include "cyclicPolyPatch.H"
|
#include "cyclicPolyPatch.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
|
|||||||
@ -434,7 +434,7 @@ if (pFaces[WEDGE].size() && pFaces[WEDGE][0].size())
|
|||||||
{
|
{
|
||||||
// Distribute the points to be +/- 2.5deg from the x-z plane
|
// Distribute the points to be +/- 2.5deg from the x-z plane
|
||||||
|
|
||||||
scalar tanTheta = Foam::tan(2.5*mathematicalConstant::pi/180.0);
|
scalar tanTheta = Foam::tan(2.5*constant::math::pi/180.0);
|
||||||
|
|
||||||
SLList<face>::iterator iterf = pFaces[WEDGE][0].begin();
|
SLList<face>::iterator iterf = pFaces[WEDGE][0].begin();
|
||||||
SLList<face>::iterator iterb = pFaces[WEDGE][1].begin();
|
SLList<face>::iterator iterb = pFaces[WEDGE][1].begin();
|
||||||
|
|||||||
@ -59,7 +59,7 @@ Usage
|
|||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "timeSelector.H"
|
#include "timeSelector.H"
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
#include "polyTopoChange.H"
|
#include "polyTopoChange.H"
|
||||||
#include "mapPolyMesh.H"
|
#include "mapPolyMesh.H"
|
||||||
#include "PackedBoolList.H"
|
#include "PackedBoolList.H"
|
||||||
@ -91,7 +91,7 @@ void simpleMarkFeatures
|
|||||||
labelList& multiCellFeaturePoints
|
labelList& multiCellFeaturePoints
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
scalar minCos = Foam::cos(featureAngle * mathematicalConstant::pi/180.0);
|
scalar minCos = Foam::cos(featureAngle*constant::math::pi/180.0);
|
||||||
|
|
||||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||||
|
|
||||||
@ -387,7 +387,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
|
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
|
||||||
|
|
||||||
scalar minCos = Foam::cos(featureAngle * mathematicalConstant::pi/180.0);
|
scalar minCos = Foam::cos(featureAngle*constant::math::pi/180.0);
|
||||||
|
|
||||||
Info<< "Feature:" << featureAngle << endl
|
Info<< "Feature:" << featureAngle << endl
|
||||||
<< "minCos :" << minCos << endl
|
<< "minCos :" << minCos << endl
|
||||||
|
|||||||
@ -33,7 +33,7 @@ Description
|
|||||||
#include "IOmanip.H"
|
#include "IOmanip.H"
|
||||||
#include "boundBox.H"
|
#include "boundBox.H"
|
||||||
#include "Map.H"
|
#include "Map.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ void starMesh::createCoupleMatches()
|
|||||||
<< coupleI << ". STAR couple ID: "
|
<< coupleI << ". STAR couple ID: "
|
||||||
<< couples_[coupleI].coupleID() << endl
|
<< couples_[coupleI].coupleID() << endl
|
||||||
<< "The angle between face normals is "
|
<< "The angle between face normals is "
|
||||||
<< Foam::acos(faceAreaAngle)/mathematicalConstant::pi*180
|
<< Foam::acos(faceAreaAngle)/constant::math::pi*180
|
||||||
<< " deg." << endl
|
<< " deg." << endl
|
||||||
<< "master cell: " << fp.masterCell()
|
<< "master cell: " << fp.masterCell()
|
||||||
<< " STAR number: " << starCellID_[fp.masterCell()]
|
<< " STAR number: " << starCellID_[fp.masterCell()]
|
||||||
|
|||||||
@ -29,7 +29,7 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "arcEdge.H"
|
#include "arcEdge.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
@ -78,7 +78,7 @@ Foam::cylindricalCS Foam::arcEdge::calcAngle()
|
|||||||
|
|
||||||
// find angles
|
// find angles
|
||||||
scalar tmp = (r3&r1)/(mag(r3)*mag(r1));
|
scalar tmp = (r3&r1)/(mag(r3)*mag(r1));
|
||||||
angle_ = acos(tmp)*180.0/mathematicalConstant::pi;
|
angle_ = acos(tmp)*180.0/constant::math::pi;
|
||||||
|
|
||||||
// check if the vectors define an exterior or an interior arcEdge
|
// check if the vectors define an exterior or an interior arcEdge
|
||||||
if (((r1 ^ r2)&(r1 ^ r3)) < 0.0) angle_ = 360 - angle_;
|
if (((r1 ^ r2)&(r1 ^ r3)) < 0.0) angle_ = 360 - angle_;
|
||||||
@ -162,7 +162,7 @@ Foam::vector Foam::arcEdge::position(const scalar lambda) const
|
|||||||
//- Return the length of the curve
|
//- Return the length of the curve
|
||||||
Foam::scalar Foam::arcEdge::length() const
|
Foam::scalar Foam::arcEdge::length() const
|
||||||
{
|
{
|
||||||
return angle_*radius_*mathematicalConstant::pi/180.0;
|
return angle_*radius_*constant::math::pi/180.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -39,7 +39,6 @@ Description
|
|||||||
#include "polyTopoChange.H"
|
#include "polyTopoChange.H"
|
||||||
#include "polyTopoChanger.H"
|
#include "polyTopoChanger.H"
|
||||||
#include "edgeCollapser.H"
|
#include "edgeCollapser.H"
|
||||||
#include "mathematicalConstants.H"
|
|
||||||
#include "globalMeshData.H"
|
#include "globalMeshData.H"
|
||||||
#include "perfectInterface.H"
|
#include "perfectInterface.H"
|
||||||
#include "addPatchCellLayer.H"
|
#include "addPatchCellLayer.H"
|
||||||
|
|||||||
@ -26,7 +26,7 @@ License
|
|||||||
|
|
||||||
#include "wedge.H"
|
#include "wedge.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ wedge::wedge(const dictionary& dict)
|
|||||||
angle_
|
angle_
|
||||||
(
|
(
|
||||||
readScalar(coeffDict_.lookup("angle"))
|
readScalar(coeffDict_.lookup("angle"))
|
||||||
*mathematicalConstant::pi/180.0
|
*constant::math::pi/180.0
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,7 @@ Description
|
|||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "boundaryMesh.H"
|
#include "boundaryMesh.H"
|
||||||
#include "repatchPolyTopoChanger.H"
|
#include "repatchPolyTopoChanger.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
#include "ListOps.H"
|
#include "ListOps.H"
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ int main(int argc, char *argv[])
|
|||||||
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
|
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
|
||||||
bool overwrite = args.optionFound("overwrite");
|
bool overwrite = args.optionFound("overwrite");
|
||||||
|
|
||||||
scalar minCos = Foam::cos(featureAngle * mathematicalConstant::pi/180.0);
|
scalar minCos = Foam::cos(featureAngle*constant::math::pi/180.0);
|
||||||
|
|
||||||
Info<< "Feature:" << featureAngle << endl
|
Info<< "Feature:" << featureAngle << endl
|
||||||
<< "minCos :" << minCos << endl
|
<< "minCos :" << minCos << endl
|
||||||
|
|||||||
@ -67,9 +67,10 @@ Usage
|
|||||||
#include "transformField.H"
|
#include "transformField.H"
|
||||||
#include "transformGeometricField.H"
|
#include "transformGeometricField.H"
|
||||||
#include "IStringStream.H"
|
#include "IStringStream.H"
|
||||||
|
#include "mathConstants.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
using namespace Foam::mathematicalConstant;
|
using namespace Foam::constant::math;
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
scalar Vphi = (mathematicalConstant::pi*swirlRPMRatio*rpm/30).value();
|
scalar Vphi = (constant::math::pi*swirlRPMRatio*rpm/30).value();
|
||||||
scalar b1 = j1(swirlProfile).value();
|
scalar b1 = j1(swirlProfile).value();
|
||||||
scalar b2 = 2.0*b1/swirlProfile.value() - j0(swirlProfile).value();
|
scalar b2 = 2.0*b1/swirlProfile.value() - j0(swirlProfile).value();
|
||||||
|
|
||||||
|
|||||||
@ -43,9 +43,10 @@ Description
|
|||||||
#include "transformField.H"
|
#include "transformField.H"
|
||||||
#include "Pair.H"
|
#include "Pair.H"
|
||||||
#include "quaternion.H"
|
#include "quaternion.H"
|
||||||
|
#include "mathConstants.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
using namespace Foam::mathematicalConstant;
|
using namespace Foam::constant::math;
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -49,7 +49,7 @@ namespace physicoChemical
|
|||||||
//- Group name for physico-chemical constants
|
//- Group name for physico-chemical constants
|
||||||
extern const char* group;
|
extern const char* group;
|
||||||
|
|
||||||
//- Universal gas constant: default SI units: [J/kg/K]
|
//- Universal gas constant: default SI units: [J/mol/K]
|
||||||
extern const dimensionedScalar R;
|
extern const dimensionedScalar R;
|
||||||
|
|
||||||
//- Faraday constant: default SI units: [C/mol]
|
//- Faraday constant: default SI units: [C/mol]
|
||||||
|
|||||||
@ -27,7 +27,7 @@ License
|
|||||||
#include "face.H"
|
#include "face.H"
|
||||||
#include "triFace.H"
|
#include "triFace.H"
|
||||||
#include "triPointRef.H"
|
#include "triPointRef.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -99,13 +99,13 @@ Foam::label Foam::face::mostConcaveAngle
|
|||||||
if ((edgeNormal & n) > 0)
|
if ((edgeNormal & n) > 0)
|
||||||
{
|
{
|
||||||
// Concave angle.
|
// Concave angle.
|
||||||
angle = mathematicalConstant::pi + edgeAngle;
|
angle = constant::math::pi + edgeAngle;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Convex angle. Note '-' to take into account that rightEdge
|
// Convex angle. Note '-' to take into account that rightEdge
|
||||||
// and leftEdge are head-to-tail connected.
|
// and leftEdge are head-to-tail connected.
|
||||||
angle = mathematicalConstant::pi - edgeAngle;
|
angle = constant::math::pi - edgeAngle;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (angle > maxAngle)
|
if (angle > maxAngle)
|
||||||
@ -214,7 +214,7 @@ Foam::label Foam::face::split
|
|||||||
label index = fcIndex(fcIndex(startIndex));
|
label index = fcIndex(fcIndex(startIndex));
|
||||||
|
|
||||||
label minIndex = index;
|
label minIndex = index;
|
||||||
scalar minDiff = Foam::mathematicalConstant::pi;
|
scalar minDiff = constant::math::pi;
|
||||||
|
|
||||||
for(label i = 0; i < size() - 3; i++)
|
for(label i = 0; i < size() - 3; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -27,7 +27,7 @@ License
|
|||||||
#include "primitiveMesh.H"
|
#include "primitiveMesh.H"
|
||||||
#include "pyramidPointFaceRef.H"
|
#include "pyramidPointFaceRef.H"
|
||||||
#include "ListOps.H"
|
#include "ListOps.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
#include "SortableList.H"
|
#include "SortableList.H"
|
||||||
|
|
||||||
|
|
||||||
@ -410,7 +410,7 @@ bool Foam::primitiveMesh::checkFaceOrthogonality
|
|||||||
|
|
||||||
// Severe nonorthogonality threshold
|
// Severe nonorthogonality threshold
|
||||||
const scalar severeNonorthogonalityThreshold =
|
const scalar severeNonorthogonalityThreshold =
|
||||||
::cos(nonOrthThreshold_/180.0*mathematicalConstant::pi);
|
::cos(nonOrthThreshold_/180.0*constant::math::pi);
|
||||||
|
|
||||||
scalar minDDotS = GREAT;
|
scalar minDDotS = GREAT;
|
||||||
|
|
||||||
@ -472,9 +472,9 @@ bool Foam::primitiveMesh::checkFaceOrthogonality
|
|||||||
if (debug || report)
|
if (debug || report)
|
||||||
{
|
{
|
||||||
Info<< " Mesh non-orthogonality Max: "
|
Info<< " Mesh non-orthogonality Max: "
|
||||||
<< ::acos(minDDotS)/mathematicalConstant::pi*180.0
|
<< ::acos(minDDotS)/constant::math::pi*180.0
|
||||||
<< " average: " <<
|
<< " average: " <<
|
||||||
::acos(sumDDotS/neiSize)/mathematicalConstant::pi*180.0
|
::acos(sumDDotS/neiSize)/constant::math::pi*180.0
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -839,7 +839,7 @@ bool Foam::primitiveMesh::checkFaceAngles
|
|||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
const scalar maxSin = Foam::sin(maxDeg/180.0*mathematicalConstant::pi);
|
const scalar maxSin = Foam::sin(maxDeg/180.0*constant::math::pi);
|
||||||
|
|
||||||
const pointField& p = points();
|
const pointField& p = points();
|
||||||
const faceList& fcs = faces();
|
const faceList& fcs = faces();
|
||||||
@ -916,7 +916,7 @@ bool Foam::primitiveMesh::checkFaceAngles
|
|||||||
{
|
{
|
||||||
scalar maxConcaveDegr =
|
scalar maxConcaveDegr =
|
||||||
Foam::asin(Foam::min(1.0, maxEdgeSin))
|
Foam::asin(Foam::min(1.0, maxEdgeSin))
|
||||||
*180.0/mathematicalConstant::pi;
|
*180.0/constant::math::pi;
|
||||||
|
|
||||||
if (debug || report)
|
if (debug || report)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -31,7 +31,7 @@ Description
|
|||||||
#include "primitiveMesh.H"
|
#include "primitiveMesh.H"
|
||||||
#include "pyramidPointFaceRef.H"
|
#include "pyramidPointFaceRef.H"
|
||||||
#include "cell.H"
|
#include "cell.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -200,7 +200,7 @@ bool Foam::primitiveMesh::checkMeshMotion
|
|||||||
) << "Severe non-orthogonality in mesh motion for face "
|
) << "Severe non-orthogonality in mesh motion for face "
|
||||||
<< faceI
|
<< faceI
|
||||||
<< " between cells " << own[faceI] << " and " << nei[faceI]
|
<< " between cells " << own[faceI] << " and " << nei[faceI]
|
||||||
<< ": Angle = " << ::acos(dDotS)/mathematicalConstant::pi*180.0
|
<< ": Angle = " << ::acos(dDotS)/constant::math::pi*180.0
|
||||||
<< " deg." << endl;
|
<< " deg." << endl;
|
||||||
|
|
||||||
nDotProductErrors++;
|
nDotProductErrors++;
|
||||||
|
|||||||
@ -26,7 +26,7 @@ License
|
|||||||
|
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
#include "pointHit.H"
|
#include "pointHit.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -307,9 +307,9 @@ inline scalar triangle<Point, PointRef>::quality() const
|
|||||||
return
|
return
|
||||||
mag()
|
mag()
|
||||||
/ (
|
/ (
|
||||||
mathematicalConstant::pi
|
constant::math::pi
|
||||||
* Foam::sqr(circumRadius())
|
*Foam::sqr(circumRadius())
|
||||||
* 0.413497
|
*0.413497
|
||||||
+ VSMALL
|
+ VSMALL
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,7 +25,6 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "labelSymmTensor.H"
|
#include "labelSymmTensor.H"
|
||||||
#include "mathematicalConstants.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "tensor.H"
|
#include "tensor.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -150,10 +150,8 @@ vector eigenValues(const tensor& t)
|
|||||||
scalar aBy3 = a/3;
|
scalar aBy3 = a/3;
|
||||||
|
|
||||||
i = m2SqrtQ*cos(theta/3) - aBy3;
|
i = m2SqrtQ*cos(theta/3) - aBy3;
|
||||||
ii = m2SqrtQ*cos((theta + mathematicalConstant::twoPi)/3)
|
ii = m2SqrtQ*cos((theta + constant::math::twoPi)/3) - aBy3;
|
||||||
- aBy3;
|
iii = m2SqrtQ*cos((theta - constant::math::twoPi)/3) - aBy3;
|
||||||
iii = m2SqrtQ*cos((theta - mathematicalConstant::twoPi)/3)
|
|
||||||
- aBy3;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -345,10 +343,8 @@ vector eigenValues(const symmTensor& t)
|
|||||||
scalar aBy3 = a/3;
|
scalar aBy3 = a/3;
|
||||||
|
|
||||||
i = m2SqrtQ*cos(theta/3) - aBy3;
|
i = m2SqrtQ*cos(theta/3) - aBy3;
|
||||||
ii = m2SqrtQ*cos((theta + mathematicalConstant::twoPi)/3)
|
ii = m2SqrtQ*cos((theta + constant::math::twoPi)/3) - aBy3;
|
||||||
- aBy3;
|
iii = m2SqrtQ*cos((theta - constant::math::twoPi)/3) - aBy3;
|
||||||
iii = m2SqrtQ*cos((theta - mathematicalConstant::twoPi)/3)
|
|
||||||
- aBy3;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -25,7 +25,6 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "tensor2D.H"
|
#include "tensor2D.H"
|
||||||
#include "mathematicalConstants.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -1,61 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / 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
|
|
||||||
|
|
||||||
Namespace
|
|
||||||
Foam::mathematicalConstant
|
|
||||||
|
|
||||||
Description
|
|
||||||
Mathematical constants such as pi, e.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef mathematicalConstants_H
|
|
||||||
#define mathematicalConstants_H
|
|
||||||
|
|
||||||
#include "scalar.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace mathematicalConstant
|
|
||||||
{
|
|
||||||
const scalar e(M_E);
|
|
||||||
const scalar pi(M_PI);
|
|
||||||
const scalar twoPi(2*pi);
|
|
||||||
const scalar piByTwo(0.5*pi);
|
|
||||||
}
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -34,7 +34,7 @@ Description
|
|||||||
#define transform_H
|
#define transform_H
|
||||||
|
|
||||||
#include "tensor.H"
|
#include "tensor.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -205,11 +205,11 @@ inline scalar pseudoAngle
|
|||||||
|
|
||||||
if (sin < -SMALL)
|
if (sin < -SMALL)
|
||||||
{
|
{
|
||||||
return (3.0 + cos)*mathematicalConstant::piByTwo;
|
return (3.0 + cos)*constant::math::piByTwo;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return (1.0 - cos)*mathematicalConstant::piByTwo;
|
return (1.0 - cos)*constant::math::piByTwo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,7 @@ Description
|
|||||||
#include "removePoints.H"
|
#include "removePoints.H"
|
||||||
#include "pointFields.H"
|
#include "pointFields.H"
|
||||||
#include "motionSmoother.H"
|
#include "motionSmoother.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
#include "pointSet.H"
|
#include "pointSet.H"
|
||||||
#include "faceSet.H"
|
#include "faceSet.H"
|
||||||
#include "cellSet.H"
|
#include "cellSet.H"
|
||||||
@ -2479,17 +2479,11 @@ void Foam::autoLayerDriver::mergePatchFacesUndo
|
|||||||
const dictionary& motionDict
|
const dictionary& motionDict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
scalar minCos = Foam::cos
|
scalar minCos =
|
||||||
(
|
Foam::cos(layerParams.featureAngle()*constant::math::pi/180.0);
|
||||||
layerParams.featureAngle()
|
|
||||||
* mathematicalConstant::pi/180.0
|
|
||||||
);
|
|
||||||
|
|
||||||
scalar concaveCos = Foam::cos
|
scalar concaveCos =
|
||||||
(
|
Foam::cos(layerParams.concaveAngle()*constant::math::pi/180.0);
|
||||||
layerParams.concaveAngle()
|
|
||||||
* mathematicalConstant::pi/180.0
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< nl
|
Info<< nl
|
||||||
<< "Merging all faces of a cell" << nl
|
<< "Merging all faces of a cell" << nl
|
||||||
@ -2588,7 +2582,7 @@ void Foam::autoLayerDriver::addLayers
|
|||||||
(
|
(
|
||||||
pp,
|
pp,
|
||||||
meshEdges,
|
meshEdges,
|
||||||
layerParams.featureAngle()*mathematicalConstant::pi/180.0,
|
layerParams.featureAngle()*constant::math::pi/180.0,
|
||||||
|
|
||||||
patchDisp,
|
patchDisp,
|
||||||
patchNLayers,
|
patchNLayers,
|
||||||
|
|||||||
@ -35,6 +35,7 @@ License
|
|||||||
#include "refinementSurfaces.H"
|
#include "refinementSurfaces.H"
|
||||||
#include "shellSurfaces.H"
|
#include "shellSurfaces.H"
|
||||||
#include "mapDistributePolyMesh.H"
|
#include "mapDistributePolyMesh.H"
|
||||||
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -678,8 +679,8 @@ void Foam::autoRefineDriver::mergePatchFaces
|
|||||||
|
|
||||||
meshRefiner_.mergePatchFaces
|
meshRefiner_.mergePatchFaces
|
||||||
(
|
(
|
||||||
Foam::cos(45*mathematicalConstant::pi/180.0),
|
Foam::cos(45*constant::math::pi/180.0),
|
||||||
Foam::cos(45*mathematicalConstant::pi/180.0),
|
Foam::cos(45*constant::math::pi/180.0),
|
||||||
meshRefiner_.meshedPatches()
|
meshRefiner_.meshedPatches()
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -688,7 +689,7 @@ void Foam::autoRefineDriver::mergePatchFaces
|
|||||||
meshRefiner_.checkData();
|
meshRefiner_.checkData();
|
||||||
}
|
}
|
||||||
|
|
||||||
meshRefiner_.mergeEdges(Foam::cos(45*mathematicalConstant::pi/180.0));
|
meshRefiner_.mergeEdges(Foam::cos(45*constant::math::pi/180.0));
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -26,7 +26,7 @@ License
|
|||||||
|
|
||||||
#include "layerParameters.H"
|
#include "layerParameters.H"
|
||||||
#include "polyBoundaryMesh.H"
|
#include "polyBoundaryMesh.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
#include "refinementSurfaces.H"
|
#include "refinementSurfaces.H"
|
||||||
#include "searchableSurfaces.H"
|
#include "searchableSurfaces.H"
|
||||||
#include "regExp.H"
|
#include "regExp.H"
|
||||||
@ -192,12 +192,7 @@ Foam::layerParameters::layerParameters
|
|||||||
),
|
),
|
||||||
layerTerminationCos_
|
layerTerminationCos_
|
||||||
(
|
(
|
||||||
Foam::cos
|
Foam::cos(0.5*featureAngle_*constant::math::pi/180.0)
|
||||||
(
|
|
||||||
0.5
|
|
||||||
* featureAngle_
|
|
||||||
* mathematicalConstant::pi/180.
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
maxThicknessToMedialRatio_
|
maxThicknessToMedialRatio_
|
||||||
(
|
(
|
||||||
@ -206,7 +201,7 @@ Foam::layerParameters::layerParameters
|
|||||||
minMedianAxisAngleCos_
|
minMedianAxisAngleCos_
|
||||||
(
|
(
|
||||||
Foam::cos(readScalar(dict.lookup("minMedianAxisAngle")))
|
Foam::cos(readScalar(dict.lookup("minMedianAxisAngle")))
|
||||||
* mathematicalConstant::pi/180.
|
*constant::math::pi/180.0
|
||||||
),
|
),
|
||||||
nBufferCellsNoExtrude_
|
nBufferCellsNoExtrude_
|
||||||
(
|
(
|
||||||
@ -274,12 +269,7 @@ Foam::layerParameters::layerParameters
|
|||||||
),
|
),
|
||||||
layerTerminationCos_
|
layerTerminationCos_
|
||||||
(
|
(
|
||||||
Foam::cos
|
Foam::cos(0.5*featureAngle_*constant::math::pi/180.0)
|
||||||
(
|
|
||||||
0.5
|
|
||||||
* featureAngle_
|
|
||||||
* mathematicalConstant::pi/180.
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
maxThicknessToMedialRatio_
|
maxThicknessToMedialRatio_
|
||||||
(
|
(
|
||||||
@ -288,7 +278,7 @@ Foam::layerParameters::layerParameters
|
|||||||
minMedianAxisAngleCos_
|
minMedianAxisAngleCos_
|
||||||
(
|
(
|
||||||
Foam::cos(readScalar(dict.lookup("minMedianAxisAngle")))
|
Foam::cos(readScalar(dict.lookup("minMedianAxisAngle")))
|
||||||
* mathematicalConstant::pi/180.
|
*constant::math::pi/180.0
|
||||||
),
|
),
|
||||||
nBufferCellsNoExtrude_
|
nBufferCellsNoExtrude_
|
||||||
(
|
(
|
||||||
|
|||||||
@ -25,7 +25,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "refinementParameters.H"
|
#include "refinementParameters.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "globalIndex.H"
|
#include "globalIndex.H"
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ Foam::refinementParameters::refinementParameters(const dictionary& dict)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
curvature_ = Foam::cos(featAngle*mathematicalConstant::pi/180.0);
|
curvature_ = Foam::cos(featAngle*constant::math::pi/180.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -37,6 +37,7 @@ License
|
|||||||
#include "searchableSurfaces.H"
|
#include "searchableSurfaces.H"
|
||||||
#include "polyMeshGeometry.H"
|
#include "polyMeshGeometry.H"
|
||||||
#include "IOmanip.H"
|
#include "IOmanip.H"
|
||||||
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -246,10 +247,7 @@ Foam::Map<Foam::label> Foam::meshRefinement::findEdgeConnectedProblemCells
|
|||||||
nearestRegion[i]
|
nearestRegion[i]
|
||||||
);
|
);
|
||||||
|
|
||||||
scalar angle =
|
scalar angle = perpendicularAngle[region]/180.0*constant::math::pi;
|
||||||
perpendicularAngle[region]
|
|
||||||
/ 180.0
|
|
||||||
* mathematicalConstant::pi;
|
|
||||||
|
|
||||||
if (angle >= 0)
|
if (angle >= 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -27,7 +27,7 @@ License
|
|||||||
#include "dynamicInkJetFvMesh.H"
|
#include "dynamicInkJetFvMesh.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ Foam::dynamicInkJetFvMesh::~dynamicInkJetFvMesh()
|
|||||||
bool Foam::dynamicInkJetFvMesh::update()
|
bool Foam::dynamicInkJetFvMesh::update()
|
||||||
{
|
{
|
||||||
scalar scalingFunction =
|
scalar scalingFunction =
|
||||||
0.5*(::cos(2*mathematicalConstant::pi*frequency_*time().value()) - 1.0);
|
0.5*(::cos(constant::math::twoPi*frequency_*time().value()) - 1.0);
|
||||||
|
|
||||||
Info<< "Mesh scaling. Time = " << time().value() << " scaling: "
|
Info<< "Mesh scaling. Time = " << time().value() << " scaling: "
|
||||||
<< scalingFunction << endl;
|
<< scalingFunction << endl;
|
||||||
|
|||||||
@ -26,9 +26,9 @@ License
|
|||||||
|
|
||||||
#include "SDA.H"
|
#include "SDA.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
using namespace Foam::mathematicalConstant;
|
using namespace Foam::constant::math;
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -70,18 +70,18 @@ Foam::septernion Foam::solidBodyMotionFunctions::SDA::transformation() const
|
|||||||
scalar time = time_.value();
|
scalar time = time_.value();
|
||||||
|
|
||||||
scalar Tpi = Tp_ + dTp_*(time/dTi_); // Current roll period [sec]
|
scalar Tpi = Tp_ + dTp_*(time/dTi_); // Current roll period [sec]
|
||||||
scalar wr = 2*pi/Tpi; // Current Freq [/sec]
|
scalar wr = twoPi/Tpi; // Current Freq [/sec]
|
||||||
|
|
||||||
// Current Phase for roll [rad]
|
// Current Phase for roll [rad]
|
||||||
scalar r = dTp_/dTi_;
|
scalar r = dTp_/dTi_;
|
||||||
scalar u = Tp_ + r*time;
|
scalar u = Tp_ + r*time;
|
||||||
scalar phr = 2*pi*((Tp_/u - 1) + log(mag(u)) - log(Tp_))/r;
|
scalar phr = twoPi*((Tp_/u - 1) + log(mag(u)) - log(Tp_))/r;
|
||||||
|
|
||||||
// Current Phase for Sway [rad]
|
// Current Phase for Sway [rad]
|
||||||
scalar phs = phr + pi;
|
scalar phs = phr + pi;
|
||||||
|
|
||||||
// Current Phase for Heave [rad]
|
// Current Phase for Heave [rad]
|
||||||
scalar phh = phr + pi/2;
|
scalar phh = phr + piByTwo;
|
||||||
|
|
||||||
scalar rollA = max(rollAmax_*exp(-sqr(Tpi - Tpn_)/(2*Q_)), rollAmin_);
|
scalar rollA = max(rollAmax_*exp(-sqr(Tpi - Tpn_)/(2*Q_)), rollAmin_);
|
||||||
|
|
||||||
|
|||||||
@ -29,9 +29,9 @@ License
|
|||||||
#include "Tuple2.H"
|
#include "Tuple2.H"
|
||||||
#include "IFstream.H"
|
#include "IFstream.H"
|
||||||
#include "interpolateXY.H"
|
#include "interpolateXY.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
using namespace Foam::mathematicalConstant;
|
using namespace Foam::constant::math;
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -27,11 +27,8 @@ License
|
|||||||
#include "solidBodyMotionFvMesh.H"
|
#include "solidBodyMotionFvMesh.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "mathematicalConstants.H"
|
|
||||||
#include "transformField.H"
|
#include "transformField.H"
|
||||||
|
|
||||||
using namespace Foam::mathematicalConstant;
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
|
|||||||
@ -28,7 +28,6 @@ License
|
|||||||
#include "cellFeatures.H"
|
#include "cellFeatures.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "cellModeller.H"
|
#include "cellModeller.H"
|
||||||
#include "mathematicalConstants.H"
|
|
||||||
#include "plane.H"
|
#include "plane.H"
|
||||||
#include "ListOps.H"
|
#include "ListOps.H"
|
||||||
#include "meshTools.H"
|
#include "meshTools.H"
|
||||||
@ -36,18 +35,12 @@ License
|
|||||||
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
defineTypeNameAndDebug(hexCellLooper, 0);
|
defineTypeNameAndDebug(hexCellLooper, 0);
|
||||||
|
|
||||||
addToRunTimeSelectionTable(cellLooper, hexCellLooper, word);
|
addToRunTimeSelectionTable(cellLooper, hexCellLooper, word);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@ License
|
|||||||
#include "topoCellLooper.H"
|
#include "topoCellLooper.H"
|
||||||
#include "cellFeatures.H"
|
#include "cellFeatures.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
#include "DynamicList.H"
|
#include "DynamicList.H"
|
||||||
#include "ListOps.H"
|
#include "ListOps.H"
|
||||||
#include "meshTools.H"
|
#include "meshTools.H"
|
||||||
@ -35,9 +35,8 @@ License
|
|||||||
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(topoCellLooper, 0);
|
defineTypeNameAndDebug(topoCellLooper, 0);
|
||||||
@ -46,7 +45,7 @@ namespace Foam
|
|||||||
|
|
||||||
// Angle for polys to be considered splitHexes.
|
// Angle for polys to be considered splitHexes.
|
||||||
const Foam::scalar Foam::topoCellLooper::featureCos =
|
const Foam::scalar Foam::topoCellLooper::featureCos =
|
||||||
Foam::cos(10.0 * mathematicalConstant::pi/180.0);
|
Foam::cos(10.0*constant::math::pi/180.0);
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|||||||
@ -32,16 +32,14 @@ License
|
|||||||
#include "cellCuts.H"
|
#include "cellCuts.H"
|
||||||
#include "splitCell.H"
|
#include "splitCell.H"
|
||||||
#include "mapPolyMesh.H"
|
#include "mapPolyMesh.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
#include "meshTools.H"
|
#include "meshTools.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
defineTypeNameAndDebug(undoableMeshCutter, 0);
|
defineTypeNameAndDebug(undoableMeshCutter, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
@ -194,7 +192,7 @@ Foam::undoableMeshCutter::undoableMeshCutter
|
|||||||
faceRemover_
|
faceRemover_
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
Foam::cos(30./180. * mathematicalConstant::pi)
|
Foam::cos(30.0/180.0*constant::math::pi)
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -27,6 +27,7 @@ License
|
|||||||
#include "polyMeshGeometry.H"
|
#include "polyMeshGeometry.H"
|
||||||
#include "pyramidPointFaceRef.H"
|
#include "pyramidPointFaceRef.H"
|
||||||
#include "syncTools.H"
|
#include "syncTools.H"
|
||||||
|
#include "mathConstants.H"
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
@ -247,7 +248,7 @@ Foam::scalar Foam::polyMeshGeometry::checkNonOrtho
|
|||||||
<< " between cells " << mesh.faceOwner()[faceI]
|
<< " between cells " << mesh.faceOwner()[faceI]
|
||||||
<< " and " << nei
|
<< " and " << nei
|
||||||
<< ": Angle = "
|
<< ": Angle = "
|
||||||
<< ::acos(dDotS)/mathematicalConstant::pi*180.0
|
<< ::acos(dDotS)/constant::math::pi*180.0
|
||||||
<< " deg." << endl;
|
<< " deg." << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -268,7 +269,7 @@ Foam::scalar Foam::polyMeshGeometry::checkNonOrtho
|
|||||||
<< " between cells " << mesh.faceOwner()[faceI]
|
<< " between cells " << mesh.faceOwner()[faceI]
|
||||||
<< " and " << nei
|
<< " and " << nei
|
||||||
<< ": Angle = "
|
<< ": Angle = "
|
||||||
<< ::acos(dDotS)/mathematicalConstant::pi*180.0
|
<< ::acos(dDotS)/constant::math::pi*180.0
|
||||||
<< " deg." << endl;
|
<< " deg." << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -368,7 +369,7 @@ bool Foam::polyMeshGeometry::checkFaceDotProduct
|
|||||||
|
|
||||||
// Severe nonorthogonality threshold
|
// Severe nonorthogonality threshold
|
||||||
const scalar severeNonorthogonalityThreshold =
|
const scalar severeNonorthogonalityThreshold =
|
||||||
::cos(orthWarn/180.0*mathematicalConstant::pi);
|
::cos(orthWarn/180.0*constant::math::pi);
|
||||||
|
|
||||||
|
|
||||||
// Calculate coupled cell centre
|
// Calculate coupled cell centre
|
||||||
@ -503,9 +504,9 @@ bool Foam::polyMeshGeometry::checkFaceDotProduct
|
|||||||
if (nDDotS > 0)
|
if (nDDotS > 0)
|
||||||
{
|
{
|
||||||
Info<< "Mesh non-orthogonality Max: "
|
Info<< "Mesh non-orthogonality Max: "
|
||||||
<< ::acos(minDDotS)/mathematicalConstant::pi*180.0
|
<< ::acos(minDDotS)/constant::math::pi*180.0
|
||||||
<< " average: " <<
|
<< " average: " <<
|
||||||
::acos(sumDDotS/nDDotS)/mathematicalConstant::pi*180.0
|
::acos(sumDDotS/nDDotS)/constant::math::pi*180.0
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1257,7 +1258,7 @@ bool Foam::polyMeshGeometry::checkFaceAngles
|
|||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
const scalar maxSin = Foam::sin(maxDeg/180.0*mathematicalConstant::pi);
|
const scalar maxSin = Foam::sin(maxDeg/180.0*constant::math::pi);
|
||||||
|
|
||||||
const faceList& fcs = mesh.faces();
|
const faceList& fcs = mesh.faces();
|
||||||
|
|
||||||
@ -1338,7 +1339,7 @@ bool Foam::polyMeshGeometry::checkFaceAngles
|
|||||||
{
|
{
|
||||||
scalar maxConcaveDegr =
|
scalar maxConcaveDegr =
|
||||||
Foam::asin(Foam::min(1.0, maxEdgeSin))
|
Foam::asin(Foam::min(1.0, maxEdgeSin))
|
||||||
* 180.0/mathematicalConstant::pi;
|
*180.0/constant::math::pi;
|
||||||
|
|
||||||
Info<< "There are " << nConcave
|
Info<< "There are " << nConcave
|
||||||
<< " faces with concave angles between consecutive"
|
<< " faces with concave angles between consecutive"
|
||||||
|
|||||||
@ -25,7 +25,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "engineTime.H"
|
#include "engineTime.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ bool Foam::engineTime::read()
|
|||||||
|
|
||||||
Foam::scalar Foam::engineTime::degToRad(const scalar deg) const
|
Foam::scalar Foam::engineTime::degToRad(const scalar deg) const
|
||||||
{
|
{
|
||||||
return mathematicalConstant::pi*deg/180.0;
|
return constant::math::pi*deg/180.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -239,6 +239,4 @@ Foam::scalar Foam::engineTime::timeToUserTime(const scalar t) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -27,11 +27,11 @@
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
Ak = sphereFraction*4.0*mathematicalConstant::pi
|
Ak = sphereFraction*4.0*constant::math::pi
|
||||||
*pow
|
*pow
|
||||||
(
|
(
|
||||||
3.0*Vk
|
3.0*Vk
|
||||||
/(sphereFraction*4.0*mathematicalConstant::pi),
|
/(sphereFraction*4.0*constant::math::pi),
|
||||||
2.0/3.0
|
2.0/3.0
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -56,11 +56,11 @@
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
Ak = circleFraction*mathematicalConstant::pi*thickness
|
Ak = circleFraction*constant::math::pi*thickness
|
||||||
*sqrt
|
*sqrt
|
||||||
(
|
(
|
||||||
4.0*Vk
|
4.0*Vk
|
||||||
/(circleFraction*thickness*mathematicalConstant::pi)
|
/(circleFraction*thickness*constant::math::pi)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -22,13 +22,11 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "rpm.H"
|
#include "rpm.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -58,7 +56,7 @@ Foam::SRF::rpm::rpm
|
|||||||
rpm_(readScalar(SRFModelCoeffs_.lookup("rpm")))
|
rpm_(readScalar(SRFModelCoeffs_.lookup("rpm")))
|
||||||
{
|
{
|
||||||
// Initialise the angular velocity
|
// Initialise the angular velocity
|
||||||
omega_.value() = axis_*rpm_*2.0*mathematicalConstant::pi/60.0;
|
omega_.value() = axis_*rpm_*constant::math::twoPi/60.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -78,7 +76,7 @@ bool Foam::SRF::rpm::read()
|
|||||||
SRFModelCoeffs_.lookup("rpm") >> rpm_;
|
SRFModelCoeffs_.lookup("rpm") >> rpm_;
|
||||||
|
|
||||||
// Update angular velocity
|
// Update angular velocity
|
||||||
omega_.value() = axis_*rpm_*(2.0*mathematicalConstant::pi/60.0);
|
omega_.value() = axis_*rpm_*(constant::math::twoPi/60.0);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
#include "fixedValueFvPatchFields.H"
|
#include "fixedValueFvPatchFields.H"
|
||||||
#include "adjustPhi.H"
|
#include "adjustPhi.H"
|
||||||
#include "findRefCell.H"
|
#include "findRefCell.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "constants.H"
|
||||||
|
|
||||||
#include "OSspecific.H"
|
#include "OSspecific.H"
|
||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
|
|||||||
@ -25,7 +25,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "oscillatingFixedValueFvPatchField.H"
|
#include "oscillatingFixedValueFvPatchField.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -39,8 +39,8 @@ scalar oscillatingFixedValueFvPatchField<Type>::currentScale() const
|
|||||||
{
|
{
|
||||||
return
|
return
|
||||||
1.0
|
1.0
|
||||||
+ amplitude_*
|
+ amplitude_
|
||||||
sin(2*mathematicalConstant::pi*frequency_*this->db().time().value());
|
*sin(constant::math::twoPi*frequency_*this->db().time().value());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,7 @@ Description
|
|||||||
#include "surfaceFields.H"
|
#include "surfaceFields.H"
|
||||||
#include "demandDrivenData.H"
|
#include "demandDrivenData.H"
|
||||||
#include "coupledFvPatch.H"
|
#include "coupledFvPatch.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -353,7 +353,7 @@ void surfaceInterpolation::makeCorrectionVectors() const
|
|||||||
(sum(magSf*mag(corrVecs))/sum(magSf)).value(),
|
(sum(magSf*mag(corrVecs))/sum(magSf)).value(),
|
||||||
1.0
|
1.0
|
||||||
)
|
)
|
||||||
)*180.0/mathematicalConstant::pi;
|
)*180.0/constant::math::pi;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
|
|||||||
@ -25,6 +25,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "COxidationDiffusionLimitedRate.H"
|
#include "COxidationDiffusionLimitedRate.H"
|
||||||
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -123,8 +124,7 @@ Foam::scalar Foam::COxidationDiffusionLimitedRate<CloudType>::calculate
|
|||||||
const scalar YO2 = this->owner().mcCarrierThermo().Y(O2GlobalId_)[cellI];
|
const scalar YO2 = this->owner().mcCarrierThermo().Y(O2GlobalId_)[cellI];
|
||||||
|
|
||||||
// Change in C mass [kg]
|
// Change in C mass [kg]
|
||||||
scalar dmC =
|
scalar dmC = 4.0*constant::math::pi*d*D_*YO2*Tc*rhoc/(Sb_*(T + Tc))*dt;
|
||||||
4.0*mathematicalConstant::pi*d*D_*YO2*Tc*rhoc/(Sb_*(T + Tc))*dt;
|
|
||||||
|
|
||||||
// Limit mass transfer by availability of C
|
// Limit mass transfer by availability of C
|
||||||
dmC = min(mass*fComb, dmC);
|
dmC = min(mass*fComb, dmC);
|
||||||
|
|||||||
@ -25,6 +25,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "COxidationKineticDiffusionLimitedRate.H"
|
#include "COxidationKineticDiffusionLimitedRate.H"
|
||||||
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -137,7 +138,7 @@ Foam::scalar Foam::COxidationKineticDiffusionLimitedRate<CloudType>::calculate
|
|||||||
const scalar Rk = C2_*exp(-E_/(specie::RR*Tc));
|
const scalar Rk = C2_*exp(-E_/(specie::RR*Tc));
|
||||||
|
|
||||||
// Particle surface area
|
// Particle surface area
|
||||||
const scalar Ap = mathematicalConstant::pi*sqr(d);
|
const scalar Ap = constant::math::pi*sqr(d);
|
||||||
|
|
||||||
// Change in C mass [kg]
|
// Change in C mass [kg]
|
||||||
scalar dmC = Ap*rhoc*specie::RR*Tc*YO2/WO2_*D0*Rk/(D0 + Rk);
|
scalar dmC = Ap*rhoc*specie::RR*Tc*YO2/WO2_*D0*Rk/(D0 + Rk);
|
||||||
|
|||||||
@ -25,6 +25,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "COxidationMurphyShaddix.H"
|
#include "COxidationMurphyShaddix.H"
|
||||||
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -133,7 +134,7 @@ Foam::scalar Foam::COxidationMurphyShaddix<CloudType>::calculate
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Particle surface area [m^2]
|
// Particle surface area [m^2]
|
||||||
const scalar Ap = mathematicalConstant::pi*sqr(d);
|
const scalar Ap = constant::math::pi*sqr(d);
|
||||||
|
|
||||||
// Calculate diffision constant at continuous phase temperature
|
// Calculate diffision constant at continuous phase temperature
|
||||||
// and density [m^2/s]
|
// and density [m^2/s]
|
||||||
|
|||||||
@ -27,7 +27,7 @@ License
|
|||||||
#include "commonRailInjector.H"
|
#include "commonRailInjector.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "Random.H"
|
#include "Random.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
namespace Foam
|
namespace Foam
|
||||||
@ -244,7 +244,7 @@ Foam::vector Foam::commonRailInjector::position
|
|||||||
{
|
{
|
||||||
// otherwise, disc injection
|
// otherwise, disc injection
|
||||||
scalar iRadius = d_*rndGen.scalar01();
|
scalar iRadius = d_*rndGen.scalar01();
|
||||||
scalar iAngle = 2.0*mathematicalConstant::pi*rndGen.scalar01();
|
scalar iAngle = constant::math::twoPi*rndGen.scalar01();
|
||||||
|
|
||||||
return
|
return
|
||||||
(
|
(
|
||||||
@ -297,7 +297,7 @@ Foam::scalar Foam::commonRailInjector::mass
|
|||||||
// correct mass if calculation is 2D
|
// correct mass if calculation is 2D
|
||||||
if (twoD)
|
if (twoD)
|
||||||
{
|
{
|
||||||
mInj *= 0.5*angleOfWedge/mathematicalConstant::pi;
|
mInj *= 0.5*angleOfWedge/constant::math::pi;
|
||||||
}
|
}
|
||||||
|
|
||||||
return mInj;
|
return mInj;
|
||||||
@ -404,7 +404,7 @@ void Foam::commonRailInjector::correctProfiles
|
|||||||
const scalar referencePressure
|
const scalar referencePressure
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
scalar A = 0.25*mathematicalConstant::pi*pow(d_, 2.0);
|
scalar A = 0.25*constant::math::pi*sqr(d_);
|
||||||
scalar pDummy = 1.0e+5;
|
scalar pDummy = 1.0e+5;
|
||||||
scalar rho = fuel.rho(pDummy, T_, X_);
|
scalar rho = fuel.rho(pDummy, T_, X_);
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@ License
|
|||||||
#include "definedInjector.H"
|
#include "definedInjector.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "Random.H"
|
#include "Random.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
namespace Foam
|
namespace Foam
|
||||||
@ -226,7 +226,7 @@ Foam::vector Foam::definedInjector::position
|
|||||||
{
|
{
|
||||||
// otherwise, disc injection
|
// otherwise, disc injection
|
||||||
scalar iRadius = d_*rndGen.scalar01();
|
scalar iRadius = d_*rndGen.scalar01();
|
||||||
scalar iAngle = 2.0*mathematicalConstant::pi*rndGen.scalar01();
|
scalar iAngle = constant::math::twoPi*rndGen.scalar01();
|
||||||
|
|
||||||
return
|
return
|
||||||
(
|
(
|
||||||
@ -280,7 +280,7 @@ Foam::scalar Foam::definedInjector::mass
|
|||||||
// correct mass if calculation is 2D
|
// correct mass if calculation is 2D
|
||||||
if (twoD)
|
if (twoD)
|
||||||
{
|
{
|
||||||
mInj *= 0.5*angleOfWedge/mathematicalConstant::pi;
|
mInj *= 0.5*angleOfWedge/constant::math::pi;
|
||||||
}
|
}
|
||||||
|
|
||||||
return mInj;
|
return mInj;
|
||||||
@ -374,7 +374,7 @@ void Foam::definedInjector::correctProfiles
|
|||||||
const scalar referencePressure
|
const scalar referencePressure
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
scalar A = 0.25*mathematicalConstant::pi*pow(d_, 2.0);
|
scalar A = 0.25*constant::math::pi*sqr(d_);
|
||||||
scalar pDummy = 1.0e+5;
|
scalar pDummy = 1.0e+5;
|
||||||
scalar rho = fuel.rho(pDummy, T_, X_);
|
scalar rho = fuel.rho(pDummy, T_, X_);
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@ License
|
|||||||
#include "multiHoleInjector.H"
|
#include "multiHoleInjector.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "Random.H"
|
#include "Random.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
namespace Foam
|
namespace Foam
|
||||||
@ -165,7 +165,7 @@ Foam::multiHoleInjector::~multiHoleInjector()
|
|||||||
|
|
||||||
void Foam::multiHoleInjector::setTangentialVectors()
|
void Foam::multiHoleInjector::setTangentialVectors()
|
||||||
{
|
{
|
||||||
scalar pi180 = mathematicalConstant::pi/180.0;
|
scalar pi180 = constant::math::pi/180.0;
|
||||||
scalar alpha = xyAngle_*pi180;
|
scalar alpha = xyAngle_*pi180;
|
||||||
scalar phi = zAngle_*pi180;
|
scalar phi = zAngle_*pi180;
|
||||||
|
|
||||||
@ -267,7 +267,7 @@ Foam::vector Foam::multiHoleInjector::position
|
|||||||
{
|
{
|
||||||
// otherwise, disc injection
|
// otherwise, disc injection
|
||||||
scalar iRadius = d_*rndGen.scalar01();
|
scalar iRadius = d_*rndGen.scalar01();
|
||||||
scalar iAngle = 2.0*mathematicalConstant::pi*rndGen.scalar01();
|
scalar iAngle = constant::math::twoPi*rndGen.scalar01();
|
||||||
|
|
||||||
return
|
return
|
||||||
(
|
(
|
||||||
@ -319,7 +319,7 @@ Foam::scalar Foam::multiHoleInjector::mass
|
|||||||
// correct mass if calculation is 2D
|
// correct mass if calculation is 2D
|
||||||
if (twoD)
|
if (twoD)
|
||||||
{
|
{
|
||||||
mInj *= 0.5*angleOfWedge/mathematicalConstant::pi;
|
mInj *= 0.5*angleOfWedge/constant::math::pi;
|
||||||
}
|
}
|
||||||
|
|
||||||
return mInj;
|
return mInj;
|
||||||
@ -429,7 +429,7 @@ void Foam::multiHoleInjector::correctProfiles
|
|||||||
const scalar referencePressure
|
const scalar referencePressure
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
scalar A = nHoles_*0.25*mathematicalConstant::pi*pow(d_, 2.0);
|
scalar A = nHoles_*0.25*constant::math::pi*sqr(d_);
|
||||||
|
|
||||||
forAll(velocityProfile_, i)
|
forAll(velocityProfile_, i)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -27,7 +27,7 @@ License
|
|||||||
#include "swirlInjector.H"
|
#include "swirlInjector.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "Random.H"
|
#include "Random.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ Foam::vector Foam::swirlInjector::position
|
|||||||
{
|
{
|
||||||
// otherwise, disc injection
|
// otherwise, disc injection
|
||||||
scalar iRadius = d_*rndGen.scalar01();
|
scalar iRadius = d_*rndGen.scalar01();
|
||||||
scalar iAngle = 2.0*mathematicalConstant::pi*rndGen.scalar01();
|
scalar iAngle = constant::math::twoPi*rndGen.scalar01();
|
||||||
|
|
||||||
return
|
return
|
||||||
(
|
(
|
||||||
@ -300,7 +300,7 @@ Foam::scalar Foam::swirlInjector::mass
|
|||||||
// correct mass if calculation is 2D
|
// correct mass if calculation is 2D
|
||||||
if (twoD)
|
if (twoD)
|
||||||
{
|
{
|
||||||
mInj *= 0.5*angleOfWedge/mathematicalConstant::pi;
|
mInj *= 0.5*angleOfWedge/constant::math::pi;
|
||||||
}
|
}
|
||||||
|
|
||||||
return mInj;
|
return mInj;
|
||||||
@ -415,7 +415,7 @@ void Foam::swirlInjector::correctProfiles
|
|||||||
const scalar referencePressure
|
const scalar referencePressure
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
scalar A = 0.25*mathematicalConstant::pi*sqr(d_);
|
scalar A = 0.25*constant::math::pi*sqr(d_);
|
||||||
scalar pDummy = 1.0e+5;
|
scalar pDummy = 1.0e+5;
|
||||||
scalar rho = fuel.rho(pDummy, T_, X_);
|
scalar rho = fuel.rho(pDummy, T_, X_);
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@ License
|
|||||||
#include "unitInjector.H"
|
#include "unitInjector.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "Random.H"
|
#include "Random.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -220,7 +220,7 @@ Foam::vector Foam::unitInjector::position
|
|||||||
{
|
{
|
||||||
// otherwise, disc injection
|
// otherwise, disc injection
|
||||||
scalar iRadius = d_*rndGen.scalar01();
|
scalar iRadius = d_*rndGen.scalar01();
|
||||||
scalar iAngle = 2.0*mathematicalConstant::pi*rndGen.scalar01();
|
scalar iAngle = constant::math::twoPi*rndGen.scalar01();
|
||||||
|
|
||||||
return
|
return
|
||||||
(
|
(
|
||||||
@ -273,7 +273,7 @@ Foam::scalar Foam::unitInjector::mass
|
|||||||
// correct mass if calculation is 2D
|
// correct mass if calculation is 2D
|
||||||
if (twoD)
|
if (twoD)
|
||||||
{
|
{
|
||||||
mInj *= 0.5*angleOfWedge/mathematicalConstant::pi;
|
mInj *= 0.5*angleOfWedge/constant::math::pi;
|
||||||
}
|
}
|
||||||
|
|
||||||
return mInj;
|
return mInj;
|
||||||
@ -364,7 +364,7 @@ void Foam::unitInjector::correctProfiles
|
|||||||
const scalar referencePressure
|
const scalar referencePressure
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
scalar A = 0.25*mathematicalConstant::pi*sqr(d_);
|
scalar A = 0.25*constant::math::pi*sqr(d_);
|
||||||
scalar pDummy = 1.0e+5;
|
scalar pDummy = 1.0e+5;
|
||||||
|
|
||||||
forAll(velocityProfile_, i)
|
forAll(velocityProfile_, i)
|
||||||
|
|||||||
@ -25,7 +25,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "parcel.H"
|
#include "parcel.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -102,13 +102,13 @@ scalar parcel::Pr
|
|||||||
|
|
||||||
scalar parcel::N(const scalar rho) const
|
scalar parcel::N(const scalar rho) const
|
||||||
{
|
{
|
||||||
return 6.0*m_/(rho*pow(d_, 3.0)*mathematicalConstant::pi);
|
return 6.0*m_/(rho*pow3(d_)*constant::math::pi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
scalar parcel::Vd() const
|
scalar parcel::Vd() const
|
||||||
{
|
{
|
||||||
return pow(d_, 3.0)*mathematicalConstant::pi/6.0;
|
return pow3(d_)*constant::math::pi/6.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -41,7 +41,7 @@ License
|
|||||||
#include "symmetryPolyPatch.H"
|
#include "symmetryPolyPatch.H"
|
||||||
#include "wedgePolyPatch.H"
|
#include "wedgePolyPatch.H"
|
||||||
|
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -289,17 +289,17 @@ Foam::spray::spray
|
|||||||
axisOfWedgeNormal_ /= mag(axisOfWedgeNormal_);
|
axisOfWedgeNormal_ /= mag(axisOfWedgeNormal_);
|
||||||
|
|
||||||
scalar arcCos = (v1 & v2)/mag(v1);
|
scalar arcCos = (v1 & v2)/mag(v1);
|
||||||
angleOfWedge_ = mathematicalConstant::pi - acos(arcCos);
|
angleOfWedge_ = constant::math::pi - acos(arcCos);
|
||||||
|
|
||||||
Info<< "Calculated angle of wedge is "
|
Info<< "Calculated angle of wedge is "
|
||||||
<< angleOfWedge_*180/mathematicalConstant::pi << " deg."
|
<< angleOfWedge_*180/constant::math::pi << " deg."
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (symPlaneExist)
|
if (symPlaneExist)
|
||||||
{
|
{
|
||||||
angleOfWedge_ = mathematicalConstant::pi;
|
angleOfWedge_ = constant::math::pi;
|
||||||
Info<< "Constructing 180 deg three dimensional spray injection."
|
Info<< "Constructing 180 deg three dimensional spray injection."
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,7 +25,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "spray.H"
|
#include "spray.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ scalar spray::liquidMass() const
|
|||||||
|
|
||||||
if (twoD())
|
if (twoD())
|
||||||
{
|
{
|
||||||
sum *= 2.0*mathematicalConstant::pi/angleOfWedge();
|
sum *= constant::math::twoPi/angleOfWedge();
|
||||||
}
|
}
|
||||||
|
|
||||||
reduce(sum, sumOp<scalar>());
|
reduce(sum, sumOp<scalar>());
|
||||||
@ -148,7 +148,7 @@ scalar spray::liquidEnthalpy() const
|
|||||||
|
|
||||||
if (twoD())
|
if (twoD())
|
||||||
{
|
{
|
||||||
sum *= 2.0*mathematicalConstant::pi/angleOfWedge();
|
sum *= constant::math::twoPi/angleOfWedge();
|
||||||
}
|
}
|
||||||
|
|
||||||
reduce(sum, sumOp<scalar>());
|
reduce(sum, sumOp<scalar>());
|
||||||
@ -193,7 +193,7 @@ scalar spray::liquidTotalEnthalpy() const
|
|||||||
|
|
||||||
if (twoD())
|
if (twoD())
|
||||||
{
|
{
|
||||||
sum *= 2.0*mathematicalConstant::pi/angleOfWedge();
|
sum *= constant::math::twoPi/angleOfWedge();
|
||||||
}
|
}
|
||||||
|
|
||||||
reduce(sum, sumOp<scalar>());
|
reduce(sum, sumOp<scalar>());
|
||||||
@ -218,7 +218,7 @@ scalar spray::liquidKineticEnergy() const
|
|||||||
|
|
||||||
if (twoD())
|
if (twoD())
|
||||||
{
|
{
|
||||||
sum *= 2.0*mathematicalConstant::pi/angleOfWedge();
|
sum *= constant::math::twoPi/angleOfWedge();
|
||||||
}
|
}
|
||||||
|
|
||||||
reduce(sum, sumOp<scalar>());
|
reduce(sum, sumOp<scalar>());
|
||||||
|
|||||||
@ -31,7 +31,6 @@ License
|
|||||||
#include "dispersionModel.H"
|
#include "dispersionModel.H"
|
||||||
#include "interpolationCellPoint.H"
|
#include "interpolationCellPoint.H"
|
||||||
#include "processorPolyPatch.H"
|
#include "processorPolyPatch.H"
|
||||||
#include "mathematicalConstants.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@ License
|
|||||||
#include "LISA.H"
|
#include "LISA.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "basicMultiComponentMixture.H"
|
#include "basicMultiComponentMixture.H"
|
||||||
|
#include "mathConstants.H"
|
||||||
#include "RosinRammler.H"
|
#include "RosinRammler.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -155,7 +155,7 @@ void LISA::atomizeParcel
|
|||||||
|
|
||||||
scalar massFlow = it.massFlowRate(max(0.0,elapsedTime-time));
|
scalar massFlow = it.massFlowRate(max(0.0,elapsedTime-time));
|
||||||
|
|
||||||
scalar hSheet = massFlow/(mathematicalConstant::pi*d*rhoFuel*mag(p.U()));
|
scalar hSheet = massFlow/(constant::math::pi*d*rhoFuel*mag(p.U()));
|
||||||
|
|
||||||
p.d() = min(hSheet,p.d());
|
p.d() = min(hSheet,p.d());
|
||||||
|
|
||||||
@ -249,7 +249,7 @@ void LISA::atomizeParcel
|
|||||||
|
|
||||||
scalar kL = 1.0/(dL*sqrt(0.5 + 1.5*muFuel/sqrt(rhoFuel*sigma*dL)));
|
scalar kL = 1.0/(dL*sqrt(0.5 + 1.5*muFuel/sqrt(rhoFuel*sigma*dL)));
|
||||||
|
|
||||||
scalar dD = cbrt(3.0*mathematicalConstant::pi*sqr(dL)/kL);
|
scalar dD = cbrt(3.0*constant::math::pi*sqr(dL)/kL);
|
||||||
|
|
||||||
scalar lisaExp = 0.27;
|
scalar lisaExp = 0.27;
|
||||||
scalar ambientPressure = 1.0e+5;
|
scalar ambientPressure = 1.0e+5;
|
||||||
|
|||||||
@ -24,12 +24,10 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "error.H"
|
|
||||||
|
|
||||||
#include "blobsSheetAtomization.H"
|
#include "blobsSheetAtomization.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "basicMultiComponentMixture.H"
|
#include "basicMultiComponentMixture.H"
|
||||||
|
#include "mathConstants.H"
|
||||||
#include "RosinRammler.H"
|
#include "RosinRammler.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -129,7 +127,7 @@ void blobsSheetAtomization::atomizeParcel
|
|||||||
scalar lBU =
|
scalar lBU =
|
||||||
B_*sqrt
|
B_*sqrt
|
||||||
(
|
(
|
||||||
rhoFuel*sigma*p.d()*cos(angle_*mathematicalConstant::pi/360.0)
|
rhoFuel*sigma*p.d()*cos(angle_*constant::math::pi/360.0)
|
||||||
/sqr(rhoAverage*U)
|
/sqr(rhoAverage*U)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ License
|
|||||||
|
|
||||||
#include "ETAB.H"
|
#include "ETAB.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -128,7 +128,7 @@ void ETAB::breakupParcel
|
|||||||
scalar quad = -y2/a;
|
scalar quad = -y2/a;
|
||||||
if (quad < 0)
|
if (quad < 0)
|
||||||
{
|
{
|
||||||
phi = 2*mathematicalConstant::pi - phit;
|
phi = constant::math::twoPi - phit;
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar tb = 0;
|
scalar tb = 0;
|
||||||
@ -139,11 +139,11 @@ void ETAB::breakupParcel
|
|||||||
|
|
||||||
if (theta < phi)
|
if (theta < phi)
|
||||||
{
|
{
|
||||||
if (2*mathematicalConstant::pi - theta >= phi)
|
if (constant::math::twoPi - theta >= phi)
|
||||||
{
|
{
|
||||||
theta = -theta;
|
theta = -theta;
|
||||||
}
|
}
|
||||||
theta += 2*mathematicalConstant::pi;
|
theta += constant::math::twoPi;
|
||||||
}
|
}
|
||||||
tb = (theta-phi)*romega;
|
tb = (theta-phi)*romega;
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ License
|
|||||||
|
|
||||||
#include "SHF.H"
|
#include "SHF.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -196,7 +196,7 @@ void SHF::breakupParcel
|
|||||||
|
|
||||||
px =
|
px =
|
||||||
x
|
x
|
||||||
/(2.0*sqrt(2.0*mathematicalConstant::pi)*sigma_)
|
/(2.0*sqrt(constant::math::twoPi)*sigma_)
|
||||||
*exp(-0.5*sqr((x-mu_)/sigma_));
|
*exp(-0.5*sqr((x-mu_)/sigma_));
|
||||||
|
|
||||||
} while (y >= px);
|
} while (y >= px);
|
||||||
@ -227,7 +227,7 @@ void SHF::breakupParcel
|
|||||||
|
|
||||||
px =
|
px =
|
||||||
x
|
x
|
||||||
/(2.0*sqrt(2.0*mathematicalConstant::pi)*sigma_)
|
/(2.0*sqrt(constant::math::twoPi)*sigma_)
|
||||||
*exp(-0.5*sqr((x-mu_)/sigma_));
|
*exp(-0.5*sqr((x-mu_)/sigma_));
|
||||||
} while (y >= px);
|
} while (y >= px);
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ License
|
|||||||
|
|
||||||
#include "TAB.H"
|
#include "TAB.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ void TAB::breakupParcel
|
|||||||
scalar quad = -y2/a;
|
scalar quad = -y2/a;
|
||||||
if (quad < 0)
|
if (quad < 0)
|
||||||
{
|
{
|
||||||
phi = 2*mathematicalConstant::pi - phit;
|
phi = constant::math::twoPi - phit;
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar tb = 0;
|
scalar tb = 0;
|
||||||
@ -147,11 +147,11 @@ void TAB::breakupParcel
|
|||||||
|
|
||||||
if (theta < phi)
|
if (theta < phi)
|
||||||
{
|
{
|
||||||
if (2*mathematicalConstant::pi - theta >= phi)
|
if (constant::math::twoPi - theta >= phi)
|
||||||
{
|
{
|
||||||
theta = -theta;
|
theta = -theta;
|
||||||
}
|
}
|
||||||
theta += 2*mathematicalConstant::pi;
|
theta += constant::math::twoPi;
|
||||||
}
|
}
|
||||||
tb = (theta - phi)/omega;
|
tb = (theta - phi)/omega;
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ License
|
|||||||
|
|
||||||
#include "reitzKHRT.H"
|
#include "reitzKHRT.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ void reitzKHRT::breakupParcel
|
|||||||
scalar KRT = sqrt(helpVariable/(3.0*sigma + VSMALL));
|
scalar KRT = sqrt(helpVariable/(3.0*sigma + VSMALL));
|
||||||
|
|
||||||
// wavelength of the fastest growing RT frequency
|
// wavelength of the fastest growing RT frequency
|
||||||
scalar lambdaRT = 2.0*mathematicalConstant::pi*cRT_/(KRT + VSMALL);
|
scalar lambdaRT = constant::math::twoPi*cRT_/(KRT + VSMALL);
|
||||||
|
|
||||||
// if lambdaRT < diameter, then RT waves are growing on the surface
|
// if lambdaRT < diameter, then RT waves are growing on the surface
|
||||||
// and we start to keep track of how long they have been growing
|
// and we start to keep track of how long they have been growing
|
||||||
@ -170,7 +170,7 @@ void reitzKHRT::breakupParcel
|
|||||||
// reduce the diameter according to the rate-equation
|
// reduce the diameter according to the rate-equation
|
||||||
p.d() = (fraction*dc + p.d())/(1.0 + fraction);
|
p.d() = (fraction*dc + p.d())/(1.0 + fraction);
|
||||||
|
|
||||||
scalar ms = rhoLiquid*Np*pow3(dc)*mathematicalConstant::pi/6.0;
|
scalar ms = rhoLiquid*Np*pow3(dc)*constant::math::pi/6.0;
|
||||||
p.ms() += ms;
|
p.ms() += ms;
|
||||||
|
|
||||||
// Total number of parcels for the whole injection event
|
// Total number of parcels for the whole injection event
|
||||||
|
|||||||
@ -24,10 +24,9 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "error.H"
|
|
||||||
|
|
||||||
#include "ORourkeCollisionModel.H"
|
#include "ORourkeCollisionModel.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@ scalar nMin = pMin().N(rhoMin);
|
|||||||
|
|
||||||
scalar mdMin = mMin/nMin;
|
scalar mdMin = mMin/nMin;
|
||||||
|
|
||||||
scalar nu0 = 0.25*mathematicalConstant::pi*sumD*sumD*magVRel*dt/vols_[cell1];
|
scalar nu0 = 0.25*constant::math::pi*sumD*sumD*magVRel*dt/vols_[cell1];
|
||||||
scalar nu = nMin*nu0;
|
scalar nu = nMin*nu0;
|
||||||
scalar collProb = exp(-nu);
|
scalar collProb = exp(-nu);
|
||||||
scalar xx = rndGen_.scalar01();
|
scalar xx = rndGen_.scalar01();
|
||||||
|
|||||||
@ -129,7 +129,7 @@ if (vAlign > 0)
|
|||||||
pMax().d() =
|
pMax().d() =
|
||||||
pow
|
pow
|
||||||
(
|
(
|
||||||
6.0*newMaxMass/(rhoMax*mathematicalConstant::pi*nMax),
|
6.0*newMaxMass/(rhoMax*constant::math::pi*nMax),
|
||||||
1.0/3.0
|
1.0/3.0
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -26,6 +26,7 @@ License
|
|||||||
|
|
||||||
#include "trajectoryModel.H"
|
#include "trajectoryModel.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,8 @@ License
|
|||||||
|
|
||||||
#include "RutlandFlashBoil.H"
|
#include "RutlandFlashBoil.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
@ -228,7 +229,7 @@ scalar RutlandFlashBoil::boilingTime
|
|||||||
|
|
||||||
for (label k=0; k < Niter; k++)
|
for (label k=0; k < Niter; k++)
|
||||||
{
|
{
|
||||||
expSum += exp(sqr(-k*mathematicalConstant::pi*sqrt(F)/2.0));
|
expSum += exp(sqr(-k*constant::math::pi*sqrt(F)/2.0));
|
||||||
if (mag(expSum-expSumOld)/expSum < 1.0e-3)
|
if (mag(expSum-expSumOld)/expSum < 1.0e-3)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
@ -256,8 +257,7 @@ scalar RutlandFlashBoil::boilingTime
|
|||||||
}
|
}
|
||||||
|
|
||||||
scalar Gf =
|
scalar Gf =
|
||||||
4.0*alfaS*dTLB*mathematicalConstant::pi*sqr(diameter/2.0)
|
4.0*alfaS*dTLB*constant::math::pi*sqr(diameter/2.0)/heatOfVapour;
|
||||||
/heatOfVapour;
|
|
||||||
|
|
||||||
// calculation of the heat transfer vapourization at superheated
|
// calculation of the heat transfer vapourization at superheated
|
||||||
// conditions (temperature>tBoilingSurface)
|
// conditions (temperature>tBoilingSurface)
|
||||||
@ -269,8 +269,7 @@ scalar RutlandFlashBoil::boilingTime
|
|||||||
mag((vapourFarEnthalpy-vapourSurfaceEnthalpy)/heatOfVapour);
|
mag((vapourFarEnthalpy-vapourSurfaceEnthalpy)/heatOfVapour);
|
||||||
|
|
||||||
// 2.0? or 1.0? try 1!
|
// 2.0? or 1.0? try 1!
|
||||||
scalar B =
|
scalar B = 1.0*constant::math::pi*kappa/cpGas*diameter*NusseltCorr;
|
||||||
1.0*mathematicalConstant::pi*kappa/cpGas*diameter*NusseltCorr;
|
|
||||||
scalar nPos = B*log(1.0 + A)/Gf + 1.0;
|
scalar nPos = B*log(1.0 + A)/Gf + 1.0;
|
||||||
scalar nNeg = (1.0/A)*(exp(Gf/B) - 1.0 - A) + 1.0;
|
scalar nNeg = (1.0/A)*(exp(Gf/B) - 1.0 - A) + 1.0;
|
||||||
|
|
||||||
@ -343,9 +342,7 @@ scalar RutlandFlashBoil::boilingTime
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
time =
|
time = (constant::math::pi*pow3(diameter)/6.0)*liquidDensity/(G + Gf);
|
||||||
((4.0/3.0)*mathematicalConstant::pi*pow3(diameter/2.0))
|
|
||||||
*liquidDensity/(G+Gf);
|
|
||||||
|
|
||||||
time = max(VSMALL, time);
|
time = max(VSMALL, time);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,7 +26,7 @@ License
|
|||||||
|
|
||||||
#include "Chomiak.H"
|
#include "Chomiak.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -118,11 +118,11 @@ vector ChomiakInjector::direction
|
|||||||
scalar angle =
|
scalar angle =
|
||||||
(d - dMax)*maxSprayAngle_[n]
|
(d - dMax)*maxSprayAngle_[n]
|
||||||
/(dMin - dMax)
|
/(dMin - dMax)
|
||||||
*mathematicalConstant::pi/360.0;
|
*constant::math::pi/360.0;
|
||||||
scalar alpha = sin(angle);
|
scalar alpha = sin(angle);
|
||||||
scalar dcorr = cos(angle);
|
scalar dcorr = cos(angle);
|
||||||
|
|
||||||
scalar beta = 2.0*mathematicalConstant::pi*rndGen_.scalar01();
|
scalar beta = constant::math::twoPi*rndGen_.scalar01();
|
||||||
|
|
||||||
// randomly distributed vector normal to the injection vector
|
// randomly distributed vector normal to the injection vector
|
||||||
vector normal = vector::zero;
|
vector normal = vector::zero;
|
||||||
@ -132,8 +132,7 @@ vector ChomiakInjector::direction
|
|||||||
scalar reduce = 0.01;
|
scalar reduce = 0.01;
|
||||||
// correct beta if this is a 2D run
|
// correct beta if this is a 2D run
|
||||||
// map it onto the 'angleOfWedge'
|
// map it onto the 'angleOfWedge'
|
||||||
beta *=
|
beta *= (1.0-2.0*reduce)*0.5*sm_.angleOfWedge()/constant::math::pi;
|
||||||
(1.0-2.0*reduce)*0.5*sm_.angleOfWedge()/mathematicalConstant::pi;
|
|
||||||
beta += reduce*sm_.angleOfWedge();
|
beta += reduce*sm_.angleOfWedge();
|
||||||
|
|
||||||
normal =
|
normal =
|
||||||
|
|||||||
@ -26,7 +26,7 @@ License
|
|||||||
|
|
||||||
#include "blobsSwirlInjector.H"
|
#include "blobsSwirlInjector.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ scalar blobsSwirlInjector::d0
|
|||||||
|
|
||||||
angle_ = coneAngle_[n]/2.0 + c*coneInterval_[n];
|
angle_ = coneAngle_[n]/2.0 + c*coneInterval_[n];
|
||||||
|
|
||||||
angle_ *= mathematicalConstant::pi/180.0;
|
angle_ *= constant::math::pi/180.0;
|
||||||
|
|
||||||
scalar injectedMassFlow = it.massFlowRate(t);
|
scalar injectedMassFlow = it.massFlowRate(t);
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ vector blobsSwirlInjector::direction
|
|||||||
{
|
{
|
||||||
scalar alpha = sin(angle_);
|
scalar alpha = sin(angle_);
|
||||||
scalar dcorr = cos(angle_);
|
scalar dcorr = cos(angle_);
|
||||||
scalar beta = 2.0*mathematicalConstant::pi*rndGen_.scalar01();
|
scalar beta = constant::math::twoPi*rndGen_.scalar01();
|
||||||
|
|
||||||
// randomly distributed vector normal to the injection vector
|
// randomly distributed vector normal to the injection vector
|
||||||
vector normal = vector::zero;
|
vector normal = vector::zero;
|
||||||
@ -155,10 +155,7 @@ vector blobsSwirlInjector::direction
|
|||||||
// correct beta if this is a 2D run
|
// correct beta if this is a 2D run
|
||||||
// map it onto the 'angleOfWedge'
|
// map it onto the 'angleOfWedge'
|
||||||
|
|
||||||
beta *=
|
beta *= (1.0 - 2.0*reduce)*sm_.angleOfWedge()/(constant::math::twoPi);
|
||||||
(1.0 - 2.0*reduce)
|
|
||||||
*sm_.angleOfWedge()
|
|
||||||
/(2.0*mathematicalConstant::pi);
|
|
||||||
beta += reduce*sm_.angleOfWedge();
|
beta += reduce*sm_.angleOfWedge();
|
||||||
normal =
|
normal =
|
||||||
alpha
|
alpha
|
||||||
@ -243,7 +240,7 @@ void blobsSwirlInjector::calculateHX
|
|||||||
(
|
(
|
||||||
(A_[inj]*cTau_[inj]*muFuel*massFlow*(1.0 + x_))
|
(A_[inj]*cTau_[inj]*muFuel*massFlow*(1.0 + x_))
|
||||||
/(
|
/(
|
||||||
mathematicalConstant::pi
|
constant::math::pi
|
||||||
*injectorDiameter
|
*injectorDiameter
|
||||||
*rhoFuel
|
*rhoFuel
|
||||||
*dPressure
|
*dPressure
|
||||||
@ -263,7 +260,7 @@ void blobsSwirlInjector::calculateHX
|
|||||||
(
|
(
|
||||||
(A_[inj]*cTau_[inj]*muFuel*massFlow*(1.0 + x_))
|
(A_[inj]*cTau_[inj]*muFuel*massFlow*(1.0 + x_))
|
||||||
/(
|
/(
|
||||||
mathematicalConstant::pi
|
constant::math::pi
|
||||||
*injectorDiameter
|
*injectorDiameter
|
||||||
*rhoFuel
|
*rhoFuel
|
||||||
*dPressure
|
*dPressure
|
||||||
|
|||||||
@ -26,7 +26,7 @@ License
|
|||||||
|
|
||||||
#include "constInjector.H"
|
#include "constInjector.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -133,12 +133,11 @@ vector constInjector::direction
|
|||||||
v (alpha)
|
v (alpha)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
scalar angle =
|
scalar angle = rndGen_.scalar01()*sprayAngle_[n]*constant::math::pi/360.0;
|
||||||
rndGen_.scalar01()*sprayAngle_[n]*mathematicalConstant::pi/360.0;
|
|
||||||
scalar alpha = sin(angle);
|
scalar alpha = sin(angle);
|
||||||
scalar dcorr = cos(angle);
|
scalar dcorr = cos(angle);
|
||||||
|
|
||||||
scalar beta = 2.0*mathematicalConstant::pi*rndGen_.scalar01();
|
scalar beta = constant::math::twoPi*rndGen_.scalar01();
|
||||||
|
|
||||||
// randomly distributed vector normal to the injection vector
|
// randomly distributed vector normal to the injection vector
|
||||||
vector normal = vector::zero;
|
vector normal = vector::zero;
|
||||||
@ -148,8 +147,7 @@ vector constInjector::direction
|
|||||||
scalar reduce = 0.01;
|
scalar reduce = 0.01;
|
||||||
// correct beta if this is a 2D run
|
// correct beta if this is a 2D run
|
||||||
// map it onto the 'angleOfWedge'
|
// map it onto the 'angleOfWedge'
|
||||||
beta *=
|
beta *= (1.0 - 2.0*reduce)*0.5*sm_.angleOfWedge()/constant::math::pi;
|
||||||
(1.0 - 2.0*reduce)*0.5*sm_.angleOfWedge()/mathematicalConstant::pi;
|
|
||||||
beta += reduce*sm_.angleOfWedge();
|
beta += reduce*sm_.angleOfWedge();
|
||||||
|
|
||||||
normal =
|
normal =
|
||||||
|
|||||||
@ -26,7 +26,7 @@ License
|
|||||||
|
|
||||||
#include "definedHollowCone.H"
|
#include "definedHollowCone.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -163,9 +163,9 @@ vector definedHollowConeInjector::direction
|
|||||||
// use random number to generate angle between inner/outer cone angles
|
// use random number to generate angle between inner/outer cone angles
|
||||||
scalar angle = angleInner + rndGen_.scalar01()*(angleOuter - angleInner);
|
scalar angle = angleInner + rndGen_.scalar01()*(angleOuter - angleInner);
|
||||||
|
|
||||||
scalar alpha = sin(angle*mathematicalConstant::pi/360.0);
|
scalar alpha = sin(angle*constant::math::pi/360.0);
|
||||||
scalar dcorr = cos(angle*mathematicalConstant::pi/360.0);
|
scalar dcorr = cos(angle*constant::math::pi/360.0);
|
||||||
scalar beta = 2.0*mathematicalConstant::pi*rndGen_.scalar01();
|
scalar beta = constant::math::twoPi*rndGen_.scalar01();
|
||||||
|
|
||||||
// randomly distributed vector normal to the injection vector
|
// randomly distributed vector normal to the injection vector
|
||||||
vector normal = vector::zero;
|
vector normal = vector::zero;
|
||||||
@ -176,8 +176,7 @@ vector definedHollowConeInjector::direction
|
|||||||
// correct beta if this is a 2D run
|
// correct beta if this is a 2D run
|
||||||
// map it onto the 'angleOfWedge'
|
// map it onto the 'angleOfWedge'
|
||||||
|
|
||||||
beta *=
|
beta *= (1.0 - 2.0*reduce)*sm_.angleOfWedge()/(constant::math::twoPi);
|
||||||
(1.0-2.0*reduce)*sm_.angleOfWedge()/(2.0*mathematicalConstant::pi);
|
|
||||||
beta += reduce*sm_.angleOfWedge();
|
beta += reduce*sm_.angleOfWedge();
|
||||||
normal =
|
normal =
|
||||||
alpha
|
alpha
|
||||||
|
|||||||
@ -26,7 +26,7 @@ License
|
|||||||
|
|
||||||
#include "definedPressureSwirl.H"
|
#include "definedPressureSwirl.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -174,7 +174,7 @@ scalar definedPressureSwirlInjector::d0
|
|||||||
|
|
||||||
// end modifications
|
// end modifications
|
||||||
|
|
||||||
angle_ *= mathematicalConstant::pi/360.0;
|
angle_ *= constant::math::pi/360.0;
|
||||||
|
|
||||||
scalar injectedMassFlow = it.massFlowRate(t);
|
scalar injectedMassFlow = it.massFlowRate(t);
|
||||||
|
|
||||||
@ -191,7 +191,7 @@ scalar definedPressureSwirlInjector::d0
|
|||||||
|
|
||||||
u_ = v*cosAngle;
|
u_ = v*cosAngle;
|
||||||
|
|
||||||
scalar A = injectedMassFlow/(mathematicalConstant::pi*rhoFuel*u_);
|
scalar A = injectedMassFlow/(constant::math::pi*rhoFuel*u_);
|
||||||
|
|
||||||
// Not using the authors definition for sheet thickness
|
// Not using the authors definition for sheet thickness
|
||||||
// modified by multiplying the sheet tickness for the cone angle cosinus.
|
// modified by multiplying the sheet tickness for the cone angle cosinus.
|
||||||
@ -216,7 +216,7 @@ vector definedPressureSwirlInjector::direction
|
|||||||
{
|
{
|
||||||
scalar alpha = sin(angle_);
|
scalar alpha = sin(angle_);
|
||||||
scalar dcorr = cos(angle_);
|
scalar dcorr = cos(angle_);
|
||||||
scalar beta = 2.0*mathematicalConstant::pi*rndGen_.scalar01();
|
scalar beta = constant::math::twoPi*rndGen_.scalar01();
|
||||||
|
|
||||||
// randomly distributed vector normal to the injection vector
|
// randomly distributed vector normal to the injection vector
|
||||||
vector normal = vector::zero;
|
vector normal = vector::zero;
|
||||||
@ -227,8 +227,7 @@ vector definedPressureSwirlInjector::direction
|
|||||||
// correct beta if this is a 2D run
|
// correct beta if this is a 2D run
|
||||||
// map it onto the 'angleOfWedge'
|
// map it onto the 'angleOfWedge'
|
||||||
|
|
||||||
beta *=
|
beta *= (1.0 - 2.0*reduce)*sm_.angleOfWedge()/(constant::math::twoPi);
|
||||||
(1.0-2.0*reduce)*sm_.angleOfWedge()/(2.0*mathematicalConstant::pi);
|
|
||||||
beta += reduce*sm_.angleOfWedge();
|
beta += reduce*sm_.angleOfWedge();
|
||||||
normal =
|
normal =
|
||||||
alpha
|
alpha
|
||||||
@ -297,7 +296,7 @@ scalar definedPressureSwirlInjector::kv
|
|||||||
|
|
||||||
scalar coneAngle = it.getTableValue(coneAngle_, t);
|
scalar coneAngle = it.getTableValue(coneAngle_, t);
|
||||||
|
|
||||||
coneAngle *= mathematicalConstant::pi/360.0;
|
coneAngle *= constant::math::pi/360.0;
|
||||||
|
|
||||||
scalar cosAngle = cos(coneAngle);
|
scalar cosAngle = cos(coneAngle);
|
||||||
scalar Tav = it.integrateTable(it.T())/(it.teoi() - it.tsoi());
|
scalar Tav = it.integrateTable(it.T())/(it.teoi() - it.tsoi());
|
||||||
@ -310,7 +309,7 @@ scalar definedPressureSwirlInjector::kv
|
|||||||
it.getTableValue(maxKv_, t),
|
it.getTableValue(maxKv_, t),
|
||||||
4.0*massFlow
|
4.0*massFlow
|
||||||
*sqrt(rhoFuel/2.0/dPressure)
|
*sqrt(rhoFuel/2.0/dPressure)
|
||||||
/(mathematicalConstant::pi*sqr(injectorDiameter)*rhoFuel*cosAngle)
|
/(constant::math::pi*sqr(injectorDiameter)*rhoFuel*cosAngle)
|
||||||
);
|
);
|
||||||
|
|
||||||
return min(1.0, kv);
|
return min(1.0, kv);
|
||||||
|
|||||||
@ -26,7 +26,7 @@ License
|
|||||||
|
|
||||||
#include "hollowCone.H"
|
#include "hollowCone.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -130,9 +130,9 @@ vector hollowConeInjector::direction
|
|||||||
{
|
{
|
||||||
scalar angle =
|
scalar angle =
|
||||||
innerAngle_[n] + rndGen_.scalar01()*(outerAngle_[n]-innerAngle_[n]);
|
innerAngle_[n] + rndGen_.scalar01()*(outerAngle_[n]-innerAngle_[n]);
|
||||||
scalar alpha = sin(angle*mathematicalConstant::pi/360.0);
|
scalar alpha = sin(angle*constant::math::pi/360.0);
|
||||||
scalar dcorr = cos(angle*mathematicalConstant::pi/360.0);
|
scalar dcorr = cos(angle*constant::math::pi/360.0);
|
||||||
scalar beta = 2.0*mathematicalConstant::pi*rndGen_.scalar01();
|
scalar beta = constant::math::twoPi*rndGen_.scalar01();
|
||||||
|
|
||||||
// randomly distributed vector normal to the injection vector
|
// randomly distributed vector normal to the injection vector
|
||||||
vector normal = vector::zero;
|
vector normal = vector::zero;
|
||||||
@ -143,8 +143,7 @@ vector hollowConeInjector::direction
|
|||||||
// correct beta if this is a 2D run
|
// correct beta if this is a 2D run
|
||||||
// map it onto the 'angleOfWedge'
|
// map it onto the 'angleOfWedge'
|
||||||
|
|
||||||
beta *=
|
beta *= (1.0 - 2.0*reduce)*sm_.angleOfWedge()/(constant::math::twoPi);
|
||||||
(1.0-2.0*reduce)*sm_.angleOfWedge()/(2.0*mathematicalConstant::pi);
|
|
||||||
beta += reduce*sm_.angleOfWedge();
|
beta += reduce*sm_.angleOfWedge();
|
||||||
normal =
|
normal =
|
||||||
alpha
|
alpha
|
||||||
|
|||||||
@ -26,7 +26,7 @@ License
|
|||||||
|
|
||||||
#include "pressureSwirlInjector.H"
|
#include "pressureSwirlInjector.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ scalar pressureSwirlInjector::d0
|
|||||||
scalar c = rndGen_.scalar01();
|
scalar c = rndGen_.scalar01();
|
||||||
angle_ = coneAngle_[n] + 2.0*coneInterval_[n]*(0.5 - c);
|
angle_ = coneAngle_[n] + 2.0*coneInterval_[n]*(0.5 - c);
|
||||||
|
|
||||||
angle_ *= mathematicalConstant::pi/360.0;
|
angle_ *= constant::math::pi/360.0;
|
||||||
|
|
||||||
scalar injectedMassFlow = it.massFlowRate(t);
|
scalar injectedMassFlow = it.massFlowRate(t);
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ scalar pressureSwirlInjector::d0
|
|||||||
|
|
||||||
u_ = v*cosAngle;
|
u_ = v*cosAngle;
|
||||||
|
|
||||||
scalar A = injectedMassFlow/(mathematicalConstant::pi*rhoFuel*u_);
|
scalar A = injectedMassFlow/(constant::math::pi*rhoFuel*u_);
|
||||||
|
|
||||||
return (injectorDiameter-sqrt(pow(injectorDiameter,2)-4.0*A))/2.0;
|
return (injectorDiameter-sqrt(pow(injectorDiameter,2)-4.0*A))/2.0;
|
||||||
}
|
}
|
||||||
@ -138,7 +138,7 @@ vector pressureSwirlInjector::direction
|
|||||||
{
|
{
|
||||||
scalar alpha = sin(angle_);
|
scalar alpha = sin(angle_);
|
||||||
scalar dcorr = cos(angle_);
|
scalar dcorr = cos(angle_);
|
||||||
scalar beta = 2.0*mathematicalConstant::pi*rndGen_.scalar01();
|
scalar beta = constant::math::twoPi*rndGen_.scalar01();
|
||||||
|
|
||||||
// randomly distributed vector normal to the injection vector
|
// randomly distributed vector normal to the injection vector
|
||||||
vector normal = vector::zero;
|
vector normal = vector::zero;
|
||||||
@ -149,8 +149,7 @@ vector pressureSwirlInjector::direction
|
|||||||
// correct beta if this is a 2D run
|
// correct beta if this is a 2D run
|
||||||
// map it onto the 'angleOfWedge'
|
// map it onto the 'angleOfWedge'
|
||||||
|
|
||||||
beta *=
|
beta *= (1.0 - 2.0*reduce)*sm_.angleOfWedge()/(constant::math::twoPi);
|
||||||
(1.0-2.0*reduce)*sm_.angleOfWedge()/(2.0*mathematicalConstant::pi);
|
|
||||||
beta += reduce*sm_.angleOfWedge();
|
beta += reduce*sm_.angleOfWedge();
|
||||||
normal =
|
normal =
|
||||||
alpha
|
alpha
|
||||||
@ -218,7 +217,7 @@ scalar pressureSwirlInjector::kv
|
|||||||
|
|
||||||
scalar coneAngle = coneAngle_[inj];
|
scalar coneAngle = coneAngle_[inj];
|
||||||
|
|
||||||
coneAngle *= mathematicalConstant::pi/360.0;
|
coneAngle *= constant::math::pi/360.0;
|
||||||
|
|
||||||
scalar cosAngle = cos(coneAngle);
|
scalar cosAngle = cos(coneAngle);
|
||||||
scalar Tav = it.integrateTable(it.T())/(it.teoi()-it.tsoi());
|
scalar Tav = it.integrateTable(it.T())/(it.teoi()-it.tsoi());
|
||||||
@ -231,7 +230,7 @@ scalar pressureSwirlInjector::kv
|
|||||||
maxKv_[inj],
|
maxKv_[inj],
|
||||||
4.0*massFlow
|
4.0*massFlow
|
||||||
*sqrt(rhoFuel/2.0/dPressure)
|
*sqrt(rhoFuel/2.0/dPressure)
|
||||||
/(mathematicalConstant::pi*sqr(injectorDiameter)*rhoFuel*cosAngle)
|
/(constant::math::pi*sqr(injectorDiameter)*rhoFuel*cosAngle)
|
||||||
);
|
);
|
||||||
|
|
||||||
return min(1.0, kv);
|
return min(1.0, kv);
|
||||||
|
|||||||
@ -24,6 +24,8 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
@ -312,7 +314,7 @@ inline Foam::scalar Foam::DsmcCloud<ParcelType>::maxwellianAverageSpeed
|
|||||||
scalar mass
|
scalar mass
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return 2.0*sqrt(2.0*kb*temperature/(mathematicalConstant::pi*mass));
|
return 2.0*sqrt(2.0*kb*temperature/(constant::math::pi*mass));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -323,7 +325,7 @@ inline Foam::scalarField Foam::DsmcCloud<ParcelType>::maxwellianAverageSpeed
|
|||||||
scalar mass
|
scalar mass
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return 2.0*sqrt(2.0*kb*temperature/(mathematicalConstant::pi*mass));
|
return 2.0*sqrt(2.0*kb*temperature/(constant::math::pi*mass));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,6 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "DsmcParcel.H"
|
#include "DsmcParcel.H"
|
||||||
#include "dimensionedConstants.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -42,7 +42,6 @@ SourceFiles
|
|||||||
#include "IOstream.H"
|
#include "IOstream.H"
|
||||||
#include "autoPtr.H"
|
#include "autoPtr.H"
|
||||||
#include "contiguous.H"
|
#include "contiguous.H"
|
||||||
#include "mathematicalConstants.H"
|
|
||||||
|
|
||||||
#include "DsmcCloud.H"
|
#include "DsmcCloud.H"
|
||||||
|
|
||||||
|
|||||||
@ -24,6 +24,8 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template <class ParcelType>
|
template <class ParcelType>
|
||||||
@ -101,7 +103,7 @@ template <class ParcelType>
|
|||||||
inline Foam::scalar
|
inline Foam::scalar
|
||||||
Foam::DsmcParcel<ParcelType>::constantProperties::sigmaT() const
|
Foam::DsmcParcel<ParcelType>::constantProperties::sigmaT() const
|
||||||
{
|
{
|
||||||
return mathematicalConstant::pi*d_*d_;
|
return constant::math::pi*d_*d_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -25,6 +25,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "LarsenBorgnakkeVariableHardSphere.H"
|
#include "LarsenBorgnakkeVariableHardSphere.H"
|
||||||
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -156,7 +157,7 @@ Foam::scalar Foam::LarsenBorgnakkeVariableHardSphere<CloudType>::sigmaTcR
|
|||||||
|
|
||||||
// calculating cross section = pi*dPQ^2, where dPQ is from Bird, eq. 4.79
|
// calculating cross section = pi*dPQ^2, where dPQ is from Bird, eq. 4.79
|
||||||
scalar sigmaTPQ =
|
scalar sigmaTPQ =
|
||||||
mathematicalConstant::pi*dPQ*dPQ
|
constant::math::pi*dPQ*dPQ
|
||||||
*pow(2.0*CloudType::kb*Tref_/(mR*cR*cR), omegaPQ - 0.5)
|
*pow(2.0*CloudType::kb*Tref_/(mR*cR*cR), omegaPQ - 0.5)
|
||||||
/exp(Foam::lgamma(2.5 - omegaPQ));
|
/exp(Foam::lgamma(2.5 - omegaPQ));
|
||||||
|
|
||||||
@ -252,7 +253,7 @@ void Foam::LarsenBorgnakkeVariableHardSphere<CloudType>::collide
|
|||||||
|
|
||||||
scalar sinTheta = sqrt(1.0 - cosTheta*cosTheta);
|
scalar sinTheta = sqrt(1.0 - cosTheta*cosTheta);
|
||||||
|
|
||||||
scalar phi = 2.0*mathematicalConstant::pi*rndGen.scalar01();
|
scalar phi = constant::math::twoPi*rndGen.scalar01();
|
||||||
|
|
||||||
vector postCollisionRelU =
|
vector postCollisionRelU =
|
||||||
cR
|
cR
|
||||||
|
|||||||
@ -25,6 +25,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "VariableHardSphere.H"
|
#include "VariableHardSphere.H"
|
||||||
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -90,7 +91,7 @@ Foam::scalar Foam::VariableHardSphere<CloudType>::sigmaTcR
|
|||||||
|
|
||||||
// calculating cross section = pi*dPQ^2, where dPQ is from Bird, eq. 4.79
|
// calculating cross section = pi*dPQ^2, where dPQ is from Bird, eq. 4.79
|
||||||
scalar sigmaTPQ =
|
scalar sigmaTPQ =
|
||||||
mathematicalConstant::pi*dPQ*dPQ
|
constant::math::pi*dPQ*dPQ
|
||||||
*pow(2.0*CloudType::kb*Tref_/(mR*cR*cR), omegaPQ - 0.5)
|
*pow(2.0*CloudType::kb*Tref_/(mR*cR*cR), omegaPQ - 0.5)
|
||||||
/exp(Foam::lgamma(2.5 - omegaPQ));
|
/exp(Foam::lgamma(2.5 - omegaPQ));
|
||||||
|
|
||||||
@ -125,7 +126,7 @@ void Foam::VariableHardSphere<CloudType>::collide
|
|||||||
|
|
||||||
scalar sinTheta = sqrt(1.0 - cosTheta*cosTheta);
|
scalar sinTheta = sqrt(1.0 - cosTheta*cosTheta);
|
||||||
|
|
||||||
scalar phi = 2.0*mathematicalConstant::pi*rndGen.scalar01();
|
scalar phi = constant::math::twoPi*rndGen.scalar01();
|
||||||
|
|
||||||
vector postCollisionRelU =
|
vector postCollisionRelU =
|
||||||
cR
|
cR
|
||||||
|
|||||||
@ -25,6 +25,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "FreeStream.H"
|
#include "FreeStream.H"
|
||||||
|
#include "mathConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -130,7 +131,7 @@ void Foam::FreeStream<CloudType>::inflow()
|
|||||||
|
|
||||||
Random& rndGen(cloud.rndGen());
|
Random& rndGen(cloud.rndGen());
|
||||||
|
|
||||||
scalar sqrtPi = sqrt(mathematicalConstant::pi);
|
scalar sqrtPi = sqrt(constant::math::pi);
|
||||||
|
|
||||||
label particlesInserted = 0;
|
label particlesInserted = 0;
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "radiationConstants.H"
|
#include "physicoChemicalConstants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -229,7 +229,7 @@ Foam::ThermoCloud<ParcelType>::Ep() const
|
|||||||
Ep[cellI] += p.nParticle()*p.areaP()*pow4(p.T());
|
Ep[cellI] += p.nParticle()*p.areaP()*pow4(p.T());
|
||||||
}
|
}
|
||||||
|
|
||||||
Ep *= epsilon*radiation::sigmaSB.value()/V;
|
Ep *= epsilon*constant::physicoChemical::sigma.value()/V;
|
||||||
}
|
}
|
||||||
|
|
||||||
return tEp;
|
return tEp;
|
||||||
|
|||||||
@ -25,7 +25,6 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "KinematicParcel.H"
|
#include "KinematicParcel.H"
|
||||||
#include "dimensionedConstants.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
|
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,6 @@ SourceFiles
|
|||||||
#include "autoPtr.H"
|
#include "autoPtr.H"
|
||||||
#include "interpolationCellPoint.H"
|
#include "interpolationCellPoint.H"
|
||||||
#include "contiguous.H"
|
#include "contiguous.H"
|
||||||
#include "mathematicalConstants.H"
|
|
||||||
|
|
||||||
#include "KinematicCloud.H"
|
#include "KinematicCloud.H"
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user