add gravity leads to instability, bifurcation 3D, multiphase, particles
October 16, 2019 at 8:11 am #4590
I have modified the bifurcation example (olb-1.3r1/example/particles/bifurcation3d) to simulate gravitation effects. The simulations is stable without gravitation, but when I apply g = 9.81 m/s^2 I have no chance to get a reasonable result. Gravity is transformed to lattice units by gLB = g * dt*dt/dx where dt is the physical time step size of one iteration and dx is the lattice spacing. Additionally, I have changed the boundary conditions to a constant inlet velocity and the outlets are set to ambient pressure.
The implementation of gravity is in the code lines 180 and 181.
The code, stl-file and log-file is available at:
Thanks for the feedback and advices
Manuel BergerOctober 16, 2019 at 8:47 am #4591
here are some hints:
1/ Use the converter to convert quanteties in lattice units. You need accelation insteed of forces – see the other examples dealing with forces like poiseuilleXd.
2/ You should Buoyancy forces.
3/ Strating with a working and stable example, change one thing, get a stable result, then change the next thing. So dont change boundary conditions as well as introducing a force at once.
MathiasOctober 16, 2019 at 11:12 am #4592
Thanks for the fast response and the hints:
1/ I have used the converter to convert quantities into lattice units (i.e. gravitation code line 174)
T gLB= gravity*converter.getPhysDeltaT()*converter.getPhysDeltaT()/converter.getPhysDeltaX();
I have also used the poiseuilleXd file as a starting point. However, it shows how to apply a body force, but not how the body force is connected to gravitation. I think in the LB framework OpenLB, there is so far no code that shows this connection. The LB framework palabos (palabos-v2.0r0\examples\showCases\vofMultiPhase\damBreak3d.cpp) shows that body force and gravitation (in lattice units) is the same. Code line 70,71. I assume my implementation of gravitation is fine in the bifurcation3d (see dropbox)?
2/ You are right Buoyancy forces are not considered.
3/ I get already a stable simulation result with changed boundary conditions (without gravitation). Adding gravity (1 thing changed) does not work.
I would be great if you could find a specific mistake in my code or recommendation i could change.
Thanks you very much for the help in advance
Manuel BergerOctober 16, 2019 at 11:39 am #4593
there are methods of the unitConverter which does the job. The factor should be
latticeForce = physForceGivenInSiUnits*converter.getConversionFactorMass()/converter.getConversionFactorForce();
PS we will have a lecture on that in our next spring school given by Timm KrügerOctober 16, 2019 at 12:53 pm #4594
I have already registered for the spring school in Berlin.
I have tried your conversion factor and found out that
is equal to
thus, my conversion is also fine.
The only question that still remains, which is independent of this code line is: How to convert gravitational acceleration (9.81 m/s^2) to body force? – or is it the same?
Thanks a lot!
ManuelOctober 16, 2019 at 1:05 pm #4595mgaedtkeKeymaster
the force field in OpenLB is actually a force over reference density, thus it is equivalent to an acceleration. To convert your gravitational acceleration you can use the term
See you at the Spring School!
MaxOctober 16, 2019 at 1:44 pm #4596
thanks for the explanation. Thus, my implementation of gravity is correct. See you at the Spring School!
Now I have to find a way to make this simulation numerically stable. Any recommendations based on personal experience for boundaries? So far I made the experience that increasing the resolution N helps sometimes, but with the disadvantage that the computational time increases dramatically.
Boundaries for numerical stability would be interested for: (in brackets are the used values)
gravitational force in lattice units (0.0187673)
maximum velocity in lattice units (0.0505667)
maybe lattice viscosity
What are the steps you do, do make a LB simulation numerically stable.
Thanks a lot!
October 16, 2019 at 5:37 pm #4598
- This reply was modified 3 years, 11 months ago by Manuel Berger.
1/ Check if the carrier phase simulation is stable
>if not, choose a smaller mesh size or use a smagorinsky model until it becomes a stable set-up
2/ Check if the particle phase is stabel
> if not, choose a even smaller mesh size or choose a bigger diffusion coefficient until it becomes a stable set-up
MathiasOctober 16, 2019 at 7:18 pm #4599
thank you very much!
ManuelOctober 17, 2019 at 12:54 am #4600zshi6193Participant
You mention the force field in OpenLB is actually a force over reference density. For multi-phase flow, I have two phases (liquid and vapor via using single component Shan-Chen model). If I define a force field (an acceleration) into the whole domain, will this method still works?
I am just thinking that vapor tends to have very small acceleration because of very small density. Or this method can only be used two-component Shan-Chen model.
Thanks for your help.
SimonOctober 17, 2019 at 1:58 pm #4602mgaedtkeKeymaster
yes, this will still work. Just check the examples/multiComponent/rayleighTaylor2d/ or 3d
- You must be logged in to reply to this topic.