From 240d144bd96e7a3ae50c33fb63bef57d93afbc76 Mon Sep 17 00:00:00 2001 From: Thomas Fetzer <thomas.fetzer@iws.uni-stuttgart.de> Date: Tue, 8 Dec 2015 15:07:23 +0100 Subject: [PATCH] Add asking for boundary layer models parameters. --- dumux/freeflow/boundarylayermodel.hh | 5 +++++ .../2cnistokes2p2cni/2cnistokes2p2cnilocaloperator.hh | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/dumux/freeflow/boundarylayermodel.hh b/dumux/freeflow/boundarylayermodel.hh index 17b982a705..2b30e5d694 100644 --- a/dumux/freeflow/boundarylayermodel.hh +++ b/dumux/freeflow/boundarylayermodel.hh @@ -137,6 +137,11 @@ public: // application is bounded to specific roughness length assert (1e-6 < roughnessLength_ / distance_ && roughnessLength_ / distance_ < 1e-2); 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)); } // turbulent, rough: viscous sublayer thickness via friction coefficient diff --git a/dumux/multidomain/2cnistokes2p2cni/2cnistokes2p2cnilocaloperator.hh b/dumux/multidomain/2cnistokes2p2cni/2cnistokes2p2cnilocaloperator.hh index b1f02be620..5a306abdbc 100644 --- a/dumux/multidomain/2cnistokes2p2cni/2cnistokes2p2cnilocaloperator.hh +++ b/dumux/multidomain/2cnistokes2p2cni/2cnistokes2p2cnilocaloperator.hh @@ -247,6 +247,13 @@ public: const Scalar distance = globalPos1[0] + GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, BoundaryLayer, Offset); const Scalar kinematicViscosity = cParams.elemVolVarsCur1[vertInElem2].kinematicViscosity(); 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(); Scalar diffusiveFlux = -- GitLab