Commit 3410d4ee authored by mattijs's avatar mattijs
Browse files

COMP: constants: cannot guarantee dimless etc. are initialised

parent e9a26d79
......@@ -40,6 +40,7 @@ namespace constant
const char* const atomic::group = "atomic";
// Note: cannot use dimless etc. since not guaranteed to be constructed
defineDimensionedConstantWithDefault
(
atomic::group,
......@@ -49,7 +50,7 @@ defineDimensionedConstantWithDefault
"alpha",
sqr(electromagnetic::e)
/(
dimensionedScalar("C", dimless, 2.0)
dimensionedScalar("C", dimensionSet(0, 0, 0, 0, 0), 2.0)
*electromagnetic::epsilon0
*universal::h
*universal::c
......@@ -70,7 +71,15 @@ defineDimensionedConstantWithDefault
sqr(atomic::alpha)
*atomic::me
*universal::c
/(Foam::dimensionedScalar("C", Foam::dimless, 2.0)*universal::h)
/(
Foam::dimensionedScalar
(
"C",
dimensionSet(0, 0, 0, 0, 0),
2.0
)
*universal::h
)
),
constantatomicRinf,
"Rinf"
......@@ -86,8 +95,13 @@ defineDimensionedConstantWithDefault
"a0",
atomic::alpha
/(
Foam::dimensionedScalar("C", Foam::dimless, 4.0*mathematical::pi)
*atomic::Rinf
Foam::dimensionedScalar
(
"C",
dimensionSet(0, 0, 0, 0, 0),
4.0*mathematical::pi
)
*atomic::Rinf
)
),
constantatomica0,
......@@ -104,7 +118,12 @@ defineDimensionedConstantWithDefault
"re",
Foam::sqr(electromagnetic::e)
/(
Foam::dimensionedScalar("C", Foam::dimless, 4.0*mathematical::pi)
Foam::dimensionedScalar
(
"C",
dimensionSet(0, 0, 0, 0, 0),
4.0*mathematical::pi
)
*electromagnetic::epsilon0
*atomic::me
*Foam::sqr(universal::c)
......@@ -122,7 +141,7 @@ defineDimensionedConstantWithDefault
dimensionedScalar
(
"Eh",
Foam::dimensionedScalar("C", Foam::dimless, 2.0)
Foam::dimensionedScalar("C", dimensionSet(0, 0, 0, 0, 0), 2.0)
*atomic::Rinf*universal::h*universal::c
),
constantatomicEh,
......
......@@ -55,6 +55,7 @@ defineDimensionedConstantWithDefault
);
// Note: cannot use dimless etc. since not guaranteed to be constructed
defineDimensionedConstantWithDefault
(
electromagnetic::group,
......@@ -63,7 +64,12 @@ defineDimensionedConstantWithDefault
dimensionedScalar
(
"epsilon0",
dimensionedScalar("C", dimless, 1.0)
dimensionedScalar
(
"C",
dimensionSet(0, 0, 0, 0, 0),
1.0
)
/(electromagnetic::mu0*sqr(universal::c))
),
constantelectromagneticepsilon0,
......@@ -96,7 +102,7 @@ defineDimensionedConstantWithDefault
dimensionedScalar
(
"C",
Foam::dimless,
dimensionSet(0, 0, 0, 0, 0),
1.0/(4.0*mathematical::pi)
)
/electromagnetic::epsilon0
......@@ -114,7 +120,7 @@ defineDimensionedConstantWithDefault
dimensionedScalar
(
"G0",
dimensionedScalar("C", dimless, 2)
dimensionedScalar("C", dimensionSet(0, 0, 0, 0, 0), 2)
*sqr(electromagnetic::e)
/universal::h
),
......@@ -130,7 +136,7 @@ defineDimensionedConstantWithDefault
dimensionedScalar
(
"KJ",
dimensionedScalar("C", dimless, 2)
dimensionedScalar("C", dimensionSet(0, 0, 0, 0, 0), 2)
*electromagnetic::e
/universal::h
),
......@@ -147,7 +153,10 @@ defineDimensionedConstantWithDefault
(
"phi0",
universal::h
/(dimensionedScalar("C", dimless, 2)*electromagnetic::e)
/(
dimensionedScalar("C", dimensionSet(0, 0, 0, 0, 0), 2)
*electromagnetic::e
)
),
constantelectromagneticphi0,
"phi0"
......
......@@ -113,6 +113,7 @@ defineDimensionedConstant
);
// Note: cannot use dimless etc since not guaranteed to be constructed
defineDimensionedConstantWithDefault
(
physicoChemical::group,
......@@ -120,7 +121,7 @@ defineDimensionedConstantWithDefault
Foam::dimensionedScalar
(
"NA",
Foam::dimless/Foam::dimMoles,
dimensionSet(0, 0, 0, 0, -1), //Foam::dimless/Foam::dimMoles,
6.0221417930e+23
),
constantphysicoChemicalNA,
......
......@@ -67,6 +67,7 @@ defineDimensionedConstantWithDefault
);
// Note: cannot use dimless etc. since not guaranteed to be constructed
defineDimensionedConstantWithDefault
(
physicoChemical::group,
......@@ -77,7 +78,7 @@ defineDimensionedConstantWithDefault
Foam::dimensionedScalar
(
"C",
Foam::dimless,
dimensionSet(0, 0, 0, 0, 0), //Foam::dimless,
Foam::sqr(mathematical::pi)/60.0
)
*Foam::pow4(physicoChemical::k)
......@@ -96,7 +97,12 @@ defineDimensionedConstantWithDefault
(
"b",
(universal::h*universal::c/physicoChemical::k)
/Foam::dimensionedScalar("C", Foam::dimless, 4.965114231)
/Foam::dimensionedScalar
(
"C",
dimensionSet(0, 0, 0, 0, 0), //Foam::dimless
4.965114231
)
),
constantphysicoChemicalb,
"b"
......@@ -110,7 +116,12 @@ defineDimensionedConstantWithDefault
dimensionedScalar
(
"c1",
Foam::dimensionedScalar("C", Foam::dimless, mathematical::twoPi)
Foam::dimensionedScalar
(
"C",
dimensionSet(0, 0, 0, 0, 0), //Foam::dimless,
mathematical::twoPi
)
*universal::h*Foam::sqr(universal::c)
),
constantphysicoChemicalc1,
......
......@@ -38,6 +38,7 @@ namespace constant
const char* const universal::group = "universal";
// Note: cannot use dimless etc. since not guaranteed to be constructed
defineDimensionedConstantWithDefault
(
"universal",
......@@ -46,7 +47,14 @@ defineDimensionedConstantWithDefault
(
"hr",
universal::h
/(dimensionedScalar("C", dimless, mathematical::twoPi))
/(
dimensionedScalar
(
"C",
dimensionSet(0, 0, 0, 0, 0),//dimless
mathematical::twoPi
)
)
),
constantuniversalhr,
"hr"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment