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

How to implement the wall function as a source term in the momentum equa?

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 26, 2020, 15:48
Question How to implement the wall function as a source term in the momentum equa?
  #1
Senior Member
 
kimy
Join Date: Mar 2019
Location: https://t.me/pump_upp
Posts: 164
Rep Power: 7
qi.yang@polimi.it is on a distinguished road
Send a message via ICQ to qi.yang@polimi.it Send a message via AIM to qi.yang@polimi.it Send a message via Yahoo to qi.yang@polimi.it
Hi guys,

I discovered the following information from the site:
https://www.cfd-online.com/Wiki/Two_...bulence_models


There are two[1] possible ways of implementing wall functions in a finite volume code:

Additional source term in the momentum equations.
Modification of turbulent viscosity in cells adjacent to solid walls.
The source term in the first approach is simply the difference between logarithmic and linear interpolation of velocity gradient multiplied by viscosity (the difference between shear stresses).
The second approach does not attempt to reproduce the correct velocity gradient. Instead, turbulent viscosity is modified in such a way as to guarantee the correct shear stress.


By default, the wall function is applied in the boundary condition of nut, epsilon and k at the wall. Now I am using the twophaseeulerfoam and I need to add the wall shear stress induced by the solid phase (I won't use KTGF). Thus, I am thinking the first way to implement the extra source term in the momentum equation for solid phase (as the attachments shown). However, I have not find any reference about this aspect. Who can give me some hits? Thanks.
Attached Images
File Type: jpg Picture1.jpg (6.2 KB, 29 views)
File Type: jpg Picture2.jpg (2.8 KB, 7 views)
qi.yang@polimi.it is offline   Reply With Quote

Old   February 28, 2020, 07:29
Default
  #2
Senior Member
 
kimy
Join Date: Mar 2019
Location: https://t.me/pump_upp
Posts: 164
Rep Power: 7
qi.yang@polimi.it is on a distinguished road
Send a message via ICQ to qi.yang@polimi.it Send a message via AIM to qi.yang@polimi.it Send a message via Yahoo to qi.yang@polimi.it
I am testing the following codes however it is now not compiled successfully. I added the source term into the momentum equation and it shows that patchi, boundaryFields, internalField are not declared in this scope. Therefore, how can I get access the velocity at the wall and the first grid center in the main solver code?
{
E=9.8;
mybeta=1.0;
kappa=0.41;
mu1=phase2.turbulence().mu()*(2.5/mybeta*(1/pow(1-alpha1,2.5)-1)-alpha2)/alpha1
y=phase2.turbulence().y()[patchi]
Res=rho1*U1.component(2).boundaryField()[patchi].patchInternalField()*y[facei]/mu1

scalar st = 1/Res;

for (int i=0; i<10; i++)
{
st = sqr(kappa)/Log(E*Res*sqrt(st));
}

return st;

//Source term
Taus=alpha1*rho1*st*(U1.component(2).boundaryField ()[patchi].patchInternalField())
*(U1.boundaryField()[patchi].patchInternalField() - U1.boundaryField()[patchi])

}
qi.yang@polimi.it is offline   Reply With Quote

Reply

Tags
twophaseeuelrfoam, wall shear stress, wallfunction

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
[Other] Tabulated thermophysicalProperties library chriss85 OpenFOAM Community Contributions 62 October 2, 2022 04:50
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 04:30
centOS 5.6 : paraFoam not working yossi OpenFOAM Installation 2 October 9, 2013 02:41
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 12:44
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08


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