Checkpoint file in GPU module

48 views
Skip to first unread message

Yi Zhong

unread,
Dec 15, 2021, 4:53:25 PM12/15/21
to ProjectChrono
Hi,

I am using the GPU module in Chrono/7.0.0. I noticed that when UseMaterialBasedModel , some simulation parameters such as Young's modulus, and Poisson's ratio are not included in the checkpoint file. I would like to make sure that I do need to specify these simulation parameters again after I load the checkpoint file, right? 

Best,
Yi

Ruochun Zhang

unread,
Dec 16, 2021, 2:23:34 AM12/16/21
to ProjectChrono
Hi Yi,

Yes. If these entries are not in the checkpoint file, then they will not be loaded when you read that checkpoint file. You have to manually enter them each time. The material based model is a new addition and this behavior seems to be an unfortunate bug.

Thank you,
Ruochun

Yi Zhong

unread,
Jul 21, 2022, 11:39:37 AM7/21/22
to ProjectChrono
Hi Ruochun,

A follow-up on this question. Meshes are also not included in the checkpoint file. When the checkpoint file is loaded, meshes should be reloaded. The position and orientation of meshes may be changed in previous simulations. So when the meshes are reloaded, are the translation and rotation of meshes needed to be set manually? Is there a way to save the meshes as well (saying output meshes as .obj file which can be easily reloaded)?

Best,
Yi

Ruochun Zhang

unread,
Jul 21, 2022, 5:59:57 PM7/21/22
to ProjectChrono
Hi Yi,

You are right that mesh info is not included in the checkpointing file. I thought about this and in the end, I felt that quietly incorporating boundary and mesh info into the checkpoint could introduce more troubles and surprises to the user than not to. For the current iteration of this package, it is what it is.

To pick up the mesh information from where you stop last time, you should load the mesh into the simulation exactly like you did in the previous simulation, then re-build the system from a checkpointing file, initialize it and use ApplyMeshMotion to bring the/each meshed object to their previous location, then begin the restarted simulation. 

About the arguments you should use for the ApplyMeshMotion call, well if you used the co-simulation framework then you can get it from the ChBody object at the end of the previous simulation, exactly like the ApplyMeshMotion call at each time step in the Ballcosim demo. If you did not use the co-simulation framework then I assume you enforce the mesh location/velocity yourself? So you should know where it was at the end of the previous simulation right?

I took a look and there seems to be no explicit method to get the mesh location/velocity. I guess you don't need it anyway this time, but is it true? In any case, that info can be easily queried from tri_params->fam_frame_broad[mesh_id], meshSoup->vel[mesh_id] and meshSoup->omega[mesh_id]. Let me know if you have further questions.

Thank you,
Ruochun

Yi Zhong

unread,
Jul 22, 2022, 5:24:07 PM7/22/22
to ProjectChrono
Thanks Ruochun. I am using co-simulation framework. So I collected velocity and displacement of meshes from the Chbody objects. ApplyMeshMotion should work. I need to input position, rotation, linear and angular velocity manually, right? I was curious if there were easier ways. 

Thanks again for your clear explanation. 

Ruochun Zhang

unread,
Jul 22, 2022, 7:44:28 PM7/22/22
to ProjectChrono
Hi Yi,

Yes that's correct. In terms of easier ways, not really. You have to supply these 4 pieces of info however you do it, right? To me it is already minimalist.

Thank you,
Ruochun

Yi Zhong

unread,
Jul 22, 2022, 8:33:50 PM7/22/22
to ProjectChrono
Yes. It works properly. 

Thanks,
Yi

Reply all
Reply to author
Forward
0 new messages