LBM turbulence
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › LBM turbulence
- This topic has 11 replies, 2 voices, and was last updated 1 year, 6 months ago by FBukreev.
-
AuthorPosts
-
February 20, 2023 at 1:23 pm #7210H.YuParticipant
Hello
I am trying to calculate aerodynamic performance using OpenLB.
I studied some examples. In the 3D cylindrical laminar flow example, I am trying to proceed with calculation by defining it as turbulent flow, but some problems occur.In the example of a 3D laminar flow cylinder, the result values such as pressure 1, pressure 2, pressure drop, drag force, and lift are not calculated as -nan.
I try to calculate by adjusting the physDeltaX and time step, but I can’t overcome -nan.
What methods can I try?
The code of the part defining the turbulence is also attached.
CODE : bulk dynamics = SmagorinskyBGKdynamics
// Material=1 –>bulk dynamics
sLattice.defineDynamics<BulkDynamics>(superGeometry, 1);// Material=2 –>bounce back
sLattice.defineDynamics<BounceBack>(superGeometry, 2);// Setting of the boundary conditions
//setLocalVelocityBoundary(sLattice, omega, superGeometry, 3);
//setLocalPressureBoundary(sLattice, omega, superGeometry, 4);//inlet
sLattice.defineDynamics<BulkDynamics>(superGeometry, 3);
setInterpolatedVelocityBoundary<T,DESCRIPTOR>(sLattice, omega, superGeometry, 3);
//outlet
sLattice.defineDynamics<BulkDynamics>(superGeometry.getMaterialIndicator({4}));
setInterpolatedPressureBoundary<T,DESCRIPTOR>(sLattice, omega, superGeometry.getMaterialIndicator({4}));
//setInterpolatedPressureBoundary(sLattice, omega, superGeometry, 4);// Material=5 –>bouzidi / bounce back
//airfoil
#ifdef BOUZIDI
sLattice.defineDynamics<NoDynamics>(superGeometry, 5);
setBouzidiZeroVelocityBoundary<T,DESCRIPTOR>(sLattice, superGeometry, 5, stlReader);
#else
sLattice.defineDynamics<BounceBack>(superGeometry, 5);
#endifhelp!
February 20, 2023 at 4:06 pm #7211FBukreevKeymasterHello,
I think you have not defined the Smagorinsky Constant there
sLattice.setParameter<collision::LES::Smagorinsky>(T(0.15));
Greetings
FedorFebruary 21, 2023 at 3:11 am #7213H.YuParticipantNone of the above, but I already defined it as the Smagorinsky constant 0.1
February 21, 2023 at 3:28 am #7214H.YuParticipantIs the meaning of ‘-nan’ uncalculated or diverged?
February 21, 2023 at 8:10 am #7215H.YuParticipantWhat is the relationship between voxel size and stl size if I use stlreader? voxel size =<stl size ??
February 21, 2023 at 9:38 am #7216H.YuParticipantI attach a photo.
https://ifh.cc/g/n5rT5x.jpgThis picture is a speed contour. What are the reasons why it looks like that picture?
I am testing various things such as voxel size, stl size, maxVel, resolution, and time discretization refinement, but it is still calculated at first, and -nan occurs as time passes. There is also the problem that yPlusMax keeps increasing.
Anything else to consider?
February 21, 2023 at 1:54 pm #7217FBukreevKeymasterHello,
you can look how the stl part is implemented in particles/bifurcation/eulerEuler example with IndicatorLayer function. It must ease the stl inclusion for you.
You can use the UnitConverterFromResolutionAndLatticeVelocity and set the lattice velocity to 0,1 there or with some smaller value. It can make the simulation more stable.Greetings
FedorFebruary 22, 2023 at 4:12 am #7220H.YuParticipantthank you!
I have one more question. Are there any usage examples to learn how to use IndicatorLayer?February 22, 2023 at 12:13 pm #7221FBukreevKeymasterYou can also look into examples/laminar/cylinder3d.
This indicator just enlarges the stl geometry to lattice points depending on cell size.February 22, 2023 at 1:32 pm #7222H.YuParticipantthank you.
I set it up like the example above. Also, when I set ‘UnitConverterFromResolutionAndLatticeVelocity’, ‘-nan’ does not occur anymore.February 22, 2023 at 1:36 pm #7223H.YuParticipantI have one more question.
I want to plot various things using paraview for post-processing, but even if I load the calculated ‘.vtm’ file into paraview, only cuboid is visible. What can I think about to solve this problem?- This reply was modified 1 year, 6 months ago by H.Yu.
February 24, 2023 at 10:59 am #7227FBukreevKeymasterYou need to use the pvd file to see the results.
-
AuthorPosts
- You must be logged in to reply to this topic.