Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
573bfbc1
Commit
573bfbc1
authored
Feb 26, 2019
by
Ned Coltman
Browse files
[test][turbulencemodels] add convenience function to write out name of turbulence model
parent
bcbea1ca
Changes
3
Hide whitespace changes
Inline
Side-by-side
dumux/freeflow/turbulencemodel.hh
View file @
573bfbc1
...
...
@@ -46,6 +46,25 @@ namespace Dumux {
return
2
;
}
/**
* \brief return the name of the Turbulence Model
*/
std
::
string
turbulenceModelToString
(
TurbulenceModel
turbulenceModel
)
{
switch
(
turbulenceModel
)
{
case
TurbulenceModel
::
zeroeq
:
return
"ZeroEq"
;
case
TurbulenceModel
::
oneeq
:
return
"OneEq"
;
case
TurbulenceModel
::
lowrekepsilon
:
return
"LowReKEpsilon"
;
case
TurbulenceModel
::
kepsilon
:
return
"KEpsilon"
;
case
TurbulenceModel
::
komega
:
return
"KOmega"
;
case
TurbulenceModel
::
none
:
return
"No_TurbModel"
;
default:
return
"Invalid"
;
// should never be reached
}
}
}
// end namespace Dumux
#endif
test/freeflow/rans/problem.hh
View file @
573bfbc1
...
...
@@ -163,6 +163,9 @@ public:
initializationTime_
=
getParam
<
Scalar
>
(
"TimeLoop.Initialization"
,
1.0
);
else
initializationTime_
=
getParam
<
Scalar
>
(
"TimeLoop.Initialization"
,
-
1.0
);
turbulenceModelName_
=
turbulenceModelToString
(
ModelTraits
::
turbulenceModel
());
std
::
cout
<<
"Using the "
<<
turbulenceModelName_
<<
" Turbulence Model.
\n
"
;
std
::
cout
<<
std
::
endl
;
}
...
...
@@ -521,6 +524,7 @@ private:
Scalar
viscosityTilde_
;
Scalar
turbulentKineticEnergy_
;
Scalar
dissipation_
;
std
::
string
turbulenceModelName_
;
TimeLoopPtr
timeLoop_
;
};
}
// end namespace Dumux
...
...
test/freeflow/ransnc/problem.hh
View file @
573bfbc1
...
...
@@ -166,7 +166,9 @@ public:
dissipation_
=
turbulenceProperties
.
dissipationRate
(
inletVelocity_
,
diameter
,
kinematicViscosity
);
else
dissipation_
=
turbulenceProperties
.
dissipation
(
inletVelocity_
,
diameter
,
kinematicViscosity
);
turbulenceModelName_
=
turbulenceModelToString
(
ModelTraits
::
turbulenceModel
());
std
::
cout
<<
"Using the "
<<
turbulenceModelName_
<<
" Turbulence Model.
\n
"
;
std
::
cout
<<
std
::
endl
;
}
/*!
...
...
@@ -544,6 +546,7 @@ private:
Scalar
turbulentKineticEnergy_
;
Scalar
dissipation_
;
TimeLoopPtr
timeLoop_
;
std
::
string
turbulenceModelName_
;
};
}
// end namespace Dumux
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment