Skip to content

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)

Viewing 15 posts - 16 through 30 (of 36 total)
  • Author
    Posts
  • #7343
    mathias
    Keymaster

    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
    Mathias

    #7344
    jan
    Participant

    Dear 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,
    Jan

    #7345
    Henderson_C
    Participant

    Dear 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,

    #7349
    mathias
    Keymaster

    Within the next weeks..

    #7949
    Rookie
    Participant

    Dear 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,
    Rookie

    #7952
    FBukreev
    Keymaster

    Hello,

    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
    Fedor

    #7954
    Rookie
    Participant

    Dear 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,
    Rookie

    #7958
    mathias
    Keymaster

    You need to part the code form the old parrticle implementation to the new one..

    #7960
    Rookie
    Participant

    Dear 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,
    Rookie

    #7976
    jan
    Participant

    Dear 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,
    Jan

    #7979
    Rookie
    Participant

    Dear 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 4 months, 2 weeks ago by Rookie.
    #7992
    Rookie
    Participant

    Dear 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,
    Rookie

    #7993
    jan
    Participant

    Dear 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,
    Jan

    #8000
    Rookie
    Participant

    Dear 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,
    Rookie

    #8003
    jan
    Participant

    Dear 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

Viewing 15 posts - 16 through 30 (of 36 total)
  • You must be logged in to reply to this topic.