Skip to content

Particle manager

  • This topic has 7 replies, 2 voices, and was last updated 5 months ago by jan.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #7919
    Rookie
    Participant

    Dear OpenLB developers,

    How do I apply gravity to the particles and the particles collide with the wall fully elastically in version 1.6 of bifurcation3d, this is how I added gravity and set the particles to collide at the boundaries in version 1.5:

    std::vector<T> direction{0 ,0 ,-1};
    const T g = 9.81;
    auto weightForce = std::make_shared
    < WeightForce3D<T, PARTICLE>
    > ( direction, g );
    supParticleSystem.addForce( weightForce );

    T dT = converter.getConversionFactorTime() ;
    std::set<int> reflBMat = { 2 };
    auto materialreflectBoundary = std::make_shared
    < SimpleReflectBoundary3D<T, PARTICLE>
    > (dT, superGeometry, reflBMat);
    supParticleSystem.addBoundary(materialreflectBoundary);

    Then I only found it in version 1.6:
    particleManager.execute<
    couple_lattice_to_particles<T,DESCRIPTOR,PARTICLETYPE>,
    process_dynamics<T,PARTICLETYPE>,
    update_particle_core_distribution<T,PARTICLETYPE>
    >();
    Is the motion of the particles set in this file(/olb-1.6r0/src/particles/functions/particleTasks.h)?

    Regards,
    Rookie

    #7935
    jan
    Participant

    Dear Rookie,

    Unfortunately I’m traveling at the moment and can’t check the code sufficiently. However, the beauty of the new particle system is that we now have one particle system for subgrid and resolved particles.

    So I suggest you check how gravity is added in examples/particles/dkt2d and you should be able to set it up similarly in your application. There you should find another task called apply_gravity and that the external acceleration is passed to the constructor of the ParticleManager. Therefore all particles must have the same density. If you need different densities, you’ll have to implement another function following the example provided.

    Best regards,
    Jan

    #7937
    Rookie
    Participant

    Dear jan,

    Have a good trip, I have added gravity, but what I want to achieve next is to achieve the particle collision with the wall, rather than capturing the particle, and can you use the point particle method to achieve the particle effect on the fluid, such as adding the particle effect on the lattice:

    particleManager.execute<
    couple_lattice_to_particles<T,DESCRIPTOR,PARTICLETYPE>,
    process_dynamics<T,PARTICLETYPE>,
    update_particle_core_distribution<T,PARTICLETYPE>,
    apply_gravity<T,PARTICLETYPE>,
    couple_particles_to_lattice<T,DESCRIPTOR,PARTICLETYPE>
    >();

    Best regards,
    Rookie

    #7938
    jan
    Participant

    Dear Rookie,

    Sorry, I missed the second part of your question.

    Unfortunately, there is no implemented method that allows for particle-wall interactions when considering subgrid particles using the new particle system. However, the legacy subgrid particle system is still available and can still be used. Alternatively, you’re free to port the functionality to the new particle system. However, I assume this is no small feat.

    Best regards,
    Jan

    #7939
    Rookie
    Participant

    Dear jan,

    I did not get used to the new particle system and did not find some features implemented in version 1.5. If the 1.5 version of the code is used, how to implement the effect of the particles on the lattice?

    Best regards,
    Rookie

    #7945
    jan
    Participant

    Dear Rookie,

    Unfortunately, the new particle system does not include all features that are available in the legacy subgrid particle system. For that reason, the legacy particle system is included in the latest release as well (see src/particles/subgrid3DLegacyFramework, which you can use in the same way as you used it in 1.5.

    The second part of the post I unfortunately don’t understand fully, because in both versions I’m not aware of any coupling from the subgrid particles to the lattice, only a coupling from the lattice (fluid) to the particles is used in the example, which uses the default Stokes drag as it does in version 1.5.

    Best regards,
    Jan

    #7946
    Rookie
    Participant

    Dear jan,

    Some literatures I read is to use the method of Particle-Source-In Cell to realize the two coupling of particles and fluids, I do not know whether it is implemented in openlb. Because I find this folder (/ olb 1.6 r0 / SRC/particles/subgrid3DLegacyFramework/twoWayCouplings), my guess is that to achieve the role of the grid granule on grid is achievable. But I don’t have an example to refer to how to add the code I need. I really beg for your help, which is really important to me.

    Best regards,
    Rookie

    #7985
    jan
    Participant

    Dear Rookie,

    I saw that you already found a way in the legacy code to couple back from the particles to the fluid: https://www.openlb.net/forum/topic/simulatewithtwowaycoupling/
    I’m leaving it here in case someone in future stumbles over this thread.

    Best regards,
    Jan

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.