Skip to content

Particlulate Flow

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #7346
    Henderson_C
    Participant

    Dear OpenLB community,

    I noticed that I can change the mass of the particle in the middle of the simulation. So I was wondering if I changed the mass of the particle at a certain time step, will the density change? I apologize if the question is silly.

    Regards,

    • This topic was modified 12 months ago by Henderson_C.
    #7351
    jan
    Participant

    Dear Henderson,

    You can change the mass in the particle field, that is correct. However, that mass is most likely only used to solve the velocity verlet algorithm in your setup. So in that context the density changes, yes. But it doesn’t affect the external acceleration caused by gravity. In the DKT2D example, this acceleration is quantified by the variable accExt, as you can see, the particle density affects it. If you want to change it, you would have to update it with the new particle density.

    Best regards,
    Jan

    #7352
    Henderson_C
    Participant

    Dear Jan,

    Thank you for your reply. You have been very helpful and I really appreciate it. I am aware of the variable (accExt) but how can I impose it to the particle manager at certain time step after initially setting it in the simulation?

    For example: The particle density at time = 0 is 1 but after 10 seconds the particle will have a density of 0.8.

    Code snippet:

    T newDensity = 0.8;
    particle.template setField<PHYSPROPERTIES,MASS>( newDensity*M_PI*radiusP*radiusP );
    accExt[1] = -9.81 * (1. – 1. / newDensity);

    Best regards,

    #7353
    jan
    Participant

    Dear Henderson,

    yes, it should work like that, but if you’re using the ParticleManager, you also have to update the external acceleration stored there. Apparently this is not easy in OpenLB 1.5 because it’s a private variable. In the future release you’ll update it like this: particleManager.setExternalAcceleration(accExt);. This function is missing in 1.5. As a workaround, if waiting for the next release is not an option, you could make the variable _externalAcceleration public in src/olb/particles/particlemanager.h and then modify it directly or write a simple setter function yourself.

    Best regards,
    Jan

    #7354
    mathias
    Keymaster

    Dear Henderson_C,

    that is beyond what we can help here in the forum. Furter help is availble at our spring school or within a common project!

    Best
    Mathias

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