Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
8dcea0f8
Commit
8dcea0f8
authored
Aug 28, 2009
by
Andrew Heather
Browse files
using new constant definitions
parent
243bff1a
Changes
145
Hide whitespace changes
Inline
Side-by-side
applications/solvers/combustion/dieselEngineFoam/createSpray.H
View file @
8dcea0f8
...
...
@@ -30,7 +30,7 @@ scalar gasMass0 = fvc::domainIntegrate(rho).value();
if
(
dieselSpray
.
twoD
())
{
gasMass0
*=
2
.
0
*
mathematicalConstant
::
p
i
/
dieselSpray
.
angleOfWedge
();
gasMass0
*=
constant
::
math
::
twoP
i
/
dieselSpray
.
angleOfWedge
();
}
gasMass0
-=
...
...
applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C
View file @
8dcea0f8
...
...
@@ -43,6 +43,7 @@ Description
#include
"OFstream.H"
#include
"volPointInterpolation.H"
#include
"thermoPhysicsTypes.H"
#include
"mathConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
applications/solvers/combustion/dieselEngineFoam/spraySummary.H
View file @
8dcea0f8
...
...
@@ -20,7 +20,7 @@
if
(
dieselSpray
.
twoD
())
{
gasMass
*=
2
.
0
*
mathematicalConstant
::
p
i
/
dieselSpray
.
angleOfWedge
();
gasMass
*=
constant
::
math
::
twoP
i
/
dieselSpray
.
angleOfWedge
();
}
scalar
addedMass
=
gasMass
-
gasMass0
;
...
...
applications/solvers/combustion/dieselFoam/dieselFoam.C
View file @
8dcea0f8
...
...
@@ -41,6 +41,7 @@ Description
#include
"IFstream.H"
#include
"OFstream.H"
#include
"Switch.H"
#include
"mathConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
applications/solvers/combustion/engineFoam/engineFoam.C
View file @
8dcea0f8
...
...
@@ -58,6 +58,7 @@ Description
#include
"ignition.H"
#include
"Switch.H"
#include
"OFstream.H"
#include
"mathConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C
View file @
8dcea0f8
...
...
@@ -28,7 +28,7 @@ License
#include
"addToRunTimeSelectionTable.H"
#include
"fvPatchFieldMapper.H"
#include
"volFields.H"
#include
"math
ematical
Constants.H"
#include
"mathConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
@@ -182,7 +182,7 @@ void smoluchowskiJumpTFvPatchScalarField::updateCoeffs()
}
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
-
accommodationCoeff_
)
/
accommodationCoeff_
;
...
...
applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C
View file @
8dcea0f8
...
...
@@ -28,7 +28,7 @@ Description
#include
"maxwellSlipUFvPatchVectorField.H"
#include
"addToRunTimeSelectionTable.H"
#include
"math
ematical
Constants.H"
#include
"mathConstants.H"
#include
"fvPatchFieldMapper.H"
#include
"volFields.H"
#include
"surfaceFields.H"
...
...
@@ -147,7 +147,7 @@ void maxwellSlipUFvPatchVectorField::updateCoeffs()
const
fvPatchField
<
scalar
>&
ppsi
=
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_
;
Field
<
scalar
>
pnu
=
pmu
/
prho
;
...
...
applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C
View file @
8dcea0f8
...
...
@@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/
#include
"SchnerrSauer.H"
#include
"math
ematical
Constants.H"
#include
"mathConstants.H"
#include
"addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
...
...
@@ -77,7 +77,7 @@ Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::rRb
{
return
pow
(
((
4
*
mathematicalC
onstant
::
pi
*
n_
)
/
3
)
((
4
*
c
onstant
::
math
::
pi
*
n_
)
/
3
)
*
limitedAlpha1
/
(
1
.
0
+
alphaNuc
()
-
limitedAlpha1
),
1
.
0
/
3
.
0
);
...
...
@@ -87,7 +87,7 @@ Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::rRb
Foam
::
dimensionedScalar
Foam
::
phaseChangeTwoPhaseMixtures
::
SchnerrSauer
::
alphaNuc
()
const
{
dimensionedScalar
Vnuc
=
n_
*
mathematicalC
onstant
::
pi
*
pow3
(
dNuc_
)
/
6
;
dimensionedScalar
Vnuc
=
n_
*
c
onstant
::
math
::
pi
*
pow3
(
dNuc_
)
/
6
;
return
Vnuc
/
(
1
+
Vnuc
);
}
...
...
applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C
View file @
8dcea0f8
...
...
@@ -29,11 +29,12 @@ License
#include
"Time.H"
#include
"subCycle.H"
#include
"fvCFD.H"
#include
"mathConstants.H"
// * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * //
const
scalar
Foam
::
multiphaseMixture
::
convertToRad
=
Foam
::
mathematicalC
onstant
::
pi
/
180
.
0
;
Foam
::
c
onstant
::
math
::
pi
/
180
.
0
;
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
...
...
applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.C
View file @
8dcea0f8
...
...
@@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/
#include
"GidaspowConductivity.H"
#include
"math
ematical
Constants.H"
#include
"mathConstants.H"
#include
"addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
...
...
@@ -69,13 +69,13 @@ Foam::tmp<Foam::volScalarField> Foam::GidaspowConductivity::kappa
const
dimensionedScalar
&
e
)
const
{
const
scalar
sqrtPi
=
sqrt
(
mathematicalC
onstant
::
pi
);
const
scalar
sqrtPi
=
sqrt
(
c
onstant
::
math
::
pi
);
return
rhoa
*
da
*
sqrt
(
Theta
)
*
(
2
.
0
*
sqr
(
alpha
)
*
g0
*
(
1
.
0
+
e
)
/
sqrtPi
+
(
9
.
0
/
8
.
0
)
*
sqrtPi
*
g0
*
0
.
5
*
(
1
.
0
+
e
)
*
sqr
(
alpha
)
+
(
15
.
0
/
16
.
0
)
*
sqrtPi
*
alpha
+
(
15
.
0
/
16
.
0
)
*
sqrtPi
*
alpha
+
(
25
.
0
/
64
.
0
)
*
sqrtPi
/
((
1
.
0
+
e
)
*
g0
)
);
}
...
...
applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C
View file @
8dcea0f8
...
...
@@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/
#include
"HrenyaSinclairConductivity.H"
#include
"math
ematical
Constants.H"
#include
"mathConstants.H"
#include
"addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
...
...
@@ -74,9 +74,9 @@ Foam::tmp<Foam::volScalarField> Foam::HrenyaSinclairConductivity::kappa
const
dimensionedScalar
&
e
)
const
{
const
scalar
sqrtPi
=
sqrt
(
mathematicalC
onstant
::
pi
);
const
scalar
sqrtPi
=
sqrt
(
c
onstant
::
math
::
pi
);
volScalarField
lamda
=
volScalarField
lamda
=
scalar
(
1
)
+
da
/
(
6
.
0
*
sqrt
(
2
.
0
)
*
(
alpha
+
scalar
(
1.0e-5
)))
/
L_
;
return
rhoa
*
da
*
sqrt
(
Theta
)
*
...
...
applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.C
View file @
8dcea0f8
...
...
@@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/
#include
"SyamlalConductivity.H"
#include
"math
ematical
Constants.H"
#include
"mathConstants.H"
#include
"addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
...
...
@@ -69,7 +69,7 @@ Foam::tmp<Foam::volScalarField> Foam::SyamlalConductivity::kappa
const
dimensionedScalar
&
e
)
const
{
const
scalar
sqrtPi
=
sqrt
(
mathematicalC
onstant
::
pi
);
const
scalar
sqrtPi
=
sqrt
(
c
onstant
::
math
::
pi
);
return
rhoa
*
da
*
sqrt
(
Theta
)
*
(
...
...
applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C
View file @
8dcea0f8
...
...
@@ -26,7 +26,7 @@ License
#include
"kineticTheoryModel.H"
#include
"surfaceInterpolate.H"
#include
"math
ematical
Constants.H"
#include
"mathConstants.H"
#include
"fvCFD.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
...
...
@@ -204,7 +204,7 @@ void Foam::kineticTheoryModel::solve()
volScalarField
alpha
=
alpha_
;
alpha
.
max
(
1.0e-6
);
const
scalar
sqrtPi
=
sqrt
(
mathematicalC
onstant
::
pi
);
const
scalar
sqrtPi
=
sqrt
(
c
onstant
::
math
::
pi
);
surfaceScalarField
phi
=
1
.
5
*
rhoa_
*
phia_
*
fvc
::
interpolate
(
alpha_
);
...
...
applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.C
View file @
8dcea0f8
...
...
@@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/
#include
"GidaspowViscosity.H"
#include
"math
ematical
Constants.H"
#include
"mathConstants.H"
#include
"addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
...
...
@@ -70,7 +70,7 @@ Foam::kineticTheoryModels::GidaspowViscosity::mua
const
dimensionedScalar
&
e
)
const
{
const
scalar
sqrtPi
=
sqrt
(
mathematicalC
onstant
::
pi
);
const
scalar
sqrtPi
=
sqrt
(
c
onstant
::
math
::
pi
);
return
rhoa
*
da
*
sqrt
(
Theta
)
*
(
...
...
applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C
View file @
8dcea0f8
...
...
@@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/
#include
"HrenyaSinclairViscosity.H"
#include
"math
ematical
Constants.H"
#include
"mathConstants.H"
#include
"addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
...
...
@@ -77,7 +77,7 @@ Foam::kineticTheoryModels::HrenyaSinclairViscosity::mua
const
dimensionedScalar
&
e
)
const
{
const
scalar
sqrtPi
=
sqrt
(
mathematicalC
onstant
::
pi
);
const
scalar
sqrtPi
=
sqrt
(
c
onstant
::
math
::
pi
);
volScalarField
lamda
=
scalar
(
1
)
+
da
/
(
6
.
0
*
sqrt
(
2
.
0
)
*
(
alpha
+
scalar
(
1.0e-5
)))
/
L_
;
...
...
applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.C
View file @
8dcea0f8
...
...
@@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/
#include
"SyamlalViscosity.H"
#include
"math
ematical
Constants.H"
#include
"mathConstants.H"
#include
"addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
...
...
@@ -69,7 +69,7 @@ Foam::tmp<Foam::volScalarField> Foam::kineticTheoryModels::SyamlalViscosity::mua
const
dimensionedScalar
&
e
)
const
{
const
scalar
sqrtPi
=
sqrt
(
mathematicalC
onstant
::
pi
);
const
scalar
sqrtPi
=
sqrt
(
c
onstant
::
math
::
pi
);
return
rhoa
*
da
*
sqrt
(
Theta
)
*
(
...
...
applications/test/graphXi/graphXi.C
View file @
8dcea0f8
...
...
@@ -32,7 +32,7 @@ Description
#include
"graph.H"
#include
"OFstream.H"
#include
"math
ematical
Constants.H"
#include
"mathConstants.H"
using
namespace
Foam
;
...
...
@@ -50,7 +50,7 @@ int main()
scalarField
b
=
0
.
5
*
(
1
.
0
+
erf
(
x
));
scalarField
c
=
1
.
0
-
b
;
scalarField
gradb
=
(
1
/::
sqrt
(
mathematicalC
onstant
::
pi
))
*
exp
(
-
sqr
(
x
));
scalarField
gradb
=
(
1
/::
sqrt
(
c
onstant
::
math
::
pi
))
*
exp
(
-
sqr
(
x
));
scalarField
lapb
=
-
2
*
x
*
gradb
;
r
=
lapb
*
b
*
c
/
(
gradb
*
gradb
);
...
...
applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C
View file @
8dcea0f8
...
...
@@ -47,7 +47,7 @@ Description
#include
"polyTopoChanger.H"
#include
"polyMesh.H"
#include
"mapPolyMesh.H"
#include
"math
ematical
Constants.H"
#include
"mathConstants.H"
#include
"PackedBoolList.H"
#include
"SortableList.H"
...
...
@@ -467,7 +467,7 @@ int main(int argc, char *argv[])
scalar
angle
(
readScalar
(
IStringStream
(
args
.
additionalArgs
()[
1
])()));
bool
overwrite
=
args
.
optionFound
(
"overwrite"
);
scalar
maxCos
=
Foam
::
cos
(
angle
*
180
/
mathematicalC
onstant
::
pi
);
scalar
maxCos
=
Foam
::
cos
(
angle
*
180
/
c
onstant
::
math
::
pi
);
Info
<<
"Merging:"
<<
nl
<<
" edges with length less than "
<<
minLen
<<
" meters"
<<
nl
...
...
applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C
View file @
8dcea0f8
...
...
@@ -53,7 +53,7 @@ Description
#include
"removePoints.H"
#include
"polyMesh.H"
#include
"mapPolyMesh.H"
#include
"math
ematical
Constants.H"
#include
"mathConstants.H"
using
namespace
Foam
;
...
...
@@ -445,12 +445,12 @@ int main(int argc, char *argv[])
scalar
featureAngle
(
readScalar
(
IStringStream
(
args
.
additionalArgs
()[
0
])()));
scalar
minCos
=
Foam
::
cos
(
featureAngle
*
mathematicalC
onstant
::
pi
/
180
.
0
);
scalar
minCos
=
Foam
::
cos
(
featureAngle
*
c
onstant
::
math
::
pi
/
180
.
0
);
scalar
concaveAngle
=
defaultConcaveAngle
;
args
.
optionReadIfPresent
(
"concaveAngle"
,
concaveAngle
);
scalar
concaveSin
=
Foam
::
sin
(
concaveAngle
*
mathematicalC
onstant
::
pi
/
180
.
0
);
scalar
concaveSin
=
Foam
::
sin
(
concaveAngle
*
c
onstant
::
math
::
pi
/
180
.
0
);
bool
snapMeshDict
=
args
.
optionFound
(
"snapMesh"
);
bool
overwrite
=
args
.
optionFound
(
"overwrite"
);
...
...
applications/utilities/mesh/advanced/splitCells/splitCells.C
View file @
8dcea0f8
...
...
@@ -49,7 +49,7 @@ Description
#include
"cellSet.H"
#include
"cellModeller.H"
#include
"meshCutter.H"
#include
"math
ematical
Constants.H"
#include
"mathConstants.H"
#include
"geomCellLooper.H"
#include
"plane.H"
#include
"edgeVertex.H"
...
...
@@ -539,7 +539,7 @@ int main(int argc, char *argv[])
scalar
featureAngle
(
readScalar
(
IStringStream
(
args
.
additionalArgs
()[
0
])()));
scalar
radAngle
=
featureAngle
*
mathematicalC
onstant
::
pi
/
180
.
0
;
scalar
radAngle
=
featureAngle
*
c
onstant
::
math
::
pi
/
180
.
0
;
scalar
minCos
=
Foam
::
cos
(
radAngle
);
scalar
minSin
=
Foam
::
sin
(
radAngle
);
...
...
Prev
1
2
3
4
5
…
8
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment