Periodic Outlet Boundary Conditions ( nonequilibrium extrapolation method)
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Periodic Outlet Boundary Conditions ( nonequilibrium extrapolation method)
- This topic has 35 replies, 5 voices, and was last updated 9 months ago by jan.
-
AuthorPosts
-
March 30, 2023 at 8:56 pm #7343mathiasKeymaster
Daer Henderson_C,
I think Fedor, meant that you should have a look at that constructor because what you need is already there! Way are you not coming to our next spring school. That would give you a good start into OpenLB. We warmly welcome experts in c++ in the OpenLB community!
Best
MathiasMarch 31, 2023 at 1:43 pm #7344janParticipantDear Henderson,
The periodic boundaries for particles in OpenLB 1.5 doesn’t work as expected, so it was explicitly removed from the ParticleManager to make it unusable. Therefore there is no simple fix for your problem in OpenLB 1.5. This issue has been fixed and will be controllable via the ParticleManager in the next release, as mentioned by Fedor.
Best regards,
JanMarch 31, 2023 at 7:39 pm #7345Henderson_CParticipantDear Jan,
When will the next release be accessible? I am currently working on my masters thesis, so the matter of time is critical to me.
Regards,
April 2, 2023 at 8:03 pm #7349mathiasKeymasterWithin the next weeks..
November 27, 2023 at 2:28 pm #7949RookieParticipantDear Fedor,
I understand that you want to add the periodicity vector (false,true) at the end of the ParticleManager, But if it is version 1.5 under “/ bifurcation3d eulerLagrange” in the particle set how to impose periodic boundary particles, because there is no ParticleManager, and I set also report an error like this:
auto materialperiodicBoundary = std::make_shared
< PeriodicBoundary3D<T, PARTICLE>
> (superGeometry, true, true, false);
supParticleSystem.addBoundary(materialperiodicBoundary);Best regards,
RookieNovember 27, 2023 at 3:47 pm #7952FBukreevKeymasterHello,
I mean
ParticleManager
particleManager(
particleSystem, superGeometry, sLattice, converter, accExt,{false, true});you can add this {false,true} vector if you want periodicity in the y-direction.
Best regars
FedorNovember 28, 2023 at 3:34 am #7954RookieParticipantDear Fedor,
I understand the operation you mentioned, because I have asked Jan about particle Settings, and I want to set the collision rebound between particles and the wall, as well as the periodicity of particles. Jan told me that I can only set the collision between particles and the wall in version 1.5, and I know that you can set the ParticleManager in version 1.6. So how do you think I can do all of this at the same time.
Best regards,
RookieNovember 29, 2023 at 10:07 am #7958mathiasKeymasterYou need to part the code form the old parrticle implementation to the new one..
November 29, 2023 at 10:40 am #7960RookieParticipantDear mathias,
As you said, I am trying to combine the two codes together, but in my opinion, it is really difficult to incorporate the collision rebound between particles and wall in the old code into the new code, as Jan said. So I’m now trying to add ParticleManager to the old code, because your idea is to modify some of the source code in the new code? This may be a little difficult for me, so how do I add the following code to the old code:
ParticleManager<T, DESCRIPTOR, PARTICLETYPE> particleManager(
supParticleSystem, superGeometry, sLattice, converter, {true, true, false});Best regards,
RookieDecember 5, 2023 at 11:47 am #7976janParticipantDear Rookie,
why do you need to move the
ParticleManager
to the old system? It’s mostly only for convenience, therefore, you don’t have to port the whole object. If you merely want to achieve the periodic boundaries, then it might suffice to merely check once per timestep if a particle left the periodic domain and if they did, place them on the opposite side of the periodic boundary.Best regards,
JanDecember 5, 2023 at 2:41 pm #7979RookieParticipantDear jan,
What you said is quite reasonable, and I will revise it according to your suggestion. Thank you for remembering my question.
Best regards,
Rookie- This reply was modified 9 months, 1 week ago by Rookie.
December 7, 2023 at 9:25 am #7992RookieParticipantDear jan,
I modified some declaration and reference parameter errors in periodicBoundary3D.h, so I can run this cycle boundary, I don’t know if I modified it correctly, I will analyze the results later to tell you this.I made the following changes:
SuperGeometry<T,3>& sg,
olb::Vector<T, 3> _minPhys, _maxPhys, _extend;template<typename T, template<typename U> class PARTICLETYPE>
PeriodicBoundary3D<T, PARTICLETYPE>::PeriodicBoundary3D(
SuperGeometry<T,3>& sg, bool x, bool y, bool z) : Boundary3D<T, PARTICLETYPE>(),
_minPhys(sg.getStatistics().getMinPhysR(2)),
_maxPhys(sg.getStatistics().getMaxPhysR(2)),
_extend(_maxPhys – _minPhys),Best regards,
RookieDecember 7, 2023 at 11:22 am #7993janParticipantDear Rookie,
I just wanted to quickly inform you of a possible problem:
The hardcoded material number in the code you provided is 2. Usually 2 corresponds to a wall, but in my opinion the periodic boundary should consider the fluid, which usually has the material number 1.However, I don’t know your case, so this is just a guess and depending on your setup, both material numbers (1 and 2) could work and possibly give the same results.
Best regards,
JanDecember 8, 2023 at 4:27 am #8000RookieParticipantDear jan,
Are you talking about the selection of materials in compilable code? The periodic boundary does not select materials, because I see in the source code he is judged according to geometry, and the material has nothing to do with it. I set up the particles to bounce with the wall, where I set up material 2.
T dT = converter.getConversionFactorTime();
std::set<int> reflBMat = {2};
auto materialreflectBoundary = std::make_shared<SimpleReflectBoundary3D<T, PARTICLE>>(dT, superGeometry, reflBMat);
supParticleSystem.addBoundary(materialreflectBoundary);auto materialperiodicBoundary = std::make_shared
< PeriodicBoundary3D<T, PARTICLE>
> (superGeometry, true, true, false);
supParticleSystem.addBoundary(materialperiodicBoundary);My fluid is periodic in both the x and y directions, are you worried that my fluid is not periodic? Because the results haven’t come yet, and I’ll be the first to let you know if I succeed.
Best regards,
RookieDecember 8, 2023 at 1:47 pm #8003janParticipantDear Rookie,
I meant this part:
_minPhys(sg.getStatistics().getMinPhysR(2)), _maxPhys(sg.getStatistics().getMaxPhysR(2)),
I haven’t checked the actual implementation, but usually this is used to evaluate where the fluid starts and ends, so that a particle leaving the fluid can be placed on the other side. However, usually 2 is for a wall, so this wouldn’t return the start and end of the fluid, but of the wall. This could (but doesn’t have to) cause your particles to behave wrong or “strangely” when they cross the periodic boundary.
Best regards,
Jan -
AuthorPosts
- You must be logged in to reply to this topic.