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
Chaofan Chen
ogs
Commits
9b18d1ef
Commit
9b18d1ef
authored
8 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
[Mat/Fluid] Use LinearConcentrationDependentDensitity model.
parent
5b160069
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MaterialLib/Fluid/Density/CreateFluidDensityModel.cpp
+25
-0
25 additions, 0 deletions
MaterialLib/Fluid/Density/CreateFluidDensityModel.cpp
with
25 additions
and
0 deletions
MaterialLib/Fluid/Density/CreateFluidDensityModel.cpp
+
25
−
0
View file @
9b18d1ef
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
#include
"BaseLib/Error.h"
#include
"BaseLib/Error.h"
#include
"IdealGasLaw.h"
#include
"IdealGasLaw.h"
#include
"LinearConcentrationDependentDensity.h"
#include
"LinearTemperatureDependentDensity.h"
#include
"LinearTemperatureDependentDensity.h"
#include
"LiquidDensity.h"
#include
"LiquidDensity.h"
#include
"WaterDensityIAPWSIF97Region1.h"
#include
"WaterDensityIAPWSIF97Region1.h"
...
@@ -72,6 +73,28 @@ static std::unique_ptr<FluidProperty> createLinearTemperatureDependentDensity(
...
@@ -72,6 +73,28 @@ static std::unique_ptr<FluidProperty> createLinearTemperatureDependentDensity(
new
LinearTemperatureDependentDensity
(
rho0
,
T0
,
beta
));
new
LinearTemperatureDependentDensity
(
rho0
,
T0
,
beta
));
}
}
static
std
::
unique_ptr
<
FluidProperty
>
createLinearConcentrationDependentDensity
(
BaseLib
::
ConfigTree
const
&
config
)
{
//! \ogs_file_param{material__fluid__density__type}
config
.
checkConfigParameter
(
"type"
,
"ConcentrationDependent"
);
const
double
reference_density
=
//! \ogs_file_param{material__fluid__density__ConcentrationDependent__reference_density}
config
.
getConfigParameter
<
double
>
(
"reference_density"
);
const
double
reference_concentration
=
//! \ogs_file_param{material__fluid__density__ConcentrationDependent__reference_concentration}
config
.
getConfigParameter
<
double
>
(
"reference_concentration"
);
const
double
fluid_density_difference_ratio
=
//! \ogs_file_param{material__fluid__density__ConcentrationDependent__fluid_density_difference_ratio}
config
.
getConfigParameter
<
double
>
(
"fluid_density_difference_ratio"
);
return
std
::
unique_ptr
<
FluidProperty
>
(
new
LinearConcentrationDependentDensity
(
reference_density
,
reference_concentration
,
fluid_density_difference_ratio
));
}
std
::
unique_ptr
<
FluidProperty
>
createFluidDensityModel
(
std
::
unique_ptr
<
FluidProperty
>
createFluidDensityModel
(
BaseLib
::
ConfigTree
const
&
config
)
BaseLib
::
ConfigTree
const
&
config
)
{
{
...
@@ -90,6 +113,8 @@ std::unique_ptr<FluidProperty> createFluidDensityModel(
...
@@ -90,6 +113,8 @@ std::unique_ptr<FluidProperty> createFluidDensityModel(
return
createLiquidDensity
(
config
);
return
createLiquidDensity
(
config
);
else
if
(
type
==
"TemperatureDependent"
)
else
if
(
type
==
"TemperatureDependent"
)
return
createLinearTemperatureDependentDensity
(
config
);
return
createLinearTemperatureDependentDensity
(
config
);
else
if
(
type
==
"ConcentrationDependent"
)
return
createLinearConcentrationDependentDensity
(
config
);
else
if
(
type
==
"IdealGasLaw"
)
else
if
(
type
==
"IdealGasLaw"
)
{
{
//! \ogs_file_param{material__fluid__density__type}
//! \ogs_file_param{material__fluid__density__type}
...
...
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