Applying a Specific Equation of Motion to a Body within a Loop

Submitted by Amine Zahra on Tue, 07/04/2023 - 08:21

hello,

I have a body (mesh) in my system, that I would like to let it have a specific (linear) movement but according to an equation that represents the acceleration and deceleration of it.

The equation is represented by 3 parts, each standing for a time phase, and they are in terms of a variable z.

I want to write a loop, that considers the increase of z by a certain increment that I define and includes three parts representing each equation within a certain time phase.

May you please suggest a way to define such a loop.

Thank you for your support.

deepakpawar.2310 | Wed, 07/05/2023 - 18:29

Hi

(1)
you can use the fix addforce command to apply forces to your mesh based on the equation representing the mesh movement.
(Plz refer this link https://www.cfdem.com/media/DEM/docu/fix_addforce.html)

(2)
You can use if condition to discretize the time domain for different mesh movement and give label to each phase, lastly call each label for the corresponding mesh movement
(https://www.cfdem.com/media/DEM/docu/if.html?highlight=loop)

Thank you