Commit dd97cc2a authored by Ned Coltman's avatar Ned Coltman
Browse files

[test][ransnc][sst] test the nc sst model

parent e4e17403
......@@ -39,6 +39,20 @@ dumux_add_test(NAME test_ff_rans2c_komega
--command "${CMAKE_CURRENT_BINARY_DIR}/test_ff_rans2c_komega params.input
-Problem.Name test_ff_rans2c_komega")
dumux_add_test(NAME test_ff_rans2c_sst
SOURCES main.cc
COMPILE_DEFINITIONS TYPETAG=FlatPlateNCSST
LABELS freeflow rans
TIMEOUT 3600
CMAKE_GUARD HAVE_UMFPACK
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/test_ff_rans2c_sst-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_ff_rans2c_sst-00031.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_ff_rans2c_sst params_nonisothermal.input
-Problem.Name test_ff_rans2c_sst
-Newton.TargetSteps 12")
dumux_add_test(NAME test_ff_rans2c_lowrekepsilon
SOURCES main.cc
COMPILE_DEFINITIONS TYPETAG=FlatPlateNCLowReKEpsilon
......@@ -138,6 +152,20 @@ dumux_add_test(NAME test_ff_rans2cni_komega_loadsolution
-TimeLoop.DtInitial 5.0
-TimeLoop.TEnd 200.0")
dumux_add_test(NAME test_ff_rans2cni_sst
SOURCES main.cc
COMPILE_DEFINITIONS TYPETAG=FlatPlateNCNISST NONISOTHERMAL=1
LABELS freeflow rans
TIMEOUT 3600
CMAKE_GUARD HAVE_UMFPACK
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/test_ff_rans2cni_sst-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_ff_rans2cni_sst-00031.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_ff_rans2cni_sst params_nonisothermal.input
-Problem.Name test_ff_rans2cni_sst
-Newton.TargetSteps 12")
dumux_add_test(NAME test_ff_rans2cni_lowrekepsilon
SOURCES main.cc
COMPILE_DEFINITIONS TYPETAG=FlatPlateNCNILowReKEpsilon
......
......@@ -24,6 +24,7 @@ TurbulentSchmidtNumber = 0.7
WallNormalAxis = 1
IsFlatWallBounded = True
WriteFlatWallBoundedFields = True
TurbulenceModel = SST
[Assembly]
NumericDifferenceMethod = 0
......
......@@ -22,6 +22,7 @@ TurbulentPrandtlNumber = 0.85
WallNormalAxis = 1
IsFlatWallBounded = True
WriteFlatWallBoundedFields = True
TurbulenceModel = SST
[Assembly]
NumericDifferenceMethod = 0
......
......@@ -34,6 +34,7 @@
#include <dumux/freeflow/rans/zeroeq/problem.hh>
#include <dumux/freeflow/rans/oneeq/problem.hh>
#include <dumux/freeflow/rans/twoeq/komega/problem.hh>
#include <dumux/freeflow/rans/twoeq/sst/problem.hh>
#include <dumux/freeflow/rans/twoeq/lowrekepsilon/problem.hh>
#include <dumux/freeflow/rans/twoeq/kepsilon/problem.hh>
......@@ -96,7 +97,7 @@ public:
Scalar diameter = this->gridGeometry().bBoxMax()[1] - this->gridGeometry().bBoxMin()[1];
viscosityTilde_ = 1e-3 * turbulenceProperties.viscosityTilde(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);
else
dissipation_ = turbulenceProperties.dissipation(inletVelocity_, diameter, kinematicViscosity);
......@@ -214,7 +215,8 @@ public:
PrimaryVariables dirichlet([[maybe_unused]] const Element& element, const SubControlVolume& scv) const
{
if constexpr (ModelTraits::turbulenceModel() == TurbulenceModel::kepsilon
|| ModelTraits::turbulenceModel() == TurbulenceModel::komega)
|| ModelTraits::turbulenceModel() == TurbulenceModel::komega
|| ModelTraits::turbulenceModel() == TurbulenceModel::sst)
return dirichletTurbulentTwoEq_(element, scv);
else
{
......@@ -266,7 +268,7 @@ private:
bool isLowerWall_(const GlobalPosition& globalPos) const
{ return globalPos[1] < eps_; }
//! Initial conditions for the komega, kepsilon and lowrekepsilon turbulence models
//! Initial conditions for turbulence models
void setInitialAtPos_([[maybe_unused]] PrimaryVariables& values,
[[maybe_unused]] const GlobalPosition &globalPos) const
{
......@@ -291,7 +293,7 @@ private:
}
}
//! Boundary condition types for the one-eq turbulence model
//! Boundary condition types for turbulence models
void setBcTypes_([[maybe_unused]] BoundaryTypes& values,
[[maybe_unused]] const GlobalPosition& pos) const
{
......@@ -337,9 +339,10 @@ private:
return pvIdx == Indices::dissipationEqIdx;
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 and sst models we set a fixed dissipation (omega) for all cells at the wall
for (const auto& scvf : scvfs(fvGeometry))
if (this->boundaryTypes(element, scvf).hasWall() && pvIdx == Indices::dissipationIdx)
return true;
......@@ -349,7 +352,7 @@ private:
return ParentType::isDirichletCell(element, fvGeometry, scv, pvIdx);
}
//! Specialization for the kepsilon and komega
//! Specialization for the kepsilon, sst, and komega models
template<class Element, class SubControlVolume>
PrimaryVariables dirichletTurbulentTwoEq_(const Element& element,
const SubControlVolume& scv) const
......@@ -367,8 +370,9 @@ private:
}
else
{
static_assert(ModelTraits::turbulenceModel() == TurbulenceModel::komega, "Only valid for Komega");
// For the komega model we set a fixed value for the dissipation
static_assert(ModelTraits::turbulenceModel() == TurbulenceModel::komega
|| ModelTraits::turbulenceModel() == TurbulenceModel::sst, "Only valid for Komega");
// For the komega and sst models we set a fixed value for the dissipation
const auto wallDistance = ParentType::wallDistance(elementIdx);
using std::pow;
values[Indices::dissipationEqIdx] = 6.0 * ParentType::kinematicViscosity(elementIdx)
......
......@@ -30,6 +30,7 @@
#include <dumux/freeflow/compositional/zeroeqncmodel.hh>
#include <dumux/freeflow/compositional/oneeqncmodel.hh>
#include <dumux/freeflow/compositional/komegancmodel.hh>
#include <dumux/freeflow/compositional/sstncmodel.hh>
#include <dumux/freeflow/compositional/lowrekepsilonncmodel.hh>
#include <dumux/freeflow/compositional/kepsilonncmodel.hh>
......@@ -48,12 +49,14 @@ struct RANSNCModel { using InheritsFrom = std::tuple<StaggeredFreeFlowModel>; };
struct FlatPlateNCZeroEq { using InheritsFrom = std::tuple<RANSNCModel, ZeroEqNC>; };
struct FlatPlateNCOneEq { using InheritsFrom = std::tuple<RANSNCModel, OneEqNC>; };
struct FlatPlateNCKOmega { using InheritsFrom = std::tuple<RANSNCModel, KOmegaNC>; };
struct FlatPlateNCSST { using InheritsFrom = std::tuple<RANSNCModel, SSTNC>; };
struct FlatPlateNCLowReKEpsilon { using InheritsFrom = std::tuple<RANSNCModel, LowReKEpsilonNC>; };
struct FlatPlateNCKEpsilon { using InheritsFrom = std::tuple<RANSNCModel, KEpsilonNC>; };
// Isothermal Typetags
struct FlatPlateNCNIZeroEq { using InheritsFrom = std::tuple<RANSNCModel, ZeroEqNCNI>; };
struct FlatPlateNCNIOneEq { using InheritsFrom = std::tuple<RANSNCModel, OneEqNCNI>; };
struct FlatPlateNCNIKOmega { using InheritsFrom = std::tuple<RANSNCModel, KOmegaNCNI>; };
struct FlatPlateNCNISST { using InheritsFrom = std::tuple<RANSNCModel, SSTNCNI>; };
struct FlatPlateNCNILowReKEpsilon { using InheritsFrom = std::tuple<RANSNCModel, LowReKEpsilonNCNI>; };
struct FlatPlateNCNIKEpsilon { using InheritsFrom = std::tuple<RANSNCModel, KEpsilonNCNI>; };
} // end namespace TTag
......
This diff is collapsed.
This diff is collapsed.
Supports Markdown
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