Commit 573bfbc1 authored by Ned Coltman's avatar Ned Coltman
Browse files

[test][turbulencemodels] add convenience function to write out name of turbulence model

parent bcbea1ca
......@@ -46,6 +46,25 @@ namespace Dumux {
return 2;
}
/**
* \brief return the name of the Turbulence Model
*/
std::string turbulenceModelToString(TurbulenceModel turbulenceModel)
{
switch (turbulenceModel)
{
case TurbulenceModel::zeroeq: return "ZeroEq";
case TurbulenceModel::oneeq: return "OneEq";
case TurbulenceModel::lowrekepsilon: return "LowReKEpsilon";
case TurbulenceModel::kepsilon: return "KEpsilon";
case TurbulenceModel::komega: return "KOmega";
case TurbulenceModel::none: return "No_TurbModel";
default: return "Invalid"; // should never be reached
}
}
} // end namespace Dumux
#endif
......@@ -163,6 +163,9 @@ public:
initializationTime_ = getParam<Scalar>("TimeLoop.Initialization", 1.0);
else
initializationTime_ = getParam<Scalar>("TimeLoop.Initialization", -1.0);
turbulenceModelName_ = turbulenceModelToString(ModelTraits::turbulenceModel());
std::cout << "Using the "<< turbulenceModelName_ << " Turbulence Model. \n";
std::cout << std::endl;
}
......@@ -521,6 +524,7 @@ private:
Scalar viscosityTilde_;
Scalar turbulentKineticEnergy_;
Scalar dissipation_;
std::string turbulenceModelName_;
TimeLoopPtr timeLoop_;
};
} // end namespace Dumux
......
......@@ -166,7 +166,9 @@ public:
dissipation_ = turbulenceProperties.dissipationRate(inletVelocity_, diameter, kinematicViscosity);
else
dissipation_ = turbulenceProperties.dissipation(inletVelocity_, diameter, kinematicViscosity);
turbulenceModelName_ = turbulenceModelToString(ModelTraits::turbulenceModel());
std::cout << "Using the "<< turbulenceModelName_ << " Turbulence Model. \n";
std::cout << std::endl;
}
/*!
......@@ -544,6 +546,7 @@ private:
Scalar turbulentKineticEnergy_;
Scalar dissipation_;
TimeLoopPtr timeLoop_;
std::string turbulenceModelName_;
};
} // end namespace Dumux
......
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