Skip to content
Snippets Groups Projects
Commit 8b7b4bbe authored by Thomas Fetzer's avatar Thomas Fetzer
Browse files

[freeflow][komega] Clean-up

parent acc3ef02
No related branches found
No related tags found
1 merge request!1027Freeflow/komega
......@@ -84,8 +84,8 @@ public:
// update size and initial values of the global vectors
storedDissipation_.resize(this->fvGridGeometry().elementMapper().size(), 0.0);
storedDynamicEddyViscosity_.resize(this->fvGridGeometry().elementMapper().size(), 0.0);
storedTurbulentKineticEnergy_.resize(this->fvGridGeometry().elementMapper().size(), 0.0);
storedDynamicEddyViscosity_.resize(this->fvGridGeometry().elementMapper().size(), 0.0);
}
/*!
......@@ -128,8 +128,8 @@ public:
public:
std::vector<Scalar> storedDissipation_;
std::vector<Scalar> storedDynamicEddyViscosity_;
std::vector<Scalar> storedTurbulentKineticEnergy_;
std::vector<Scalar> storedDynamicEddyViscosity_;
bool useStoredEddyViscosity_;
private:
......
......@@ -70,7 +70,6 @@ class KOmegaResidualImpl<TypeTag, DiscretizationMethod::staggered>
using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices;
using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
using ModelTraits = typename GET_PROP_TYPE(TypeTag, ModelTraits);
using CellCenterResidual = typename GET_PROP_TYPE(TypeTag, CellCenterPrimaryVariables);
public:
using ParentType::ParentType;
......@@ -105,7 +104,7 @@ public:
static constexpr int turbulentKineticEnergyEqIdx = Indices::turbulentKineticEnergyEqIdx - ModelTraits::dim();
static constexpr int dissipationEqIdx = Indices::dissipationEqIdx - ModelTraits::dim();
// production
// production
Scalar productionTerm = 2.0 * volVars.kinematicEddyViscosity()* volVars.stressTensorScalarProduct();
if (ModelTraits::enableKOmegaProductionLimiter())
{
......@@ -115,7 +114,7 @@ public:
source[turbulentKineticEnergyEqIdx] += productionTerm;
source[dissipationEqIdx] += volVars.alpha() * ( volVars.dissipation() / volVars.turbulentKineticEnergy() ) * productionTerm;
// destruction
// destruction
source[turbulentKineticEnergyEqIdx] -= volVars.betaK() * volVars.turbulentKineticEnergy() * volVars.dissipation();
source[dissipationEqIdx] -= problem.betaOmega() * volVars.dissipation() * volVars.dissipation();
......
......@@ -198,10 +198,6 @@ public:
return stressTensorScalarProduct_;
}
/**
* \brief Here is a list of the background coefficients that are called in the Komega Model
*/
//! \brief Returns the \$f \alpha \$f value
const Scalar alpha() const
{
......@@ -250,8 +246,8 @@ public:
protected:
Dune::FieldVector<Scalar,2> dofPosition_;
Scalar betaOmega_;
Scalar dynamicEddyViscosity_;
Scalar eddyDiffusivity_;
Scalar dynamicEddyViscosity_;
Scalar dissipation_;
Scalar turbulentKineticEnergy_;
Scalar storedDissipation_;
......
......@@ -124,10 +124,10 @@ class PipeLauferProblem : public ZeroEqProblem<TypeTag>
using Element = typename FVGridGeometry::GridView::template Codim<0>::Entity;
using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
using SubControlVolume = typename FVElementGeometry::SubControlVolume;
using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
using TimeLoopPtr = std::shared_ptr<CheckPointTimeLoop<Scalar>>;
static const unsigned int phaseIdx = GET_PROP_VALUE(TypeTag, PhaseIdx);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment