# Calculation of friction velocity and yPlus for laminar flow

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

 September 8, 2010, 13:34 Calculation of friction velocity and yPlus for laminar flow #1 Senior Member   Join Date: Mar 2009 Posts: 248 Rep Power: 10 Dear Forum Users Good Evening I am calculating the friction velocity and yPlus like this: volScalarField U_tau ( IOobject ( "U_tau", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedScalar ( "U_tau", U.dimensions(), scalar(0.0) ) ); forAll(U_tau.boundaryField(), patchi) { U_tau.boundaryField()[patchi] = Foam::sqrt( nu.value() * mag(-U.boundaryField()[patchi].snGrad()) ); } volScalarField yPlus ( IOobject ( "yPlus", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ), mesh, dimensionedScalar("yPlus", dimless, 0.0) ); const fvPatchList& patches = U.mesh().boundary(); volScalarField::GeometricBoundaryField d = nearWallDist(mesh).y(); forAll(patches, patchi) { const fvPatch& currPatch = patches[patchi]; if (isA(currPatch)) { yPlus.boundaryField()[patchi] = ( (d[patchi] * mag(U_tau.boundaryField()[patchi])) / (nu.value() )); } } Info<< "Writing yPlus to field " << yPlus.name() << nl << endl; yPlus.write(); It would be very helpful if users could cross check and point out the mistakes. Best Regards jaswi

 September 13, 2010, 08:41 #2 Senior Member   Join Date: Mar 2009 Posts: 248 Rep Power: 10 Dear Forum Users Can somebody please cross check the formulation. After corrections , we all can use this as I have seen some similar posts. Hope some body with experience will find some time to comment . Best Regards jaswi

 October 7, 2010, 07:19 #3 Senior Member   Francois Join Date: Jun 2010 Posts: 107 Rep Power: 9 Hi there! I'm also programming a function to determine u_tau and yPlus, but for turbulent flows. What type of geometry are you working on? Regards, Francois

 March 6, 2014, 18:38 #4 Member   CHARLES Join Date: May 2013 Posts: 46 Rep Power: 5 I found a useful solution here: y+ and u+ values with low-Re RANS turbulence models: utility + testcase

 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