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

Add asking for boundary layer models parameters.

parent f1f5e0f3
Branches 1094-search-and-remove-deprecated-stuff
No related tags found
2 merge requests!31Feature/colebrookwhiteboundarylayer,!30Feature/colebrookwhiteboundarylayer
...@@ -137,6 +137,11 @@ public: ...@@ -137,6 +137,11 @@ public:
// application is bounded to specific roughness length // application is bounded to specific roughness length
assert (1e-6 < roughnessLength_ / distance_ && roughnessLength_ / distance_ < 1e-2); assert (1e-6 < roughnessLength_ / distance_ && roughnessLength_ / distance_ < 1e-2);
Scalar cf = std::pow(1.89 - 1.62 * std::log10(roughnessLength_ / distance_), -2.5); Scalar cf = std::pow(1.89 - 1.62 * std::log10(roughnessLength_ / distance_), -2.5);
// application is bounded to rough cases, indicated by the line in the chart in Truckenbrodt
// NOTE: disabling the assertion assumes that the cf of the hydrodynamically
// rough region is a good approximation of the cf in the hydrodynamically
// smooth case
assert (130.0e-3 * std::pow(reynoldsX, -0.1872) < cf);
return yPlus_ * distance_ / (reynoldsX * std::sqrt(cf / 2.0)); return yPlus_ * distance_ / (reynoldsX * std::sqrt(cf / 2.0));
} }
// turbulent, rough: viscous sublayer thickness via friction coefficient // turbulent, rough: viscous sublayer thickness via friction coefficient
......
...@@ -247,6 +247,13 @@ public: ...@@ -247,6 +247,13 @@ public:
const Scalar distance = globalPos1[0] + GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, BoundaryLayer, Offset); const Scalar distance = globalPos1[0] + GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, BoundaryLayer, Offset);
const Scalar kinematicViscosity = cParams.elemVolVarsCur1[vertInElem2].kinematicViscosity(); const Scalar kinematicViscosity = cParams.elemVolVarsCur1[vertInElem2].kinematicViscosity();
BoundaryLayerModel<TypeTag> boundaryLayerModel(velocity, distance, kinematicViscosity, blModel); BoundaryLayerModel<TypeTag> boundaryLayerModel(velocity, distance, kinematicViscosity, blModel);
if (blModel == 1)
boundaryLayerModel.setConstThickness(GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, BoundaryLayer, ConstThickness));
if (blModel >= 4)
boundaryLayerModel.setYPlus(GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, BoundaryLayer, YPlus));
if (blModel >= 5)
boundaryLayerModel.setRoughnessLength(GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, BoundaryLayer, RoughnessLength));
normalMoleFracGrad /= boundaryLayerModel.massBoundaryLayerThickness(); normalMoleFracGrad /= boundaryLayerModel.massBoundaryLayerThickness();
Scalar diffusiveFlux = Scalar diffusiveFlux =
......
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