🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Dynamic DEM solution

User: "Atta Ur Rehman_20543"
Altair Community Member
Updated by Atta Ur Rehman_20543

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?

Find more posts tagged with

Sort by:
1 - 3 of 31
    User: "RWood"
    Altair Employee
    Updated by RWood

    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

    User: "Atta Ur Rehman_20543"
    Altair Community Member
    OP
    Updated by Atta Ur Rehman_20543

    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?

    User: "RWood"
    Altair Employee
    Updated by RWood

    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