CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Calculation of friction velocity and yPlus for laminar flow

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

Like Tree3Likes
  • 3 Post By jaswi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 8, 2010, 13:34
Default Calculation of friction velocity and yPlus for laminar flow
  #1
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 18
jaswi is on a distinguished road
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<wallFvPatch>(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
beatlejuice, Aaron_L and Gang Wang like this.
jaswi is offline   Reply With Quote

Old   September 13, 2010, 08:41
Default
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 18
jaswi is on a distinguished road
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
jaswi is offline   Reply With Quote

Old   October 7, 2010, 07:19
Default
  #3
Senior Member
 
Francois
Join Date: Jun 2010
Posts: 107
Rep Power: 20
Fransje will become famous soon enough
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
Fransje is offline   Reply With Quote

Old   March 6, 2014, 17:38
Default
  #4
Member
 
CHARLES
Join Date: May 2013
Posts: 46
Rep Power: 12
CHARLES is on a distinguished road
I found a useful solution here:

http://www.cfd-online.com/Forums/ope...estcase-4.html
CHARLES is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
yplus value in two phase flow P.R.Naren FLUENT 0 September 5, 2006 02:10


All times are GMT -4. The time now is 00:11.