View Issue Details

IDProjectCategoryView StatusLast Update
0001852OpenFOAM[All Projects] Bugpublic2015-09-17 10:05
Reporterfabian_roeslerAssigned Tohenry 
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSCentOsOS Version6.5
Product Version 
Fixed in Version 
Summary0001852: Wrong corner weighting in epsilonLowReWallFunction
DescriptionThe corner weighting in the low Reynolds epsilon wall function is wrong.
The weights are stored in the variable w and the epsilon and G values per cell are multiplied with w. However, the summation of the different faces per cell is missing.

Active Code of OpenFOAM 2.4.x epsilonLowReWallFunctionFvPatchScalarField.C
***************************************************************************
00088 // Set epsilon and G
00089 forAll(nutw, faceI)
00090 {
00091 label cellI = patch.faceCells()[faceI];
00092
00093 scalar yPlus = Cmu25*sqrt(k[cellI])*y[faceI]/nuw[faceI];
00094
00095 scalar w = cornerWeights[faceI];
00096
00097 if (yPlus > yPlusLam_)
00098 {
00099 epsilon[cellI] = w*Cmu75*pow(k[cellI], 1.5)/(kappa_*y[faceI]);
00100 }
00101 else
00102 {
00103 epsilon[cellI] = w*2.0*k[cellI]*nuw[faceI]/sqr(y[faceI]);
00104 }
00105
00106 G[cellI] =
00107 w
00108 *(nutw[faceI] + nuw[faceI])
00109 *magGradUw[faceI]
00110 *Cmu25*sqrt(k[cellI])
00111 /(kappa_*y[faceI]);
00112 }
***************************************************************************

Necessary changes in epsilonLowReWallFunctionFvPatchScalarField.C
***************************************************************************
00088 // Set epsilon and G
00089 forAll(nutw, faceI)
00090 {
00091 label cellI = patch.faceCells()[faceI];
00092
00093 scalar yPlus = Cmu25*sqrt(k[cellI])*y[faceI]/nuw[faceI];
00094
00095 scalar w = cornerWeights[faceI];
00096
00097 if (yPlus > yPlusLam_)
00098 {
00099 epsilon[cellI] = w*Cmu75*pow(k[cellI], 1.5)/(kappa_*y[faceI]);
00100 }
00101 else
00102 {
00103 epsilon[cellI] += w*2.0*k[cellI]*nuw[faceI]/sqr(y[faceI]);
00104 }
00105
00106 G[cellI] +=
00107 w
00108 *(nutw[faceI] + nuw[faceI])
00109 *magGradUw[faceI]
00110 *Cmu25*sqrt(k[cellI])
00111 /(kappa_*y[faceI]);
00112 }
***************************************************************************

Only the two + in front of the = in row 103 and 106 are missing.

Cheers

Fabian
TagsNo tags attached.

Activities

fabian_roesler

2015-09-17 07:48

reporter   ~0005361

There is also a + missing in front of the = sign in line 99.
I missed that when writing the report.

henry

2015-09-17 10:04

manager   ~0005362

Thanks for the bug-report.
Resolved by commit 9bf69ecd0bb19deb1bdfa5d2bb7034b6559242ea

Note that the new version of this model in OpenFOAM-dev does not have the bug.

Issue History

Date Modified Username Field Change
2015-09-16 12:08 fabian_roesler New Issue
2015-09-17 07:48 fabian_roesler Note Added: 0005361
2015-09-17 10:04 henry Note Added: 0005362
2015-09-17 10:04 henry Status new => resolved
2015-09-17 10:04 henry Resolution open => fixed
2015-09-17 10:04 henry Assigned To => henry