Bran
Forum Replies Created
-
AuthorPosts
-
BranParticipant
It is not a regular cylinder, but an irregular shape, can openlb do this?
BranParticipantHow can I generate this hump with indicator? For inclined channel, also with indicators?
BranParticipantDo you mean doing these steps? It will make the whole domain become
material
0.STLreader<T> Hump("Hump.stl", converter.getConversionFactorLength(), 1, 1); IndicatorLayer3D<T> extendedDomain(Hump, converter.getConversionFactorLength()); CuboidGeometry3D<T> cuboidGeometry(extendedDomain, converter.getPhysDeltaX(), noOfCuboids); cuboidGeometry.setPeriodicity(true, false, true); HeuristicLoadBalancer<T> loadBalancer(cuboidGeometry); SuperGeometry<T,3> superGeometry(cuboidGeometry, loadBalancer); prepareGeometry(superGeometry, extendedDomain, Hump, converter);
void prepareGeometry(SuperGeometry<T,3>& superGeometry, IndicatorF3D<T>& extendedDomain, STLreader<T>& Hump, UnitConverter<T,DESCRIPTOR> const& converter) { OstreamManager clout(std::cout,"prepareGeometry"); clout << "Prepare Geometry ..." << std::endl; superGeometry.rename(0,2,extendedDomain); superGeometry.rename(1,2,Hump); superGeometry.clean(); superGeometry.innerClean(); superGeometry.checkForErrors(); superGeometry.print(); clout << "Prepare Geometry ... OK" << std::endl; }
This is how my stlfile looks like.
- This reply was modified 3 weeks, 1 day ago by Bran.
BranParticipantThank you.
I didn’t make it. Could you please give an example so that I can learn how to do this right? I kind of can’t understand how thediscreteNormal
was calculated. I also tried inclined channel, the same problem appears. It seems that if there are more than one layer geometry whosematerial
are 0 around the boundary, then thedicreteNormal
won’t be set properly.
BranParticipantStill doesn’t work, only this part, can’t be setWallfunctionboundary.
Following is how I create the geometry:STLreader<T> Hump( "Hump.stl", converter.getConversionFactorLength(), 1, 1); CuboidGeometry3D<T> cuboidGeometry(Hump, converter.getPhysDeltaX(), noOfCuboids); cuboidGeometry.setPeriodicity(true, false, true); HeuristicLoadBalancer<T> loadBalancer(cuboidGeometry); SuperGeometry<T,3> superGeometry(cuboidGeometry, loadBalancer); prepareGeometry(superGeometry, Hump, converter);
void prepareGeometry(SuperGeometry<T,3>& superGeometry, IndicatorF3D<T>& Hump, UnitConverter<T,DESCRIPTOR> const& converter) { OstreamManager clout(std::cout,"prepareGeometry"); clout << "Prepare Geometry ..." << std::endl; superGeometry.rename(0,2,Hump); superGeometry.rename(2,1,{0,1,0}); superGeometry.clean(); superGeometry.innerClean(); superGeometry.checkForErrors(); superGeometry.print(); olb::Vector<T, 3> PhyMax = superGeometry.getStatistics().getMaxPhysR(2); olb::Vector<T, 3> PhyMin = superGeometry.getStatistics().getMinPhysR(2); clout << "Dimension of the channel in meters: x = " << PhyMax[0] - PhyMin[0]; clout << " ; y = " << PhyMax[1] - PhyMin[1]; clout << " ; z = " << PhyMax[2] - PhyMin[2] << std::endl; clout << "Prepare Geometry ... OK" << std::endl; }
- This reply was modified 3 weeks, 6 days ago by Bran.
BranParticipantThanks for your reply. I did so, but it doesn’t work. I mainly follow the channel3d case to do so, except I changed the geometry and I also set the
wallFunctionParam.curved = true
.
I don’t think it is the wall model parameters problem. It just can’t calculate the discreteNormal, I don’t know how to solve this problem.BranParticipantThis is how I set the environment variables:
export PATH=/usr/local/cuda-11.8/bin:$PATH export LD_LIBRARY_PATH=/usr/local/cuda-11.8/lib64:$LD_LIBRARY_PATH
BranParticipantDanke! 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?
BranParticipantI 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.BranParticipantDank!
Thanks to your advice, I did it.BranParticipantDanke!
I still have a question. In the paper–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, the u_tau you guys used to plot, is it the DNS value(0.05), or the value you calculated? If I use the DNS values, my results look fine. But if I used the u_tau I calculated, my results are not good. -
AuthorPosts