Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dmitri Naumov
ogs
Commits
3b0fbf0f
Commit
3b0fbf0f
authored
4 years ago
by
wenqing
Browse files
Options
Downloads
Patches
Plain Diff
[PhysicalConstant] changed const to constexpr
parent
5c2ae1c3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MaterialLib/PhysicalConstant.h
+9
-9
9 additions, 9 deletions
MaterialLib/PhysicalConstant.h
with
9 additions
and
9 deletions
MaterialLib/PhysicalConstant.h
+
9
−
9
View file @
3b0fbf0f
...
@@ -19,7 +19,7 @@ namespace MaterialLib
...
@@ -19,7 +19,7 @@ namespace MaterialLib
namespace
PhysicalConstant
namespace
PhysicalConstant
{
{
/// Zero degrees Celsius in Kelvin
/// Zero degrees Celsius in Kelvin
const
double
CelsiusZeroInKelvin
=
273.15
;
const
expr
double
CelsiusZeroInKelvin
=
273.15
;
/**
/**
Ideal gas constant in SI standard units (J \per{mol} \per{K})
Ideal gas constant in SI standard units (J \per{mol} \per{K})
...
@@ -28,7 +28,7 @@ const double CelsiusZeroInKelvin = 273.15;
...
@@ -28,7 +28,7 @@ const double CelsiusZeroInKelvin = 273.15;
- Date visited: 2015-04-17
- Date visited: 2015-04-17
- Standard uncertainty: 0.000 0075 J mol^-1 K^-1
- Standard uncertainty: 0.000 0075 J mol^-1 K^-1
*/
*/
const
double
IdealGasConstant
=
8.3144621
;
const
expr
double
IdealGasConstant
=
8.3144621
;
/**
/**
* Molar masses of certain elements and chemical compounds
* Molar masses of certain elements and chemical compounds
...
@@ -45,7 +45,7 @@ namespace MolarMass
...
@@ -45,7 +45,7 @@ namespace MolarMass
* 15.999 77] g/mol
* 15.999 77] g/mol
* and the molar mass of H is in the range [1.007 84, 1.008 11] g/mol
* and the molar mass of H is in the range [1.007 84, 1.008 11] g/mol
*/
*/
const
double
Water
=
0.018016
;
///< kg \per{mol}
const
expr
double
Water
=
0.018016
;
///< kg \per{mol}
/**
/**
* Nitrogen N<sub>2</sub>.
* Nitrogen N<sub>2</sub>.
...
@@ -56,7 +56,7 @@ const double Water = 0.018016; ///< kg \per{mol}
...
@@ -56,7 +56,7 @@ const double Water = 0.018016; ///< kg \per{mol}
* According to the IUPAC report the molar mass of N is in the range [14.006 43,
* According to the IUPAC report the molar mass of N is in the range [14.006 43,
* 14.007 28] g/mol
* 14.007 28] g/mol
*/
*/
const
double
N2
=
0.028013
;
///< kg \per{mol}
const
expr
double
N2
=
0.028013
;
///< kg \per{mol}
/**
/**
* Oxygen O<sub>2</sub>.
* Oxygen O<sub>2</sub>.
...
@@ -67,21 +67,21 @@ const double N2 = 0.028013; ///< kg \per{mol}
...
@@ -67,21 +67,21 @@ const double N2 = 0.028013; ///< kg \per{mol}
* According to the IUPAC report the molar mass of O is in the range [15.999 03,
* According to the IUPAC report the molar mass of O is in the range [15.999 03,
* 15.999 77] g/mol
* 15.999 77] g/mol
*/
*/
const
double
O2
=
0.032
;
///< kg \per{mol}
const
expr
double
O2
=
0.032
;
///< kg \per{mol}
/**
/**
* Air.
* Air.
*
*
* - Source: http://www.engineeringtoolbox.com/molecular-mass-air-d_679.html
* - Source: http://www.engineeringtoolbox.com/molecular-mass-air-d_679.html
*/
*/
const
double
Air
=
0.02897
;
///< kg \per{mol}
const
expr
double
Air
=
0.02897
;
///< kg \per{mol}
/**
/**
* Hydrogen.
* Hydrogen.
*
*
* - Source: https://pubchem.ncbi.nlm.nih.gov/compound/Hydrogen
* - Source: https://pubchem.ncbi.nlm.nih.gov/compound/Hydrogen
*/
*/
const
double
H2
=
0.002016
;
///< kg \per{mol}
const
expr
double
H2
=
0.002016
;
///< kg \per{mol}
}
// namespace MolarMass
}
// namespace MolarMass
/**
/**
...
@@ -92,7 +92,7 @@ const double H2 = 0.002016; ///< kg \per{mol}
...
@@ -92,7 +92,7 @@ const double H2 = 0.002016; ///< kg \per{mol}
namespace
SpecificGasConstant
namespace
SpecificGasConstant
{
{
/// Specific gas constant for water vapour.
/// Specific gas constant for water vapour.
const
double
WaterVapour
=
IdealGasConstant
/
MolarMass
::
Water
;
// = 461.504;
const
expr
double
WaterVapour
=
IdealGasConstant
/
MolarMass
::
Water
;
// = 461.504;
}
// namespace SpecificGasConstant
}
// namespace SpecificGasConstant
/**
/**
* Henry's law constant
* Henry's law constant
...
@@ -105,7 +105,7 @@ namespace HenryConstant
...
@@ -105,7 +105,7 @@ namespace HenryConstant
* De Nevers N. Physical and chemical equilibrium for chemical engineers[M].
* De Nevers N. Physical and chemical equilibrium for chemical engineers[M].
* John Wiley & Sons, 2012.
* John Wiley & Sons, 2012.
*/
*/
double
const
HenryConstantH2
=
7.65e-6
;
/// mol/Pa./m3
constexpr
double
HenryConstantH2
=
7.65e-6
;
/// mol/Pa./m3
}
// namespace HenryConstant
}
// namespace HenryConstant
}
// namespace PhysicalConstant
}
// namespace PhysicalConstant
}
// namespace MaterialLib
}
// namespace MaterialLib
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment