Some question in the contactmodel API

Raheem Sterling_22160
Raheem Sterling_22160 Altair Community Member
edited July 2023 in Community Q&A

Hi,

I introduced a contact model which in contrast to incremental procedure, the force and torque were allowed to be calculated at every moment, so the "contactResults.normalForce" here is "+=" or "=", it seems "+=F_n" is right for me. Does this mean that "+="  for "contactResults"is used for force chain, rather than the accumulating over time ?

Tagged:

Best Answer

  • Stephen Cole
    Stephen Cole
    Altair Employee
    edited July 2023 Answer ✓

    Hi Raheem,


    When you add to the forces I'd recommend using += for most cases.  If you are using the latest version of the API the chaining works per time-step only, so you don't get the sum of the forces over time rather the sum of the forces calculated in the individual components of the model at that time-step.

    image

    For example in the image above the forces are calculated in H-M model so using= or += doesn't change the result (unless the model sums the forces in more than 1 place), however that force is then passed to the rolling friction model.  

     

    If the rolling friction used = then it would overwrite the forces calculated in H-M and just return the forces from rolling friction.  Using += returns sum of both to EDEM and uses that to calculate the forces for that time-step.  Next time-step they start at 0 and you then return the next set.

     

    Regards

    Stephen

Answers

  • Stephen Cole
    Stephen Cole
    Altair Employee
    edited July 2023 Answer ✓

    Hi Raheem,


    When you add to the forces I'd recommend using += for most cases.  If you are using the latest version of the API the chaining works per time-step only, so you don't get the sum of the forces over time rather the sum of the forces calculated in the individual components of the model at that time-step.

    image

    For example in the image above the forces are calculated in H-M model so using= or += doesn't change the result (unless the model sums the forces in more than 1 place), however that force is then passed to the rolling friction model.  

     

    If the rolling friction used = then it would overwrite the forces calculated in H-M and just return the forces from rolling friction.  Using += returns sum of both to EDEM and uses that to calculate the forces for that time-step.  Next time-step they start at 0 and you then return the next set.

     

    Regards

    Stephen

  • Raheem Sterling_22160
    Raheem Sterling_22160 Altair Community Member
    edited June 2023

    Hi Raheem,


    When you add to the forces I'd recommend using += for most cases.  If you are using the latest version of the API the chaining works per time-step only, so you don't get the sum of the forces over time rather the sum of the forces calculated in the individual components of the model at that time-step.

    image

    For example in the image above the forces are calculated in H-M model so using= or += doesn't change the result (unless the model sums the forces in more than 1 place), however that force is then passed to the rolling friction model.  

     

    If the rolling friction used = then it would overwrite the forces calculated in H-M and just return the forces from rolling friction.  Using += returns sum of both to EDEM and uses that to calculate the forces for that time-step.  Next time-step they start at 0 and you then return the next set.

     

    Regards

    Stephen

    Hi Stephen,

    Thank you very much, I have tried with my new Contact model(some kind of bond model), it works well when two particles bonded together, but when I added number of particles to more than two, it wasn't well as figures show. What may caused the problem? 

    Reagrd!

  • Stephen Cole
    Stephen Cole
    Altair Employee
    edited June 2023

    Hi Stephen,

    Thank you very much, I have tried with my new Contact model(some kind of bond model), it works well when two particles bonded together, but when I added number of particles to more than two, it wasn't well as figures show. What may caused the problem? 

    Reagrd!

    Hi Raheem,


    For the 3 particles is this showing a particle been pulled 'inside' the others?  Potentially this is related to the bond point?


    Regards
    Stephen

  • Raheem Sterling_22160
    Raheem Sterling_22160 Altair Community Member
    edited June 2023

    Hi Raheem,


    For the 3 particles is this showing a particle been pulled 'inside' the others?  Potentially this is related to the bond point?


    Regards
    Stephen

    Hi Stephen,

    May I know your email address and send my code? I'm stuck here.

    Regards!

  • Stephen Cole
    Stephen Cole
    Altair Employee
    edited June 2023

    Hi Stephen,

    May I know your email address and send my code? I'm stuck here.

    Regards!

    Hi Raheem,

    We won't be able to debug the code unfortunately, I'd recommend stepping through a debug process.

    This tutorial snooker factory outlines the debug process, if you step through the model it should clarify what is happening at each point in time.

     

    Regards

    Stephen

     

  • Raheem Sterling_22160
    Raheem Sterling_22160 Altair Community Member
    edited June 2023

    Hi Raheem,

    We won't be able to debug the code unfortunately, I'd recommend stepping through a debug process.

    This tutorial snooker factory outlines the debug process, if you step through the model it should clarify what is happening at each point in time.

     

    Regards

    Stephen

     

    Hi Stephen,

    Thank you all the same, as you said, I made an error on the normal direction of normal(tangential) bond force and torque. And I fixed the problem.

    Because now every timestep the calculation of force(torque) on particle is the total force at current time, when I pass the value to  m_NForceDelta, mTForceDelta, I have changed += to =, but it seems uncorrect.

    Regards!