mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'gitlab-issues.kbc' into 'develop'
ENH: prevent natural-logarithm domain errors in nut wall functions See merge request Development/openfoam!371
This commit is contained in:
@ -66,7 +66,8 @@ Foam::nutUWallFunctionFvPatchScalarField::calcNut() const
|
|||||||
|
|
||||||
// Inertial sublayer contribution
|
// Inertial sublayer contribution
|
||||||
const scalar nutLog =
|
const scalar nutLog =
|
||||||
nuw[facei]*(yPlus[facei]*kappa_/log(E_*yPlus[facei]) - 1.0);
|
nuw[facei]
|
||||||
|
*(yPlus[facei]*kappa_/log(max(E_*yPlus[facei], 1 + 1e-4)) - 1.0);
|
||||||
|
|
||||||
nutw[facei] = blend(nutVis, nutLog, yPlus[facei]);
|
nutw[facei] = blend(nutVis, nutLog, yPlus[facei]);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -180,8 +180,11 @@ Foam::nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField
|
|||||||
),
|
),
|
||||||
UName_(dict.getOrDefault<word>("U", word::null)),
|
UName_(dict.getOrDefault<word>("U", word::null)),
|
||||||
Cmu_(dict.getOrDefault<scalar>("Cmu", 0.09)),
|
Cmu_(dict.getOrDefault<scalar>("Cmu", 0.09)),
|
||||||
kappa_(dict.getOrDefault<scalar>("kappa", 0.41)),
|
kappa_
|
||||||
E_(dict.getOrDefault<scalar>("E", 9.8)),
|
(
|
||||||
|
dict.getCheckOrDefault<scalar>("kappa", 0.41, scalarMinMax::ge(SMALL))
|
||||||
|
),
|
||||||
|
E_(dict.getCheckOrDefault<scalar>("E", 9.8, scalarMinMax::ge(SMALL))),
|
||||||
yPlusLam_(yPlusLam(kappa_, E_))
|
yPlusLam_(yPlusLam(kappa_, E_))
|
||||||
{
|
{
|
||||||
checkType();
|
checkType();
|
||||||
|
|||||||
@ -71,7 +71,8 @@ calcNut() const
|
|||||||
const scalar nutVis = 0.0;
|
const scalar nutVis = 0.0;
|
||||||
|
|
||||||
// Inertial sublayer contribution
|
// Inertial sublayer contribution
|
||||||
const scalar nutLog = nuw[facei]*(yPlus*kappa_/log(E_*yPlus) - 1.0);
|
const scalar nutLog =
|
||||||
|
nuw[facei]*(yPlus*kappa_/log(max(E_*yPlus, 1 + 1e-4)) - 1.0);
|
||||||
|
|
||||||
nutw[facei] = blend(nutVis, nutLog, yPlus);
|
nutw[facei] = blend(nutVis, nutLog, yPlus);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user