Commit 61a577c8 authored by Mark Olesen's avatar Mark Olesen
Browse files

minor cleanup on constants/

- removed/renamed one level of directories, not all constants are dimensioned
    global/dimensionedConstants -> global/constants/
    global/dimensionedConstants/constants/* -> global/constants/

- formatting and doxygen cleanup

- added degToRad() and radToDeg() inline functions (in mathematicalConstants)
  removed equivalent degToRad() from engineTime
parent 822019bb
global/global.Cver
global/dimensionedConstants/dimensionedConstants.C
global/dimensionedConstants/constants/constants.C
global/constants/constants.C
global/constants/dimensionedConstants.C
global/argList/argList.C
global/clock/clock.C
......
......@@ -23,7 +23,7 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Namespace
Foam::constant::atom
Foam::constant::atomic
Description
Atomic constants
......@@ -68,7 +68,7 @@ namespace atomic
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace atomic
} // end namespace constant
} // End namespace constant
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -22,9 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
Collection of dimensioned constants
\*---------------------------------------------------------------------------*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -27,9 +27,10 @@ Global
Description
Dictionary reading and supplying the dimensioned constants used within
OpenFOAM particularly for thermodynamics. The values are read from the
OpenFOAM controlDict and should be changed to run with a different set of
units from the default SI units.
OpenFOAM, particularly for thermodynamics.
The values are read from the OpenFOAM etc/controlDict and should be
changed to run with a different set of units from the default SI units.
SourceFiles
dimensionedConstants.C
......
......@@ -23,7 +23,7 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Namespace
Foam::constant::em
Foam::constant::electromagnetic
Description
Electromagnetic constants
......@@ -77,7 +77,7 @@ namespace electromagnetic
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace electromagnetic
} // end namespace constant
} // End namespace constant
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -26,7 +26,7 @@ Namespace
Foam::constant::mathematical
Description
mathematical constants
mathematical constants and conversion functions
\*---------------------------------------------------------------------------*/
......@@ -56,7 +56,20 @@ namespace mathematical
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace mathematical
} // end namespace constant
} // End namespace constant
//- Conversion from degrees to radians
inline scalar degToRad(const scalar& deg)
{
return (deg * constant::mathematical::pi/180.0);
}
//- Conversion from radians to degrees
inline scalar radToDeg(const scalar& rad)
{
return (rad * 180.0/constant::mathematical::pi);
}
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -23,7 +23,7 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Namespace
Foam::constant::phys
Foam::constant::physicoChemical
Description
Physico-chemical constants
......@@ -71,7 +71,7 @@ namespace physicoChemical
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace physicoChemical
} // end namespace constant
} // End namespace constant
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -23,7 +23,7 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Namespace
Foam::constant::uni
Foam::constant::universal
Description
Universal constants
......
......@@ -123,12 +123,6 @@ bool Foam::engineTime::read()
}
Foam::scalar Foam::engineTime::degToRad(const scalar deg) const
{
return constant::mathematical::pi*deg/180.0;
}
Foam::scalar Foam::engineTime::degToTime(const scalar theta) const
{
// 6 * rpm => deg/s
......
......@@ -121,9 +121,6 @@ public:
// Conversion
//- Convert degrees to radians
scalar degToRad(const scalar rad) const;
//- Convert degrees to seconds (for given engine speed in RPM)
scalar degToTime(const scalar theta) const;
......
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