How to apply two different mesh motions at different times

34 views
Skip to first unread message

Jack Stephenson

unread,
Nov 30, 2022, 5:55:23 PM11/30/22
to ProjectChrono
Hello team,

I am attempting to run a three-part sim where I settle the bed, drop the mesh, and linearly drag the mesh across the x-axis of the bed. 

I'm splitting the sim into three parts because I'm applying two different mesh motions at different times, and it was pretty difficult for me to know when to apply one mesh motion over the other. However, I'm trying to find a way to get the saved info of the mesh from the checkpoint file and use that info for the third sim. But looking at one of the demo sims, I have to manually set the boundaries and mesh again.

My mesh is also flipping on the bed, but I know the inertia is correct because I did check solid works and got the right ones. I made the cube mass different than the one calculated as I need to run this sim with a few parameters fixed. But I'm not sure if it's due to some other factors.

Here's my code and some visualizations.


Earth.cpp
Screenshot (2175).png
Screenshot (2176).png
Screenshot (2177).png

Ruochun Zhang

unread,
Nov 30, 2022, 6:30:52 PM11/30/22
to ProjectChrono
Hi,

Right now, Chrono::GPU does not checkpoint meshes or boundaries for a set of reasons. But since you know the position of your mesh from querying the Chrono bodies, you can restart the simulation using that information.

For the mesh flipping issue, I can hardly believe a 600g object that is several centimeters' wide has a moment of inertia of around 0.1 g·cm². 

Ruochun

Jack Stephenson

unread,
Nov 30, 2022, 6:41:53 PM11/30/22
to ProjectChrono
Hello,
The cube itself has a mass of .281 grams, thus the moment of inertia is around .1 g, though I'm not sure if mass plays a role in the flipping or not. If I'm understanding this correctly, could I just settle the bed, and just drag the cube across the bed without dropping it so long as I set it's initial position to be right on the bed? Or would I use the queries from the Chrono bodies and position my mesh accordingly?

Ruochun Zhang

unread,
Nov 30, 2022, 6:55:04 PM11/30/22
to ProjectChrono
Hi,

But you set the mass of the mesh and the body to be 600, no? Why would the mass not play a role?

You could set the initial position of the mesh instead of dropping it. But please be sure to set the initial location like you did in the co-simulation: setting the position of the ChBody first, then query the location of the ChBody and then feed that position to the Chrono::GPU mesh; instead of setting that while you AddMesh. Since the translation argument in AddMesh is not for this purpose.

Ruochun
Reply all
Reply to author
Forward
0 new messages