Skip to content
Snippets Groups Projects
Commit 8c424561 authored by Michael Alletto's avatar Michael Alletto Committed by Kutalmış Berçin
Browse files

BUG: nutUBlendedWallFunction: avoid pressure spikes (fixes #2299)

parent 4e409a5a
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2016-2020 OpenCFD Ltd. Copyright (C) 2016-2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -103,7 +103,8 @@ Foam::nutUBlendedWallFunctionFvPatchScalarField::calcUTau ...@@ -103,7 +103,8 @@ Foam::nutUBlendedWallFunctionFvPatchScalarField::calcUTau
{ {
const scalar yPlus = y[facei]*ut/nuw[facei]; const scalar yPlus = y[facei]*ut/nuw[facei];
const scalar uTauVis = magUp[facei]/yPlus; const scalar uTauVis = magUp[facei]/yPlus;
const scalar uTauLog = kappa_*magUp[facei]/log(E_*yPlus); const scalar uTauLog =
kappa_*magUp[facei]/log(max(E_*yPlus, 1 + 1e-4));
const scalar utNew = const scalar utNew =
pow(pow(uTauVis, n_) + pow(uTauLog, n_), 1.0/n_); pow(pow(uTauVis, n_) + pow(uTauLog, n_), 1.0/n_);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment