Modify taueff
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Modify taueff
- This topic has 6 replies, 2 voices, and was last updated 5 days, 4 hours ago by FBukreev.
-
AuthorPosts
-
September 26, 2024 at 5:02 am #9292BranParticipant
Hi developers!
For example in Channel3d, I want to apply the Van-Driest function to the second layer which is the layer above the boundary layer. How can I do this?
I tried create three materials, but in this case, it reports that Could not setWallFunctionBoundary.
There are partial code, cuboid1 is the fluid area:superGeometry.rename(0,3,cuboid1); superGeometry.rename(3,2,{0,0,1}); superGeometry.rename(2,1,{0,0,1}); // superGeometry.clean(); superGeometry.innerClean(); superGeometry.checkForErrors(); /// Material=1 -->bulk dynamics sLattice.defineDynamics<SmagorinskyForcedBGKdynamics>(superGeometry, 1); sLattice.defineDynamics<ExternalTauEffLESForcedBGKdynamics>(superGeometry, 2); /// Material = 2 --> boundary node + wallfunction sLattice.defineDynamics<ExternalTauEffLESForcedBGKdynamics>(superGeometry, 3); setWallFunctionBoundary<T,DESCRIPTOR>(sLattice, superGeometry, 3, converter, wallFunctionParam);
September 27, 2024 at 4:42 pm #9300FBukreevKeymasterHi,
for the VanDriest damping you need to calculate wall shear rate und tangential velocity derivative in the normal direction also in the the next layer. It is actually only possible if you change the source code of the wall function setter. So that it does not change the LBM populations but only adjusts the viscosity. Practically you can copy wall function code and delete there setting of the populations. Also in the setter of the wall function you can say that a new postprocessor is added to the second layer from wall and not in the first one. In that case you do not need addition material number.
September 28, 2024 at 12:46 pm #9301BranParticipantDank!
Thanks to your advice, I did it.September 29, 2024 at 4:16 am #9302BranParticipantI still have a question to ask. I am trying to reporduce the results you guys published on Large-eddy simulation coupled with wall models for turbulent channel flows at high Reynolds numbers with a lattice Boltzmann method — Application to Coriolis mass flowmeter. And the following are part of my results. I have put the image URL below. I am having trouble with dealing the N=40 situation. I can’t get it right. I use the u_tau=0.05 from DNS to normalize the velocity profile. For spatial average, I used whole field instead of using a line in your paper. For temporal averge, I simply used the functions in SuperLatticeTimeAveraged3D. Buy the way, I think there seems to be an error in SuperLatticeTimeAveragedCrossCorrelationF3D.
This is the origin code:
output[iDim] = _sDataMN.getBlock(iCloc).get(input+1,iDim)-_sDataM.getBlock(iCloc).get(input+1,iDimM) *_sDataN.getBlock(iCloc).get(input+1,iDimN)/_ensembles/_ensembles;
I change to:
output[iDim] = (_sDataMN.getBlock(iCloc).get(input+1,iDim)-_sDataM.getBlock(iCloc).get(input+1,iDimM) *_sDataN.getBlock(iCloc).get(input+1,iDimN)/_ensembles)/_ensembles;
These are the u_tau I got. When N=10, it’s good. I also tested N=20, it’s also great. I know when the first point loacts in the buffer layer, things will get tricky. But for N=40, the u_tau I got are too small, and the velocity are large. I checked Netwon’s method, it acts fine.
But in your paper, the results seems, at least, not bad. So how you guys did it? How can I improve my results. It’s really important for me. It will be appreciated very much if you guys can teach me to solve my problem. Thank you.
Musker(N=10): u_tau = 0.046746047117067945
Power-law(N=10): u_tau = 0.04784589543819295
Musker(N=40): u_tau = 0.025056878722764415
Power-law(N=40): u_tau = 0.02708617517323956
Best regards.September 29, 2024 at 8:46 am #9303FBukreevKeymasterFor the resolution of 40 you can try the following setup of the channel example:
const T latticeWallDistance = 0.5; // lattice distance to boundary const int rhoMethod = 1; // method for density reconstruction const int fneqMethod = 1; // method for fneq reconstruction const int wallProfile = 0; // wallfunction profile
and for the converter you can use relaxation time of 0.50025 and Smagorinsky constant of 0.18. In that case it should be stable and more correct.
If you have interest to cooperate in terms of wall model in LBM please write on info@openlb.net
Best regards- This reply was modified 1 week ago by FBukreev.
September 30, 2024 at 3:23 am #9309BranParticipantDanke! It is really helpful!!! I changed the rhoMethod from Zou-He to extrapolation. The results get much better. Can I use the wallFunctionBoundaryPostProcessor to the inclined flat plate or bump-in-channel? Is this achievable in OpenLB?
October 1, 2024 at 8:46 am #9313FBukreevKeymasteryes, it schould also work. If you have complex geometry then switch the setting curvedBoundary on.
-
AuthorPosts
- You must be logged in to reply to this topic.