|
[Sponsors] |
How to implement the wall function as a source term in the momentum equa? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 26, 2020, 15:48 |
How to implement the wall function as a source term in the momentum equa?
|
#1 |
Senior Member
|
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. |
|
February 28, 2020, 07:29 |
|
#2 |
Senior Member
|
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]) } |
|
Tags |
twophaseeuelrfoam, wall shear stress, wallfunction |
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 |