How to apply Force using curve?
I have a .csv file with time dependent force (time vs force column). I imported that file and generated a curve in motionview.
Now, I want to use that curve to apply force in specific direction. How can I achieve that? What should I kept as an independent variable?
Best Answer
-
Hi Aditya,
You should use `time` as independent variable in Force component assuming 'time' is a column in csv file.
Please make sure that you use back quotes in time variable name otherwise you will see error.
image source: https://www.computerhope.com/jargon/b/backquot.htm
Regards,
Sonu0
Answers
-
Hi Aditya,
You should use `time` as independent variable in Force component assuming 'time' is a column in csv file.
Please make sure that you use back quotes in time variable name otherwise you will see error.
image source: https://www.computerhope.com/jargon/b/backquot.htm
Regards,
Sonu0 -
Sonu Manjhi_20605 said:
Hi Aditya,
You should use `time` as independent variable in Force component assuming 'time' is a column in csv file.
Please make sure that you use back quotes in time variable name otherwise you will see error.
image source: https://www.computerhope.com/jargon/b/backquot.htm
Regards,
SonuThank you Sonu Ji. Learning is easier when there are guys like you around.
0 -
Hello, I have very similar problem. I have a time-force defined curve from .csv.
But the model gives me following error: Error evaluating Force 1-x_math under Model.
My columns are named time and force. What do you think might be the problem? I also have a second question - if I define the Force by curve that starts from 0 to 1 on time scale but I want to activate the force by a sensor let's say 20 seconds into the simulation, would that work?
Thank you very much!0 -
Hi @VKR,
For your first question, you have likely not change the X input to be the FILE type and it is still set to MATH:
For your second question, you can activate an entity using a Template. Simply run the simulation for 20 seconds, activate the force, then run for another 10 seconds using the following:
In this example, the force would be sharply applied when activated. A recommendation would be to smoothly engage this force if you are finding it is causing instability in the simulation.
Additionally, you could avoid the use of a Template and instead STEP the force on at 20 seconds using the following expression:
STEP(TIME,20,0,20.1,AKISPL(TIME,0,{crv_0.idstring}))
Here, the interpolated value from the curve is saturated by the STEP function to be 0 until 20 seconds. Then, it is slowly ramped up to the intended value over a 0.1 second interval. This would more smoothly engage this delayed force and make for a more stable solution.
Hope this helps!
Adam Reid
0 -
Adam, thank you very much for your message. I am using the older interface (lastly available in 2022.3) does this change anything?
Thank you very much, Vojtech.0 -
Hi @VKR,
The only difference is that the properties for entities are edited using the Panels at the bottom of the screen vs. the Entity Editor (shown on the right side of the screen). I would strongly recommend that you update to the most recent release when possible to take advantage of years of improvements and additions to MotionView.
Hope this helps!
Adam Reid
0