|
[Sponsors] |
muSgsWallFunctionFvPatchField, explanations or bug ? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 22, 2010, 15:19 |
muSgsWallFunctionFvPatchField, explanations or bug ?
|
#1 |
Member
Francois Gallard
Join Date: Mar 2010
Location: Toulouse, France
Posts: 44
Rep Power: 16 |
Hi Foamers,
I had a look at the muSgsWallFunctionFvPatchField implementation in order to know which kind of model was used. I am confused about what I found as I think that many formula are not homogeneous, but that could be due to my lack of knowledge of OpenFoam. Also, could anybody tell me where this formulation comes from ? Code:
void muSgsWallFunctionFvPatchScalarField::evaluate ( const Pstream::commsTypes ) { const scalarField& ry = patch().deltaCoeffs(); const fvPatchVectorField& U = patch().lookupPatchField<volVectorField, vector>(UName_); scalarField magUp = mag(U.patchInternalField() - U); const scalarField& muw = patch().lookupPatchField<volScalarField, scalar>(muName_); const scalarField& rhow = patch().lookupPatchField<volScalarField, scalar>(rhoName_); scalarField& muSgsw = *this; scalarField magFaceGradU = mag(U.snGrad()); forAll(muSgsw, facei) { scalar magUpara = magUp[facei]; scalar utau = sqrt((muSgsw[facei] + muw[facei])*magFaceGradU[facei]/rhow[facei]); if (utau > 0) { int iter = 0; scalar err = GREAT; do { scalar kUu = kappa_*magUpara/utau; scalar fkUu = exp(kUu) - 1 - kUu*(1 + 0.5*kUu); scalar f = - utau/(ry[facei]*muw[facei]/rhow[facei]) + magUpara/utau + 1/E_*(fkUu - 1.0/6.0*kUu*sqr(kUu)); scalar df = - 1.0/(ry[facei]*muw[facei]/rhow[facei]) - magUpara/sqr(utau) - 1/E_*kUu*fkUu/utau; scalar utauNew = utau - f/df; err = mag((utau - utauNew)/utau); utau = utauNew; } while (utau > VSMALL && err > 0.01 && ++iter < 10); muSgsw[facei] = max ( rhow[facei]*sqr(utau)/magFaceGradU[facei] - muw[facei], 0.0 ); } else { muSgsw[facei] = 0; } } } First, if the uTau should be corrected and computed iteratively, why does this loop does not include the updated muSgs as it is used to compute utau ? Then the following formulas seems not homogeneous: Code:
scalar f = - utau/(ry[facei]*muw[facei]/rhow[facei]) + magUpara/utau + 1/E_*(fkUu - 1.0/6.0*kUu*sqr(kUu)); utau/(ry[facei]*muw[facei]/rhow[facei]) ~ m.s-1/(m.m2.s-1) ~ m-2 magUpara/utau ~ 1 1/E_*(fkUu - 1.0/6.0*kUu*sqr(kUu)) ~ 1 So the first term seems not to be exact. Then Code:
scalar df = - 1.0/(ry[facei]*muw[facei]/rhow[facei]) - magUpara/sqr(utau) - 1/E_*kUu*fkUu/utau; - magUpara/sqr(utau) ~ 1 - 1/E_*kUu*fkUu/utau; ~ m.s-1 Also, could anybody tell me what these terms mean ? Finally Code:
muSgsw[facei] = max ( rhow[facei]*sqr(utau)/magFaceGradU[facei] - muw[facei], 0.0 ); which is not a dynamic viscosity in : kg.m-1.s-1 Thanks in advance for any comment. Francois |
|
Tags |
wall function |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Serious bug in LES interface | fs82 | OpenFOAM Bugs | 21 | November 16, 2009 09:15 |
On Bug of Fluent 12.0 | lzgwhy | FLUENT | 0 | August 26, 2009 07:41 |
Bug in twoPhaseEulerFoam wallfunctions | alberto | OpenFOAM Bugs | 1 | February 9, 2007 15:15 |
Bug reports | Mattijs Janssens (Mattijs) | OpenFOAM | 0 | January 10, 2005 11:05 |
Forum y2k Bug | Jonas Larsson | Main CFD Forum | 1 | January 5, 2000 11:22 |