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
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
Yuhao Liu
ogs
Commits
70b9bee9
Commit
70b9bee9
authored
4 years ago
by
renchao.lu
Browse files
Options
Downloads
Patches
Plain Diff
[MPL] molar volume and volume fraction.
parent
75f73c9c
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/MPL/PropertyType.h
+13
-2
13 additions, 2 deletions
MaterialLib/MPL/PropertyType.h
with
13 additions
and
2 deletions
MaterialLib/MPL/PropertyType.h
+
13
−
2
View file @
70b9bee9
...
@@ -59,6 +59,7 @@ enum PropertyType : int
...
@@ -59,6 +59,7 @@ enum PropertyType : int
longitudinal_dispersivity
,
longitudinal_dispersivity
,
molality
,
molality
,
molar_mass
,
molar_mass
,
molar_volume
,
mole_fraction
,
mole_fraction
,
/// used to compute the hydrodynamic dispersion tensor.
/// used to compute the hydrodynamic dispersion tensor.
molecular_diffusion
,
molecular_diffusion
,
...
@@ -88,6 +89,7 @@ enum PropertyType : int
...
@@ -88,6 +89,7 @@ enum PropertyType : int
transversal_dispersivity
,
transversal_dispersivity
,
vapor_pressure
,
vapor_pressure
,
viscosity
,
viscosity
,
volume_fraction
,
number_of_properties
number_of_properties
};
};
...
@@ -182,7 +184,6 @@ inline PropertyType convertStringToProperty(std::string const& inString)
...
@@ -182,7 +184,6 @@ inline PropertyType convertStringToProperty(std::string const& inString)
{
{
return
PropertyType
::
longitudinal_dispersivity
;
return
PropertyType
::
longitudinal_dispersivity
;
}
}
// TODO (renchao): add property "volume fraction"
if
(
boost
::
iequals
(
inString
,
"molality"
))
if
(
boost
::
iequals
(
inString
,
"molality"
))
{
{
return
PropertyType
::
molality
;
return
PropertyType
::
molality
;
...
@@ -191,6 +192,10 @@ inline PropertyType convertStringToProperty(std::string const& inString)
...
@@ -191,6 +192,10 @@ inline PropertyType convertStringToProperty(std::string const& inString)
{
{
return
PropertyType
::
molar_mass
;
return
PropertyType
::
molar_mass
;
}
}
if
(
boost
::
iequals
(
inString
,
"molar_volume"
))
{
return
PropertyType
::
molar_volume
;
}
if
(
boost
::
iequals
(
inString
,
"mole_fraction"
))
if
(
boost
::
iequals
(
inString
,
"mole_fraction"
))
{
{
return
PropertyType
::
mole_fraction
;
return
PropertyType
::
mole_fraction
;
...
@@ -295,6 +300,10 @@ inline PropertyType convertStringToProperty(std::string const& inString)
...
@@ -295,6 +300,10 @@ inline PropertyType convertStringToProperty(std::string const& inString)
{
{
return
PropertyType
::
viscosity
;
return
PropertyType
::
viscosity
;
}
}
if
(
boost
::
iequals
(
inString
,
"volume_fraction"
))
{
return
PropertyType
::
volume_fraction
;
}
OGS_FATAL
(
OGS_FATAL
(
"The property name '{:s}' does not correspond to any known property"
,
"The property name '{:s}' does not correspond to any known property"
,
...
@@ -328,6 +337,7 @@ static const std::array<std::string, PropertyType::number_of_properties>
...
@@ -328,6 +337,7 @@ static const std::array<std::string, PropertyType::number_of_properties>
"longitudinal_dispersivity"
,
"longitudinal_dispersivity"
,
"molality"
,
"molality"
,
"molar_mass"
,
"molar_mass"
,
"molar_volume"
,
"mole_fraction"
,
"mole_fraction"
,
"molecular_diffusion"
,
"molecular_diffusion"
,
"name"
,
"name"
,
...
@@ -353,7 +363,8 @@ static const std::array<std::string, PropertyType::number_of_properties>
...
@@ -353,7 +363,8 @@ static const std::array<std::string, PropertyType::number_of_properties>
"transport_porosity"
,
"transport_porosity"
,
"transversal_dispersivity"
,
"transversal_dispersivity"
,
"vapor_pressure"
,
"vapor_pressure"
,
"viscosity"
}};
"viscosity"
,
"volume_fraction"
}};
/// This data type is based on a std::array. It can hold pointers to objects of
/// This data type is based on a std::array. It can hold pointers to objects of
/// class Property or its inheritors. The size of this array is determined by
/// class Property or its inheritors. The size of this array is determined by
...
...
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