The API of electrostatic force between particles or particle and wall

Alice Sun
Alice Sun Altair Community Member
edited April 16 in Community Q&A

I want to write an API for electrostatic force between particles or particle and wall. 

Do I choose to use the contact model or particle body force model?

Besides, can I get a related API or simialr one to help me writing it?

Thank you very much

Tagged:

Best Answer

  • RWood
    RWood
    Altair Employee
    edited April 16 Answer ✓

    Hi,

    If you want to recreate the Electrostatics model as a plugin, exactly as it is in EDEM, you can't. The Electrostatics in EDEM uses a screening method that is not exposed to the API.

    However, if you wanted to implement something similar, then you would do this through a contact model and possibly a body force on top. The contact model is essential though as you need to determine the nearest neighbours, which you would do through using a contact radius > physical radius. Without the screening method we use for the in-built model though you might have to have a very large contact radius to capture all the nearest neighbours, which can get expensive if you have a lot of contacts.

    Cheers,
    Richard

Answers

  • RWood
    RWood
    Altair Employee
    edited April 16 Answer ✓

    Hi,

    If you want to recreate the Electrostatics model as a plugin, exactly as it is in EDEM, you can't. The Electrostatics in EDEM uses a screening method that is not exposed to the API.

    However, if you wanted to implement something similar, then you would do this through a contact model and possibly a body force on top. The contact model is essential though as you need to determine the nearest neighbours, which you would do through using a contact radius > physical radius. Without the screening method we use for the in-built model though you might have to have a very large contact radius to capture all the nearest neighbours, which can get expensive if you have a lot of contacts.

    Cheers,
    Richard

  • Alice Sun
    Alice Sun Altair Community Member
    edited February 15

    Hi,

    If you want to recreate the Electrostatics model as a plugin, exactly as it is in EDEM, you can't. The Electrostatics in EDEM uses a screening method that is not exposed to the API.

    However, if you wanted to implement something similar, then you would do this through a contact model and possibly a body force on top. The contact model is essential though as you need to determine the nearest neighbours, which you would do through using a contact radius > physical radius. Without the screening method we use for the in-built model though you might have to have a very large contact radius to capture all the nearest neighbours, which can get expensive if you have a lot of contacts.

    Cheers,
    Richard

    Thank you for your reply.

    Can I use the cut-off distance to calculate the electrostatic force (that is, the particle only affected by the surrounding particles within a certain range such as 5*particle radius)? Will this reduce the amount of calculation? How to achieve this?

  • RWood
    RWood
    Altair Employee
    edited February 16
    Alice Sun said:

    Thank you for your reply.

    Can I use the cut-off distance to calculate the electrostatic force (that is, the particle only affected by the surrounding particles within a certain range such as 5*particle radius)? Will this reduce the amount of calculation? How to achieve this?

    You can use the contact radius in EDEM to achieve this, yes. You can set it in the Creator and access the value in the API, if you need it for your calculation. If you were to set it to be 2.5 x the physical radius, when the contact radii overlap you will have a centre-centre distance of 5 x the physical radius. You just need to be aware that the larger the contact radius, the more contacts are detected and the more expensive the simulation is.

  • Alice Sun
    Alice Sun Altair Community Member
    edited February 22

    You can use the contact radius in EDEM to achieve this, yes. You can set it in the Creator and access the value in the API, if you need it for your calculation. If you were to set it to be 2.5 x the physical radius, when the contact radii overlap you will have a centre-centre distance of 5 x the physical radius. You just need to be aware that the larger the contact radius, the more contacts are detected and the more expensive the simulation is.

    Thank you for your reply.

    Can you explain why using edem's built in screened electrostatic model can save a lot of calculation time?Doesn't this model also calculate the electrostatic forces on the target particle for all surrounding particles at a screening distance?

    Besides, when I write the api for long range force like electrostatic force, do I have to use contact radius?

     

  • RWood
    RWood
    Altair Employee
    edited February 22
    Alice Sun said:

    Thank you for your reply.

    Can you explain why using edem's built in screened electrostatic model can save a lot of calculation time?Doesn't this model also calculate the electrostatic forces on the target particle for all surrounding particles at a screening distance?

    Besides, when I write the api for long range force like electrostatic force, do I have to use contact radius?

     

    Because the screening distance is only for looking at neighbouring elements to calculate the electrostatic force. If two contact radii overlap in EDEM all relevant contact models will be called.

    So if you set the screening distance to be 5r, say, you'll be looking for all particles within this radius. If you tried to do the same with the contact radius approach, you would capture those same particles within 5r, but you would also call all other contact models you have enabled, Hertz Mindlin, Rolling friction, etc. Even though those two I mention would do nothing without a physical overlap, the calling of all these unnecessary contact models adds up if you have millions of contacts.

  • Alice Sun
    Alice Sun Altair Community Member
    edited February 22

    Because the screening distance is only for looking at neighbouring elements to calculate the electrostatic force. If two contact radii overlap in EDEM all relevant contact models will be called.

    So if you set the screening distance to be 5r, say, you'll be looking for all particles within this radius. If you tried to do the same with the contact radius approach, you would capture those same particles within 5r, but you would also call all other contact models you have enabled, Hertz Mindlin, Rolling friction, etc. Even though those two I mention would do nothing without a physical overlap, the calling of all these unnecessary contact models adds up if you have millions of contacts.

    So for a case containing 50,000 particles, what is the approximate simulation time difference between the simulation using edem's built in electrostatics model and the electrostatic force model api I write myself?

    Or how much more time would the simulation, which contains tens of thousands of particles, take if I use an electrostatic force model I write myself?

  • RWood
    RWood
    Altair Employee
    edited February 23
    Alice Sun said:

    So for a case containing 50,000 particles, what is the approximate simulation time difference between the simulation using edem's built in electrostatics model and the electrostatic force model api I write myself?

    Or how much more time would the simulation, which contains tens of thousands of particles, take if I use an electrostatic force model I write myself?

    There's no way to estimate this without knowledge of how they are arranged. 50000 particles spaced far apart could mean zero contacts while 50000 particles packed tightly could have millions of contacts. Just to clarify, I don't mean physical contacts, I mean contacts from EDEM's perspective of two contact radii overlapping.

    All I can suggest is trying for a few simple scenarios (10s of particles say) and seeing the difference, but you clearly need to write the API plugin to do this test. I can't say whether such an effort would be worthwhile though as I've never tried doing this in the API

  • Alice Sun
    Alice Sun Altair Community Member
    edited February 26

    There's no way to estimate this without knowledge of how they are arranged. 50000 particles spaced far apart could mean zero contacts while 50000 particles packed tightly could have millions of contacts. Just to clarify, I don't mean physical contacts, I mean contacts from EDEM's perspective of two contact radii overlapping.

    All I can suggest is trying for a few simple scenarios (10s of particles say) and seeing the difference, but you clearly need to write the API plugin to do this test. I can't say whether such an effort would be worthwhile though as I've never tried doing this in the API

    Richard,can you help me explain the meaning of n and z in the calculation of κ value which is an inverse of the Debye length in the the Electrostatics Model? What are the units of n and z? What do they refer to specifically?
    In my case particles of the same size are packed closely together in a powder bed, each particle has a charge of 0.001nC, the screening distance is 5R, and I hand-calculated the value of k to be 2e8, which is clearly wrong. What value of k is usually in that range?
    Thank you very much
    image
  • Alice Sun
    Alice Sun Altair Community Member
    edited February 27

    There's no way to estimate this without knowledge of how they are arranged. 50000 particles spaced far apart could mean zero contacts while 50000 particles packed tightly could have millions of contacts. Just to clarify, I don't mean physical contacts, I mean contacts from EDEM's perspective of two contact radii overlapping.

    All I can suggest is trying for a few simple scenarios (10s of particles say) and seeing the difference, but you clearly need to write the API plugin to do this test. I can't say whether such an effort would be worthwhile though as I've never tried doing this in the API

    image

    I feel very confused for the calcualtion of κ value. Can you point out where I am wrong