danial
Forum Replies Created
-
AuthorPosts
-
May 26, 2025 at 10:40 pm in reply to: Extract velocity, pressure, and density data on lattices without interpolation #10305danialParticipant
This might be a bit late to answer but what I found useful when trying to get the data in CSV format in the lattice points and not interpolated points, is to just let OpenLB dump the data into pvd/vtm/vti regularly, then use VTK library in python to read the vti data into numpy arrays. There will be some overlapping points from the MPI tiles and if you need to remove those overlapping points and just end up with unique lattice points that needs another step of processing. The method mentioned in this thread looks interesting though because it doesn’t need python & VTK and can be done within OpenLB c++ codes itself, I should give it a try.
April 1, 2024 at 7:29 am in reply to: Not clear which version of Shan Chen model is implemented #8435danialParticipantHi, in the ShanChanForcedProcessor, the part that divides the force by density
cellB.template setField<descriptors::FORCE>(externalPartnerForce - g*rhoBlockContribution/rhoField[1]);I think the division by density is not needed. If we wanted to directly update the velocity like the Shan-Chen paper that uses u_phase=u_total+tau*F_ext/rho, yes the division by rho is necessary (Kruger p241, p378), but since we are simply passing the force to whatever forcing scheme is being used (Guo or ShanChen) then this division isn’t necessary. Yes the interface will become more diffuse but the critical value of G=-4 (Kruger P375) must be used instead of 3 (I have to do some tests to verify this).
The new
MCMPForcedPostProcessoris including the external force in the shared velocity
uTot = (u_sum + totalForce/2.) / rhoTot + externalForce1/2directly but the old ShanChen just usesrhoTot = rhoField[0]*omega1+ rhoField[1]*omega2but that one is based on a newer modern paper so I was trying to see how the new example works, but I don’t see any change during the simulation for the water column forwaterAirflatInterface2d, I must have messed up a setting somewhere but I’ll have to double check.Bytheway thank you guys for developing OpenLB and sharing it for free and providing this forum so I can also see the issues encountered by others. Cheers.
danialParticipantHi, both
Kupershtokh&ShanChenare multiphase treatment in lattice Boltzmann but they can also be used for forcing. For the context ofPorousParticleKupershtokhForcedBGKdynamicsandPorousParticleShanChenForcedBGKdynamics, it is used for forcing, not as the multiphase aspect. OpenLB does have theShanChen93multiphase implementation but I don’t think it supports particles. -
AuthorPosts
