Dynamic DEM solution

Atta Ur Rehman_20543
Atta Ur Rehman_20543 Altair Community Member
edited June 2022 in Community Q&A

Is there a way to dynamically or python program inputs that are used to solve the DEM problem? For instance I am adding a value of 10 for velocity and hard coding it to a specific timestep. If I join EDEMpy with it, is there a way to have a random or calculated value for velocity for each timestep instead of hardcoded?

Answers

  • RWood
    RWood
    Altair Employee
    edited June 2022

    Hi,

    Although this isn't possible with EDEMpy at the moment, this capability will be available in a future release. You could modify the values yourself with h5py (the python module used by EDEMpy) but there is a risk of corrupting decks this way if you set incorrect data types and I wouldn't recommend this approach.

    You can use the API to achieve this kind of behaviour, but since the output of an API plugin is a force you will need to back-calculate the required force as opposed to prescribing a velocity.

    Cheers,

    Richard

  • Atta Ur Rehman_20543
    Atta Ur Rehman_20543 Altair Community Member
    edited June 2022

    I tried opening h5py and it gave me permission denied error. Even though it can corrupt the deck but I think we have a good team of engineers give it a try. Can you help me with the way around to permission error. Can you explain a bit further on API part?

  • RWood
    RWood
    Altair Employee
    edited June 2022

    I tried opening h5py and it gave me permission denied error. Even though it can corrupt the deck but I think we have a good team of engineers give it a try. Can you help me with the way around to permission error. Can you explain a bit further on API part?

    Where/when are you seeing the permission denied error? The most two most obvious reasons I can think of are:

      1) you don't have read/write permissions for the data you're trying to access

      2) the file was already open elsewhere.

    As for the API approach I mentioned, take a look at this post:

    https://community.altair.com/community?id=community_question&sys_id=3729fb461b548d94507ca6442a4bcbf9


    I've used an approach in the past where I set a counteracting force to bring particles to rest and there's another approach mentioned at the bottom. After that you can set your velocity however you wish, though you will need to apply the corresponding force and not the velocity directly.

    Richard