add gravity leads to instability, bifurcation 3D, multiphase, particles
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › add gravity leads to instability, bifurcation 3D, multiphase, particles
- This topic has 10 replies, 4 voices, and was last updated 4 years, 11 months ago by mgaedtke.
-
AuthorPosts
-
October 16, 2019 at 8:11 am #4590Manuel BergerParticipant
Dear all!
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:
https://www.dropbox.com/sh/dah69crhc2a8tgz/AACj3XTxFFcbkpx05TuOQqM3a?dl=0
Thanks for the feedback and advices
Manuel Berger
October 16, 2019 at 8:47 am #4591mathiasKeymasterDear Manuel,
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.Best
MathiasOctober 16, 2019 at 11:12 am #4592Manuel BergerParticipantDear Mathias!
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 Berger
October 16, 2019 at 11:39 am #4593mathiasKeymasterDear Manuel,
there are methods of the unitConverter which does the job. The factor should be
latticeForce = physForceGivenInSiUnits*converter.getConversionFactorMass()/converter.getConversionFactorForce();
Best
MathiasPS we will have a lecture on that in our next spring school given by Timm Krüger
October 16, 2019 at 12:53 pm #4594Manuel BergerParticipantDear Mathias,
I have already registered for the spring school in Berlin.
I have tried your conversion factor and found out that
converter.getConversionFactorMass()/converter.getConversionFactorForce();
is equal to
converter.getPhysDeltaT()*converter.getPhysDeltaT()/converter.getPhysDeltaX();
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!
Best
ManuelOctober 16, 2019 at 1:05 pm #4595mgaedtkeKeymasterHi Manuel,
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
converter.getPhysDeltaT()*converter.getPhysDeltaT()/converter.getPhysDeltaX()
See you at the Spring School!
Best,
MaxOctober 16, 2019 at 1:44 pm #4596Manuel BergerParticipantHi Max,
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)
latticeRelaxationTime (0.557646)
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!
Best
Manuel- This reply was modified 4 years, 11 months ago by Manuel Berger.
October 16, 2019 at 5:37 pm #4598mathiasKeymaster1/ 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-upMathias
October 16, 2019 at 7:18 pm #4599Manuel BergerParticipantDear Mathias,
thank you very much!
Best,
ManuelOctober 17, 2019 at 12:54 am #4600zshi6193ParticipantDear Max,
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 #4602mgaedtkeKeymasterHi Simon,
yes, this will still work. Just check the examples/multiComponent/rayleighTaylor2d/ or 3d
Best,
Max -
AuthorPosts
- You must be logged in to reply to this topic.