API code and particle density

Kiran Purushothama Keshavan
Kiran Purushothama Keshavan Altair Community Member
edited April 5 in Community Q&A

Hello,

I'm using the files from this API tutorial

I used my custom CGNS file (velocity 130mps), changed the geometry to something I wanted to test on, I got my simulation results until I changed the Density of fluid medium in 'field_query_prefs' from 1000 to 1.225 which is the density of air.
1. Can you please comment on this? In my opinion the particles must be blown by the air velocity but I dont see that happening.

When I do this there is no sign of particle interaction with the fluid medium, I checkd the API file CfieldQuery.cpp and discovered that the ftotal is dependent on the drag force on these particles.
2. I would like to understand the terms used in this file, for example: relativeVelocity.length() how do I find the meaning to this? I did not find much info in the EDEM manual. Also is there a way to alter drag force for the sake of low density particles suspended in air?

Thanks,
Kiran

 

Tagged:

Answers

  • PrasadAvilala
    PrasadAvilala
    Altair Employee
    edited April 5

    Hi Kiran,

    Previously Jerrin added his comments.

    Let me tell you the steps once again.

    When you change the density value in the preference file, please go to the physics model and refresh the dll file.

    Before this step when you're generating the dll file please use the latest Additional Include directories shown in below picture

    The example case demonstrated using EDEM version 2021 but you should use the libraries using latest EDEM version

    image

     

     

    Coming to API help. Please go t EDEM help and there is an option to access API, shown in below picture

     

    image

     

    Thanks,

    Prasad A

  • RWood
    RWood
    Altair Employee
    edited April 5

    Hi,

    The API will provide values in SI and because of this you'll find most (all? I think) API plugins we write will work with SI.

    I can't remember the source code for that API plugin off the top of my head but looking at your screenshot yes, F_total is providing the drag force. I have a hunch there might be buoyancy added as well, later? I can't remember. Either way, at some point a vector value representing the total calculated force for the particle will be added to the particle. 

    All you need to understand what relativeVelocity is outlined in lines 148-154 in your screenshot:

    cfdField is a vector, populated using the values of the nearest point from the velocity field. Essentially this is your fluid velocity.

    particleVelocity is a vector made up of the values coming from the EDEM solver for that particular value.

    relativeVelocity is a vector of the difference of the two.

    .length( ) is a member function (or method) for EDEM's API class CSimple3DVector, which returns the length (or magnitude) of the vector. 

    Put that together and relativeVelocity.length( ) is the magnitude of the vector that represents the difference in velocities between the particle and fluid. You won't find any documentation on this as it's specific to this model, it's not a term coming from the main EDEM solver but defined in the plugin. I would recommend going through all the API tutorials to better understand how the API differs to EDEM and what you can do with it (the first one is here: https://community.altair.com/community/en/edem-api-tutorial-1-particle-replacement?id=kb_article&sysparm_article=KB0037689)

    Cheers,

    Richard