Aurelio H
Forum Replies Created

AuthorPosts

Aurelio HParticipant
Hi Simon,
By state of the fluid we mean if it is liquid or gas. For instance, to specify gas state in a given point you assign:
rho = rho(gas)
to that point. In the two component SC model you should assign proper values to both lattices, e.g. if you have components A and B and there is only A at a given point, then:
rhoA = 1 (or whichever reference density you are using)
rhoB = 0Regards,
AurelioAugust 22, 2019 at 10:38 pm in reply to: Printing the relaxation time of each lattice to vtk files #4522Aurelio HParticipantHi Guo,
The descriptor that you are using stores omega in an external field. You may see it in file src/dynamics/dynOmegaLatticeDescriptors.h, where DynOmegaD2Q9Descriptor is defined.
I would suggest using:
SuperLatticeField3D<T,DESCRIPTOR,OMEGA> omegaLB (sLattice);
vtkWriter.addFunctor(omegaLB);This would print the relaxation frequency (omega) in lattice units to the VTK file. Is this what you are looking for?
Cheers,
AurelioAurelio HParticipantHi Simon,
Since you are trying to set up a multiphase flow, setting pressure both at inlet and outlet will not be enough. You would also have to specify the state of the fluid, preferably at inlet.
If your simulation setup allows for it, maybe you could use periodic borders instead of an inlet/outlet and apply a constant pressure gradient through a body force. But this is only valid in a small number of cases, like the twolayer Poiseuille flow, or if you are considering gravitydriven flows.
Regards,
Aurelio
Aurelio HParticipantHi zshi,
Unfortunately I am not using the ShanChen pseudo potential method, but another approach to multiphase modelling based on the freesurface VOF model by Thürey et al. (you may find it here) which simulates and couples both gas and liquid phases.
As Max has said, implementing pressure boundary conditions for the ShanChen multiphase (or multicomponent) model is not easy. The reason is that the ShanChen equation of state is as follows:
p = cs2*(rho + dt^2*G*psi(rho)^2/2).
whereas many ‘standard’ LBM schemes have the ideal gas EOS, namely:
p = cs2*rho
OpenLB implements pressure BCs by imposing density, thus assuming that the model’s EOS is the ideal gas one. I have not found any articles that present an acceptable pressure outlet BC for the ShanChen model, so I would recommend doing as Max suggests.
Here is an interesting idea by Timm Krüger regarding how to implement an inlet boundary condition in the ShanChen model.
Please note that, although I know pseudopotential models and have worked with them, I am not an expert in LBM. Anyway let me know if you have any other questions and I will try to help.
Regards,
Aurelio
Aurelio HParticipantDear Marc,
Thank you very much for your reply. Mi simulation setup is the following:
– Geometry: straight, cylindrical pipe in 3D.
– Boundary conditions:
– Inlet: plug velocity profiles for liquid and gas, which enter separated (liquid in the lowerhalf of the inlet, and gas in the upper half). I use a ‘velocityBB’ rule like the one implemented in OpenLB.
– Outlet: constant pressure, zero gradient for velocity, using extrapolation rules.
– Walls: noslip condition via fullway bounceback.Resolution and time steps are estimated so that velocity at the inlet is lower than 0.01, and so that the smallest tau of the two phases is higher than a certain value, admittedly very close to 0.5. Increasing grid size is of course always convenient for stability, but I have not found any significant improvement upon using very high resolutions while respecting the stability restrictions.
Contrary to what I thought last week, turbulence does not seem to be the main problem since the model works well with high Reynolds numbers in singlephase flows, even with such small taus.
In fact, following your suggestions I have found that instabilities occur at the interface. Given that I use a freesurface VOF algorithm that is somewhat cumbersome, I will search for possible sources of instability there.
Again, thank you for your answer. Your idea of knowing where exactly instabilities occur has been very helpful.
Aurelio

AuthorPosts