Postion dependent force on certain particles

Mr. Sujit
Mr. Sujit Altair Community Member
edited June 2022 in Community Q&A

Hi All,

We are looking to apply a position dependent force on particles belonging to certain bulk material. The forces look something like this:

Fx = 3x + 4y

Fy = 4x - 3y

Any guidance as to how we can incorporate such forces would be very helpfull

Regards,

Sujith

Tagged:

Answers

  • RWood
    RWood
    Altair Employee
    edited June 2022

    Hi,

    Using the API this should be pretty simple.

    If you need the force within a contact model then you can get access to a particle's position with element1.position.getX() and element1.position.getY(). It's the same for the second particle only with element2 instead.

    If you want it as a body force it's the same but using particle.position.getX(), etc.

     

    If you're unfamiliar with the API then I'd recommend going through the tutorials first to understand where the above fits in:


    https://community.altair.com/community?id=kb_article&sysparm_article=KB0037689

    That's the first tutorial and you can find the rest in the same location.

    Cheers,

    Richard

  • Mr. Sujit
    Mr. Sujit Altair Community Member
    edited June 2022

    Hi,

    Using the API this should be pretty simple.

    If you need the force within a contact model then you can get access to a particle's position with element1.position.getX() and element1.position.getY(). It's the same for the second particle only with element2 instead.

    If you want it as a body force it's the same but using particle.position.getX(), etc.

     

    If you're unfamiliar with the API then I'd recommend going through the tutorials first to understand where the above fits in:


    https://community.altair.com/community?id=kb_article&sysparm_article=KB0037689

    That's the first tutorial and you can find the rest in the same location.

    Cheers,

    Richard

    Hi Sir,

     

    If we want to incorporate these forces in a contact model, can we apply the forces in the global directions? We did some trial and error and realized that forces can only be applied in the contact normal and contact tangential directions.

    Regards,

    Sujith

  • RWood
    RWood
    Altair Employee
    edited June 2022
    Mr. Sujit said:

    Hi Sir,

     

    If we want to incorporate these forces in a contact model, can we apply the forces in the global directions? We did some trial and error and realized that forces can only be applied in the contact normal and contact tangential directions.

    Regards,

    Sujith

    Within a contact model you an only add forces through the contact (normal and tangential force components). If you wish to apply an arbitrary force in global coordinates then you will need to apply a particle body force (PBF) instead. Since PBFs apply for all particles at all timesteps, you'll need to think carefully about how you want to apply the forces.

    Richard

  • Mr. Sujit
    Mr. Sujit Altair Community Member
    edited June 2022

    Within a contact model you an only add forces through the contact (normal and tangential force components). If you wish to apply an arbitrary force in global coordinates then you will need to apply a particle body force (PBF) instead. Since PBFs apply for all particles at all timesteps, you'll need to think carefully about how you want to apply the forces.

    Richard

    Sir, Thank you for the help, we will try to use the PBF to apply the forces.

     

    Regards,

    Sujith