CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Calculation of friction velocity and yPlus for laminar flow (https://www.cfd-online.com/Forums/openfoam-solving/79930-calculation-friction-velocity-yplus-laminar-flow.html)

 jaswi September 8, 2010 13:34

Calculation of friction velocity and yPlus for laminar flow

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::AUTO_WRITE
),
mesh,
dimensionedScalar
(
"U_tau", U.dimensions(), scalar(0.0)
)
);

forAll(U_tau.boundaryField(), patchi)
{
U_tau.boundaryField()[patchi] =
}

volScalarField yPlus
(
IOobject
(
"yPlus",
runTime.timeName(),
mesh,
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

 jaswi September 13, 2010 08:41

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

 Fransje October 7, 2010 07:19

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

 CHARLES March 6, 2014 18:38

I found a useful solution here:

http://www.cfd-online.com/Forums/ope...estcase-4.html

 All times are GMT -4. The time now is 15:03.