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
7fdab2b0
Commit
7fdab2b0
authored
Nov 12, 2018
by
Kilian Weishaupt
Committed by
Ned Coltman
Feb 14, 2019
Browse files
[RANS] Add turbulence model to traits
parent
2c0a10ff
Changes
6
Hide whitespace changes
Inline
Side-by-side
dumux/freeflow/nonisothermal/model.hh
View file @
7fdab2b0
...
...
@@ -59,8 +59,10 @@ struct FreeflowNIModelTraits : public IsothermalTraits
{
//! We solve for one more equation, i.e. the energy balance
static
constexpr
int
numEq
()
{
return
IsothermalTraits
::
numEq
()
+
1
;
}
//! We additionally solve for the equation balance
static
constexpr
bool
enableEnergyBalance
()
{
return
true
;
}
//! the indices
using
Indices
=
FreeflowNonIsothermalIndices
<
typename
IsothermalTraits
::
Indices
,
numEq
()
>
;
};
...
...
dumux/freeflow/rans/oneeq/model.hh
View file @
7fdab2b0
...
...
@@ -79,12 +79,14 @@
#include
<dumux/common/properties.hh>
#include
<dumux/freeflow/properties.hh>
#include
<dumux/freeflow/turbulencemodel.hh>
#include
<dumux/freeflow/rans/model.hh>
#include
<dumux/freeflow/nonisothermal/iofields.hh>
#include
"fluxvariables.hh"
#include
"indices.hh"
#include
"localresidual.hh"
#include
"problem.hh"
#include
"volumevariables.hh"
#include
"iofields.hh"
...
...
@@ -112,6 +114,10 @@ struct OneEqModelTraits : RANSModelTraits<dimension>
//! the indices
using
Indices
=
OneEqIndices
<
dim
(),
numFluidComponents
()
>
;
//! return the type of turbulence model used
static
constexpr
auto
turbulenceModel
()
{
return
TurbulenceModel
::
oneeq
;
}
};
///////////////////////////////////////////////////////////////////////////
...
...
@@ -185,7 +191,7 @@ struct IOFields<TypeTag, TTag::OneEq> { using type = OneEqIOFields; };
// Create new type tags
namespace
TTag
{
//! The type tag for the single-phase, isothermal Spalart-Allmaras model
//! The type tag for the single-phase,
non-
isothermal Spalart-Allmaras model
struct
OneEqNI
{
using
InheritsFrom
=
std
::
tuple
<
RANSNI
>
;
};
}
// end namespace TTag
...
...
dumux/freeflow/rans/twoeq/kepsilon/model.hh
View file @
7fdab2b0
...
...
@@ -69,7 +69,9 @@
#include
<dumux/freeflow/properties.hh>
#include
<dumux/freeflow/rans/model.hh>
#include
<dumux/freeflow/rans/twoeq/indices.hh>
#include
<dumux/freeflow/turbulencemodel.hh>
#include
"problem.hh"
#include
"fluxvariables.hh"
#include
"localresidual.hh"
#include
"volumevariables.hh"
...
...
@@ -99,6 +101,10 @@ struct KEpsilonModelTraits : RANSModelTraits<dimension>
//! the indices
using
Indices
=
RANSTwoEqIndices
<
dim
(),
numFluidComponents
()
>
;
//! return the type of turbulence model used
static
constexpr
auto
turbulenceModel
()
{
return
TurbulenceModel
::
kepsilon
;
}
};
///////////////////////////////////////////////////////////////////////////
...
...
@@ -172,7 +178,7 @@ struct IOFields<TypeTag, TTag::KEpsilon> { using type = KEpsilonIOFields; };
// Create new type tags
namespace
TTag
{
//! The type tag for the single-phase, isothermal k-epsilon model
//! The type tag for the single-phase,
non-
isothermal k-epsilon model
struct
KEpsilonNI
{
using
InheritsFrom
=
std
::
tuple
<
RANSNI
>
;
};
}
// end namespace TTag
...
...
dumux/freeflow/rans/twoeq/komega/model.hh
View file @
7fdab2b0
...
...
@@ -74,7 +74,9 @@
#include
<dumux/freeflow/properties.hh>
#include
<dumux/freeflow/rans/model.hh>
#include
<dumux/freeflow/rans/twoeq/indices.hh>
#include
<dumux/freeflow/turbulencemodel.hh>
#include
"problem.hh"
#include
"fluxvariables.hh"
#include
"localresidual.hh"
#include
"volumevariables.hh"
...
...
@@ -104,6 +106,10 @@ struct KOmegaModelTraits : RANSModelTraits<dimension>
//! The indices
using
Indices
=
RANSTwoEqIndices
<
dim
(),
numFluidComponents
()
>
;
//! return the type of turbulence model used
static
constexpr
auto
turbulenceModel
()
{
return
TurbulenceModel
::
komega
;
}
};
///////////////////////////////////////////////////////////////////////////
...
...
dumux/freeflow/rans/twoeq/lowrekepsilon/model.hh
View file @
7fdab2b0
...
...
@@ -82,7 +82,9 @@
#include
<dumux/freeflow/properties.hh>
#include
<dumux/freeflow/rans/model.hh>
#include
<dumux/freeflow/rans/twoeq/indices.hh>
#include
<dumux/freeflow/turbulencemodel.hh>
#include
"problem.hh"
#include
"fluxvariables.hh"
#include
"localresidual.hh"
#include
"volumevariables.hh"
...
...
@@ -112,6 +114,10 @@ struct LowReKEpsilonModelTraits : RANSModelTraits<dimension>
//! the indices
using
Indices
=
RANSTwoEqIndices
<
dim
(),
numFluidComponents
()
>
;
//! return the type of turbulence model used
static
constexpr
auto
turbulenceModel
()
{
return
TurbulenceModel
::
lowrekepsilon
;
}
};
///////////////////////////////////////////////////////////////////////////
...
...
@@ -185,7 +191,7 @@ struct IOFields<TypeTag, TTag::LowReKEpsilon> { using type = LowReKEpsilonIOFiel
// Create new type tags
namespace
TTag
{
//! The type tag for the single-phase, isothermal low-Reynolds k-epsilon model
//! The type tag for the single-phase,
non-
isothermal low-Reynolds k-epsilon model
struct
LowReKEpsilonNI
{
using
InheritsFrom
=
std
::
tuple
<
RANSNI
>
;
};
}
// end namespace TTag
...
...
dumux/freeflow/rans/zeroeq/model.hh
View file @
7fdab2b0
...
...
@@ -40,6 +40,7 @@
#include
<dumux/freeflow/rans/model.hh>
#include
<dumux/freeflow/navierstokes/volumevariables.hh>
#include
"problem.hh"
#include
"volumevariables.hh"
namespace
Dumux
{
...
...
@@ -55,6 +56,33 @@ namespace TTag {
struct
ZeroEq
{
using
InheritsFrom
=
std
::
tuple
<
RANS
>
;
};
}
// end namespace TTag
/*!
* \ingroup ZeroEqModel
* \brief Traits for the ZeroEq model
*
* \tparam dimension The dimension of the problem
*/
template
<
int
dimension
>
struct
ZeroEqModelTraits
:
RANSModelTraits
<
dimension
>
{
//! The dimension of the model
static
constexpr
int
dim
()
{
return
dimension
;
}
//! return the type of turbulence model used
static
constexpr
auto
turbulenceModel
()
{
return
TurbulenceModel
::
zeroeq
;
}
};
template
<
class
TypeTag
>
struct
ModelTraits
<
TypeTag
,
TTag
::
ZeroEq
>
{
private:
using
GridView
=
typename
GetPropType
<
TypeTag
,
Properties
::
FVGridGeometry
>::
GridView
;
static
constexpr
int
dim
=
GridView
::
dimension
;
public:
using
type
=
ZeroEqModelTraits
<
dim
>
;
};
//! Set the volume variables property
template
<
class
TypeTag
>
struct
VolumeVariables
<
TypeTag
,
TTag
::
ZeroEq
>
...
...
@@ -81,10 +109,22 @@ public:
// Create new type tags
namespace
TTag
{
//! The type tag for the single-phase, isothermal Reynolds-Averaged Navier-Stokes model
//! The type tag for the single-phase,
non-
isothermal Reynolds-Averaged Navier-Stokes model
struct
ZeroEqNI
{
using
InheritsFrom
=
std
::
tuple
<
RANSNI
>
;
};
}
// end namespace TTag
//! The model traits of the non-isothermal model
template
<
class
TypeTag
>
struct
ModelTraits
<
TypeTag
,
TTag
::
ZeroEqNI
>
{
private:
using
GridView
=
typename
GetPropType
<
TypeTag
,
Properties
::
FVGridGeometry
>::
GridView
;
static
constexpr
int
dim
=
GridView
::
dimension
;
using
IsothermalTraits
=
ZeroEqModelTraits
<
dim
>
;
public:
using
type
=
FreeflowNIModelTraits
<
IsothermalTraits
>
;
};
//! Set the volume variables property
template
<
class
TypeTag
>
struct
VolumeVariables
<
TypeTag
,
TTag
::
ZeroEqNI
>
...
...
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