Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs-feliks
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
Feliks Kiszkurno
ogs-feliks
Commits
2a1b51ba
Commit
2a1b51ba
authored
7 years ago
by
Dmitri Naumov
Browse files
Options
Downloads
Patches
Plain Diff
[MatL] Fluid viscosity. Remove else-after-return.
parent
6e334809
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/Viscosity/CreateViscosityModel.cpp
+17
-21
17 additions, 21 deletions
MaterialLib/Fluid/Viscosity/CreateViscosityModel.cpp
with
17 additions
and
21 deletions
MaterialLib/Fluid/Viscosity/CreateViscosityModel.cpp
+
17
−
21
View file @
2a1b51ba
...
...
@@ -87,11 +87,11 @@ std::unique_ptr<FluidProperty> createViscosityModel(
//! \ogs_file_param{material__fluid__viscosity__Constant__value}
config
.
getConfigParameter
<
double
>
(
"value"
)));
}
else
if
(
type
==
"LinearPressure"
)
if
(
type
==
"LinearPressure"
)
return
createLinearPressureDependentViscosity
(
config
);
else
if
(
type
==
"TemperatureDependent"
)
if
(
type
==
"TemperatureDependent"
)
return
createTemperatureDependentViscosity
(
config
);
else
if
(
type
==
"Vogels"
)
if
(
type
==
"Vogels"
)
{
//! \ogs_file_param{material__fluid__viscosity__type}
config
.
checkConfigParameter
(
"type"
,
"Vogels"
);
...
...
@@ -110,7 +110,7 @@ std::unique_ptr<FluidProperty> createViscosityModel(
new
VogelsLiquidDynamicViscosity
<
VogelsViscosityConstantsWater
>
(
constants
));
}
else
if
(
fluid_type
==
"CO2"
)
if
(
fluid_type
==
"CO2"
)
{
//! \ogs_file_param{material__fluid__viscosity__Vogels__liquid_type}
config
.
checkConfigParameter
(
"liquid_type"
,
"CO2"
);
...
...
@@ -119,7 +119,7 @@ std::unique_ptr<FluidProperty> createViscosityModel(
new
VogelsLiquidDynamicViscosity
<
VogelsViscosityConstantsCO2
>
(
constants
));
}
else
if
(
fluid_type
==
"CH4"
)
if
(
fluid_type
==
"CH4"
)
{
//! \ogs_file_param{material__fluid__viscosity__Vogels__liquid_type}
config
.
checkConfigParameter
(
"liquid_type"
,
"CH4"
);
...
...
@@ -128,28 +128,24 @@ std::unique_ptr<FluidProperty> createViscosityModel(
new
VogelsLiquidDynamicViscosity
<
VogelsViscosityConstantsCH4
>
(
constants
));
}
else
{
OGS_FATAL
(
"The fluid type %s for Vogels model is unavailable.
\n
"
"The available fluid types are Water, CO2 and CH4
\n
"
,
fluid_type
.
data
());
}
OGS_FATAL
(
"The fluid type %s for Vogels model is unavailable.
\n
"
"The available fluid types are Water, CO2 and CH4
\n
"
,
fluid_type
.
data
());
}
else
if
(
type
==
"WaterViscosityIAPWS"
)
if
(
type
==
"WaterViscosityIAPWS"
)
{
//! \ogs_file_param{material__fluid__viscosity__type}
config
.
checkConfigParameter
(
"type"
,
"WaterViscosityIAPWS"
);
return
std
::
unique_ptr
<
FluidProperty
>
(
new
WaterViscosityIAPWS
());
}
else
{
OGS_FATAL
(
"The viscosity type %s is unavailable.
\n
"
"The available types are
\n\t
Constant,
\n\t
LinearPressure "
"
\n\t
TemperatureDependent,
\n\t
Vogels
\n
"
,
type
.
data
());
}
OGS_FATAL
(
"The viscosity type %s is unavailable.
\n
"
"The available types are
\n\t
Constant,
\n\t
LinearPressure "
"
\n\t
TemperatureDependent,
\n\t
Vogels
\n
"
,
type
.
data
());
}
}
// end namespace
...
...
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