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

how to calculate Cf inside a wall function

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 15, 2011, 20:02
Default how to calculate Cf inside a wall function
  #1
Senior Member
 
aerothermal's Avatar
 
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 120
Rep Power: 16
aerothermal is on a distinguished road
Send a message via Skype™ to aerothermal
Dear foamers,

Could you tell me how to calculate Cf (friction coefficient) inside a wall function like alphatWallFunctionFvPatchScalarField.C ?

I already have yPlus, rho and uStar=Cmu^(0.25)*k^(0.5).

Code:
    forAll(mutw, faceI)
    {
        label faceCellI = patch().faceCells()[faceI];
	scalar pr = muw[faceI]/alphaw[faceI];
        scalar uStar = Cmu25*sqrt(k[faceCellI]);
        scalar KsPlus = uStar*Ks/(muw[faceI]/rhow[faceI]);
....
    }
Since uStar is approx. uTau=sqrt(tau/rho) for equilibrium boundary layers, now I need a boundary-layer edge velocity Ue.

In order to be more accurate, can I calculate uTau with lines below?

Code:
    const fvPatchVectorField& U =
        patch().lookupPatchField<volVectorField, vector>("U");    	
    scalarField magFaceGradU = mag(U.snGrad());
and inside loop of mutw in all faceI
Code:
        scalar utau =
            sqrt((mutw[faceI] + muw[faceI])*magFaceGradU[faceI]/rhow[faceI]);
I see two options but they are not easy for me yet since it is my first development with OF:

1) I know that I can recalculate the uPlus with yPlus to get sqrt(Cf/2), since uPlus=1/sqrt(Cf/2)

2) If I use the other definition of uPlus, the problem will be to know Ue in order to find Cf=tau/(0.5*Ue*Ue*rho).
uPlus= Up*Cmu^(0.25)*k^(0.5)/(tau/rho)
Even I adopt such calculation, how to get value of Up? Is it simply U[faceI]?

I would like to know whether or not there is an easier way. Are the methods above acceptable? Are they correct in programming?

Regards,

aerothermal

Last edited by aerothermal; February 15, 2011 at 20:38.
aerothermal is offline   Reply With Quote

Old   July 15, 2011, 12:59
Default
  #2
Senior Member
 
aerothermal's Avatar
 
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 120
Rep Power: 16
aerothermal is on a distinguished road
Send a message via Skype™ to aerothermal
No clues on that?
aerothermal is offline   Reply With Quote

Reply


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
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 10:31
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 13:21
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 07:42
Question about wall function Gary Main CFD Forum 1 December 3, 2007 11:54
Quick Question - Wall Function D.Tandra Main CFD Forum 2 March 16, 2004 05:29


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