muSgsWallFunctionFvPatchField, explanations or bug ?

 Register Blogs Members List Search Today's Posts Mark Forums Read

 July 22, 2010, 14:19 muSgsWallFunctionFvPatchField, explanations or bug ? #1 Member   Francois Gallard Join Date: Mar 2010 Location: Edinburgh Posts: 39 Rep Power: 9 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(UName_); scalarField magUp = mag(U.patchInternalField() - U); const scalarField& muw = patch().lookupPatchField(muName_); const scalarField& rhow = patch().lookupPatchField(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; } } }``` I understand the code until the while loop. 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));``` If I am right ry is the delta of the LES filter so is in meters, so, with the convention that "~" means "is homogeneous to": 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;``` - 1.0/(ry[facei]*muw[facei]/rhow[facei]) ~1/(m.m2.s-1) ~ m-3.s-1 - 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 );``` rhow[facei]*sqr(utau)/magFaceGradU[facei]~kg.m-3.(m.s-1)**0.5/(m.s-1.m-1) ~ kg.m-2.5.s0.5 which is not a dynamic viscosity in : kg.m-1.s-1 Thanks in advance for any comment. Francois

 Tags wall function

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post fs82 OpenFOAM Bugs 21 November 16, 2009 09:15 lzgwhy FLUENT 0 August 26, 2009 06:41 alberto OpenFOAM Bugs 1 February 9, 2007 15:15 Mattijs Janssens (Mattijs) OpenFOAM 0 January 10, 2005 11:05 Jonas Larsson Main CFD Forum 1 January 5, 2000 11:22

All times are GMT -4. The time now is 09:57.