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

[rans] Move Prandtl and Schmidt numbers to problem on RANS level

parent 86ec3c85
No related branches found
No related tags found
1 merge request!1047Freeflow/wallfunctions for ncni
...@@ -371,6 +371,28 @@ public: ...@@ -371,6 +371,28 @@ public:
const Scalar karmanConstant() const const Scalar karmanConstant() const
{ return 0.41; } { return 0.41; }
/*!
* \brief Return the turbulent Prandtl number \f$ [-] \f$ which is used to convert
* the eddy viscosity to an eddy thermal conductivity
*/
Scalar turbulentPrandtlNumber() const
{
static const Scalar turbulentPrandtlNumber
= getParamFromGroup<Scalar>(this->paramGroup(), "RANS.TurbulentPrandtlNumber", 1.0);
return turbulentPrandtlNumber;
}
/*!
* \brief Return the turbulent Schmidt number \f$ [-] \f$ which is used to convert
* the eddy viscosity to an eddy diffusivity
*/
Scalar turbulentSchmidtNumber() const
{
static const Scalar turbulentSchmidtNumber
= getParamFromGroup<Scalar>(this->paramGroup(), "RANS.TurbulentSchmidtNumber", 1.0);
return turbulentSchmidtNumber;
}
public: public:
std::vector<unsigned int> wallElementID_; std::vector<unsigned int> wallElementID_;
std::vector<Scalar> wallDistance_; std::vector<Scalar> wallDistance_;
......
...@@ -155,10 +155,8 @@ public: ...@@ -155,10 +155,8 @@ public:
template<class Problem> template<class Problem>
void calculateEddyDiffusivity(const Problem& problem) void calculateEddyDiffusivity(const Problem& problem)
{ {
static const auto turbulentSchmidtNumber eddyDiffusivity_ = RANSParentType::kinematicEddyViscosity()
= getParamFromGroup<Scalar>(problem.paramGroup(), / problem.turbulentSchmidtNumber();
"RANS.TurbulentSchmidtNumber", 1.0);
eddyDiffusivity_ = RANSParentType::kinematicEddyViscosity() / turbulentSchmidtNumber;
} }
/*! /*!
......
...@@ -161,10 +161,8 @@ public: ...@@ -161,10 +161,8 @@ public:
template<class Problem> template<class Problem>
void calculateEddyDiffusivity(const Problem& problem) void calculateEddyDiffusivity(const Problem& problem)
{ {
static const auto turbulentSchmidtNumber eddyDiffusivity_ = RANSParentType::kinematicEddyViscosity()
= getParamFromGroup<Scalar>(problem.paramGroup(), / problem.turbulentSchmidtNumber();
"RANS.TurbulentSchmidtNumber", 1.0);
eddyDiffusivity_ = RANSParentType::kinematicEddyViscosity() / turbulentSchmidtNumber;
} }
/*! /*!
......
...@@ -144,10 +144,8 @@ public: ...@@ -144,10 +144,8 @@ public:
template<class Problem> template<class Problem>
void calculateEddyDiffusivity(const Problem& problem) void calculateEddyDiffusivity(const Problem& problem)
{ {
static const auto turbulentSchmidtNumber eddyDiffusivity_ = RANSParentType::kinematicEddyViscosity()
= getParamFromGroup<Scalar>(problem.paramGroup(), / problem.turbulentSchmidtNumber();
"RANS.TurbulentSchmidtNumber", 1.0);
eddyDiffusivity_ = RANSParentType::kinematicEddyViscosity() / turbulentSchmidtNumber;
} }
/*! /*!
......
...@@ -215,14 +215,10 @@ public: ...@@ -215,14 +215,10 @@ public:
template<class Problem> template<class Problem>
void calculateEddyThermalConductivity(const Problem& problem) void calculateEddyThermalConductivity(const Problem& problem)
{ {
static const auto turbulentPrandtlNumber
= getParamFromGroup<Scalar>(problem.paramGroup(),
"RANS.TurbulentPrandtlNumber", 1.0);
eddyThermalConductivity_ = ParentType::kinematicEddyViscosity() eddyThermalConductivity_ = ParentType::kinematicEddyViscosity()
* ParentType::asImp_().density() * ParentType::asImp_().density()
* ParentType::asImp_().heatCapacity() * ParentType::asImp_().heatCapacity()
/ turbulentPrandtlNumber; / problem.turbulentPrandtlNumber();
} }
/*! /*!
......
...@@ -183,10 +183,8 @@ public: ...@@ -183,10 +183,8 @@ public:
template<class Problem> template<class Problem>
void calculateEddyDiffusivity(const Problem& problem) void calculateEddyDiffusivity(const Problem& problem)
{ {
static const auto turbulentSchmidtNumber eddyDiffusivity_ = RANSParentType::kinematicEddyViscosity()
= getParamFromGroup<Scalar>(problem.paramGroup(), / problem.turbulentSchmidtNumber();
"RANS.TurbulentSchmidtNumber", 1.0);
eddyDiffusivity_ = RANSParentType::kinematicEddyViscosity() / turbulentSchmidtNumber;
} }
/*! /*!
......
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