Commit 58267ba8 authored by Ned Coltman's avatar Ned Coltman
Browse files

[test][rans][sst] Add a test for the SST Turbulence Model

parent 97e6a042
...@@ -43,6 +43,18 @@ dumux_add_test(NAME test_ff_rans_lauferpipe_lowrekepsilon ...@@ -43,6 +43,18 @@ dumux_add_test(NAME test_ff_rans_lauferpipe_lowrekepsilon
-Problem.Name test_ff_rans_lauferpipe_lowrekepsilon -Problem.Name test_ff_rans_lauferpipe_lowrekepsilon
-RANS.IsFlatWallBounded True") -RANS.IsFlatWallBounded True")
dumux_add_test(NAME test_ff_rans_lauferpipe_sst
SOURCES main.cc
COMPILE_DEFINITIONS TYPETAG=PipeLauferKOmegaSST
LABELS freeflow rans
CMAKE_GUARD HAVE_UMFPACK
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/test_ff_rans_lauferpipe_sst-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_ff_rans_lauferpipe_sst-00053.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_ff_rans_lauferpipe_sst params.input
-Problem.Name test_ff_rans_lauferpipe_sst
-RANS.IsFlatWallBounded False")
add_executable(test_ff_rans_lauferpipe_komega EXCLUDE_FROM_ALL main.cc) add_executable(test_ff_rans_lauferpipe_komega EXCLUDE_FROM_ALL main.cc)
target_compile_definitions(test_ff_rans_lauferpipe_komega PUBLIC "TYPETAG=PipeLauferKOmega") target_compile_definitions(test_ff_rans_lauferpipe_komega PUBLIC "TYPETAG=PipeLauferKOmega")
...@@ -142,6 +154,21 @@ dumux_add_test(NAME test_ff_ransni_lauferpipe_lowrekepsilon ...@@ -142,6 +154,21 @@ dumux_add_test(NAME test_ff_ransni_lauferpipe_lowrekepsilon
-Problem.Name ./test_ff_ransni_lauferpipe_lowrekepsilon") -Problem.Name ./test_ff_ransni_lauferpipe_lowrekepsilon")
target_compile_definitions(test_ff_ransni_lauferpipe_lowrekepsilon PUBLIC "NONISOTHERMAL=1") target_compile_definitions(test_ff_ransni_lauferpipe_lowrekepsilon PUBLIC "NONISOTHERMAL=1")
dumux_add_test(NAME test_ff_ransni_lauferpipe_sst
SOURCES main.cc
COMPILE_DEFINITIONS TYPETAG=PipeLauferNIKOmegaSST
LABELS freeflow rans
CMAKE_GUARD HAVE_UMFPACK
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/test_ff_ransni_lauferpipe_sst-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_ff_ransni_lauferpipe_sst-00034.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_ff_ransni_lauferpipe_sst params_nonisothermal.input
-Problem.Name test_ff_ransni_lauferpipe_sst
-RANS.IsFlatWallBounded False")
target_compile_definitions(test_ff_ransni_lauferpipe_sst PUBLIC "NONISOTHERMAL=1")
dumux_add_test(NAME test_ff_ransni_lauferpipe_komega dumux_add_test(NAME test_ff_ransni_lauferpipe_komega
SOURCES main.cc SOURCES main.cc
COMPILE_DEFINITIONS TYPETAG=PipeLauferNIKOmega COMPILE_DEFINITIONS TYPETAG=PipeLauferNIKOmega
......
...@@ -18,6 +18,8 @@ EnableGravity = false ...@@ -18,6 +18,8 @@ EnableGravity = false
[RANS] [RANS]
EddyViscosityModel = "baldwinLomax" EddyViscosityModel = "baldwinLomax"
WallNormalAxis = 1 WallNormalAxis = 1
TurbulenceModel = SST
[KEpsilon] [KEpsilon]
YPlusThreshold = 10. # should be small (10-30) for coarse grids YPlusThreshold = 10. # should be small (10-30) for coarse grids
......
...@@ -24,6 +24,7 @@ TurbulentPrandtlNumber = 0.85 ...@@ -24,6 +24,7 @@ TurbulentPrandtlNumber = 0.85
WallNormalAxis = 1 WallNormalAxis = 1
IsFlatWallBounded = True IsFlatWallBounded = True
WriteFlatWallBoundedFields = True WriteFlatWallBoundedFields = True
TurbulenceModel = SST
[Assembly] [Assembly]
NumericDifferenceMethod = 0 NumericDifferenceMethod = 0
......
...@@ -92,7 +92,7 @@ public: ...@@ -92,7 +92,7 @@ public:
viscosityTilde_ = 1e-3 * turbulenceProperties.viscosityTilde(inletVelocity_, diameter, kinematicViscosity); viscosityTilde_ = 1e-3 * turbulenceProperties.viscosityTilde(inletVelocity_, diameter, kinematicViscosity);
turbulentKineticEnergy_ = turbulenceProperties.turbulentKineticEnergy(inletVelocity_, diameter, kinematicViscosity); turbulentKineticEnergy_ = turbulenceProperties.turbulentKineticEnergy(inletVelocity_, diameter, kinematicViscosity);
if (ModelTraits::turbulenceModel() == TurbulenceModel::komega) if (ModelTraits::turbulenceModel() == TurbulenceModel::komega || ModelTraits::turbulenceModel() == TurbulenceModel::sst)
dissipation_ = turbulenceProperties.dissipationRate(inletVelocity_, diameter, kinematicViscosity); dissipation_ = turbulenceProperties.dissipationRate(inletVelocity_, diameter, kinematicViscosity);
else else
dissipation_ = turbulenceProperties.dissipation(inletVelocity_, diameter, kinematicViscosity); dissipation_ = turbulenceProperties.dissipation(inletVelocity_, diameter, kinematicViscosity);
...@@ -207,7 +207,8 @@ public: ...@@ -207,7 +207,8 @@ public:
PrimaryVariables dirichlet([[maybe_unused]] const Element& element, const SubControlVolume& scv) const PrimaryVariables dirichlet([[maybe_unused]] const Element& element, const SubControlVolume& scv) const
{ {
if constexpr (ModelTraits::turbulenceModel() == TurbulenceModel::kepsilon if constexpr (ModelTraits::turbulenceModel() == TurbulenceModel::kepsilon
|| ModelTraits::turbulenceModel() == TurbulenceModel::komega) || ModelTraits::turbulenceModel() == TurbulenceModel::komega
|| ModelTraits::turbulenceModel() == TurbulenceModel::sst)
return dirichletTurbulentTwoEq_(element, scv); return dirichletTurbulentTwoEq_(element, scv);
else else
{ {
...@@ -326,7 +327,8 @@ private: ...@@ -326,7 +327,8 @@ private:
return pvIdx == Indices::dissipationEqIdx; return pvIdx == Indices::dissipationEqIdx;
return false; return false;
} }
else if constexpr (ModelTraits::turbulenceModel() == TurbulenceModel::komega) else if constexpr (ModelTraits::turbulenceModel() == TurbulenceModel::komega ||
ModelTraits::turbulenceModel() == TurbulenceModel::sst)
{ {
// For the komega model we set a fixed dissipation (omega) for all cells at the wall // For the komega model we set a fixed dissipation (omega) for all cells at the wall
for (const auto& scvf : scvfs(fvGeometry)) for (const auto& scvf : scvfs(fvGeometry))
...@@ -356,7 +358,8 @@ private: ...@@ -356,7 +358,8 @@ private:
} }
else else
{ {
static_assert(ModelTraits::turbulenceModel() == TurbulenceModel::komega, "Only valid for Komega"); static_assert(ModelTraits::turbulenceModel() == TurbulenceModel::komega
|| ModelTraits::turbulenceModel() == TurbulenceModel::sst, "Only valid for Komega");
// For the komega model we set a fixed value for the dissipation // For the komega model we set a fixed value for the dissipation
const auto wallDistance = ParentType::wallDistance(elementIdx); const auto wallDistance = ParentType::wallDistance(elementIdx);
using std::pow; using std::pow;
......
...@@ -44,6 +44,8 @@ ...@@ -44,6 +44,8 @@
#include <dumux/freeflow/rans/twoeq/kepsilon/problem.hh> #include <dumux/freeflow/rans/twoeq/kepsilon/problem.hh>
#include <dumux/freeflow/rans/twoeq/komega/model.hh> #include <dumux/freeflow/rans/twoeq/komega/model.hh>
#include <dumux/freeflow/rans/twoeq/komega/problem.hh> #include <dumux/freeflow/rans/twoeq/komega/problem.hh>
#include <dumux/freeflow/rans/twoeq/sst/model.hh>
#include <dumux/freeflow/rans/twoeq/sst/problem.hh>
#include <dumux/freeflow/rans/twoeq/lowrekepsilon/problem.hh> #include <dumux/freeflow/rans/twoeq/lowrekepsilon/problem.hh>
#include <dumux/freeflow/rans/twoeq/lowrekepsilon/model.hh> #include <dumux/freeflow/rans/twoeq/lowrekepsilon/model.hh>
...@@ -61,12 +63,14 @@ struct PipeLauferOneEq { using InheritsFrom = std::tuple<RANSModel, OneEq>; }; ...@@ -61,12 +63,14 @@ struct PipeLauferOneEq { using InheritsFrom = std::tuple<RANSModel, OneEq>; };
struct PipeLauferKOmega { using InheritsFrom = std::tuple<RANSModel, KOmega>; }; struct PipeLauferKOmega { using InheritsFrom = std::tuple<RANSModel, KOmega>; };
struct PipeLauferLowReKEpsilon { using InheritsFrom = std::tuple<RANSModel, LowReKEpsilon>; }; struct PipeLauferLowReKEpsilon { using InheritsFrom = std::tuple<RANSModel, LowReKEpsilon>; };
struct PipeLauferKEpsilon { using InheritsFrom = std::tuple<RANSModel, KEpsilon>; }; struct PipeLauferKEpsilon { using InheritsFrom = std::tuple<RANSModel, KEpsilon>; };
struct PipeLauferKOmegaSST { using InheritsFrom = std::tuple<RANSModel, SST>; };
// Non-Isothermal Typetags // Non-Isothermal Typetags
struct PipeLauferNIZeroEq { using InheritsFrom = std::tuple<RANSModel, ZeroEqNI>; }; struct PipeLauferNIZeroEq { using InheritsFrom = std::tuple<RANSModel, ZeroEqNI>; };
struct PipeLauferNIOneEq { using InheritsFrom = std::tuple<RANSModel, OneEqNI>; }; struct PipeLauferNIOneEq { using InheritsFrom = std::tuple<RANSModel, OneEqNI>; };
struct PipeLauferNIKOmega { using InheritsFrom = std::tuple<RANSModel, KOmegaNI>; }; struct PipeLauferNIKOmega { using InheritsFrom = std::tuple<RANSModel, KOmegaNI>; };
struct PipeLauferNILowReKEpsilon { using InheritsFrom = std::tuple<RANSModel, LowReKEpsilonNI>; }; struct PipeLauferNILowReKEpsilon { using InheritsFrom = std::tuple<RANSModel, LowReKEpsilonNI>; };
struct PipeLauferNIKEpsilon { using InheritsFrom = std::tuple<RANSModel, KEpsilonNI>; }; struct PipeLauferNIKEpsilon { using InheritsFrom = std::tuple<RANSModel, KEpsilonNI>; };
struct PipeLauferNIKOmegaSST { using InheritsFrom = std::tuple<RANSModel, SSTNI>; };
} // end namespace TTag } // end namespace TTag
// the fluid system // the fluid system
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment