Hi Gianni, Because of the data structures used in Chrono::Multicore, removing elements after system construction is more complicated and expensive, so we opted to not provide this capability.
To address the type of issues you are seeing (indeed, as collision shapes move farther and farther apart, the computational cost of the collision broadphase in Chrono::Multicore increases), you can define a region around the computational domain of interest. With that option enabled, bodies located outside that region will be frozen (in that their state is not updated anymore) You do that by (1) enabling this option and (2) providing the corners of an axis-aligned bounding box that defines the “active” domain. An illustration of this setting is in demo_MCORE_mixerNSC<https://github.com/projectchrono/chrono/blob/097865c8dd950886be40821aee1f3c13e32bd599/src/demos/multicore/demo_MCORE_mixerNSC.cpp#L167> in the commented-out lines 168-170. --Radu From: [email protected] <[email protected]> On Behalf Of Gianni Curti Sent: Monday, December 16, 2024 12:56 PM To: ProjectChrono <[email protected]> Subject: Re: [chrono] Difference between ChBodyEasyCylinder and AddCylinderGeometry Hi Radu and Maksym, thank you for your answer and kindness. Lately, I was also trying to use the command "RemoveBody()" in the Multicore environment to remove two bodies that falls out of my volume of interest. Otherwise, as they increase their distance from the other bodies, the simulation visibly slows down. However, when I implement this command I get the following error message at the beginning of the simulation. [cid:[email protected]] Is there any other way to remove these two bodies from the simulation? Thanks in advance. Gianni Il giorno venerdì 29 novembre 2024 alle 13:26:01 UTC+1 Radu Serban ha scritto: Hi Gianni, ChBodyEasyCylinder creates a body representing a solid cylinder centered at the body COM and aligned along the specified axis of the COM frame. The body mass and inertia is set automatically assuming the cylinder is solid and has constant density. AddCylinderGeometry allows you to attach a cylindrical shape (for collision and, optionally also visualization) to an existing body. This utility function allows you to position this cylinder arbitrarily relative to the body COM. This is what “Position on body” represents (a translation of the cylinder shape from the body COM and expressed in the body COM frame. It is your responsibility to construct the body (including setting its inertial properties). Note that ChBody::SetPos() sets the origin of the body COM frame relative to the absolute coordinate. It is important to understand well all the frames involved and in what frame various quantities are relative to and expressed in. See for example the first figure on this Chrono documentation page: https://api.projectchrono.org/development/collisions.html#collision_models_shapes<https://urldefense.com/v3/__https:/api.projectchrono.org/development/collisions.html*collision_models_shapes__;Iw!!Mak6IKo!M1N1xkpPgwUX8debhG2NoYwS8xOkXEl2iE_2wA1atPG4NhTpCejq3PBHN_SG2XgrIB7urdtomJ8ChEGod_2e$>. --Radu From: [email protected] <[email protected]> On Behalf Of Gianni Curti Sent: Wednesday, November 20, 2024 7:26 PM To: ProjectChrono <[email protected]> Subject: [chrono] Difference between ChBodyEasyCylinder and AddCylinderGeometry Hi, I have a question regarding the difference between the commands "ChBodyEasyCylinder" and "AddCylinderGeometry". For what I have understood, the first one automatically calculates the mass and inertia of a body depending on the sizes and density given, while the second one provides only the collision shape of a cylinder (neither mass nor density if they are not manually given). However, I saw that there is the possibility of assigning the "Position on body" when using "AddCylinderGeometry" through a ChVector3d but the result is pretty different from what I obtain by using "SetPos" when I also apply a rotation to the body. What does this command do exactly? Thank you in advance for yout patience and kindness. Best Regards Gianni -- You received this message because you are subscribed to the Google Groups "ProjectChrono" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/projectchrono/10d9deb5-26b4-4ebe-a37b-41e1fdec1037n%40googlegroups.com<https://urldefense.com/v3/__https:/groups.google.com/d/msgid/projectchrono/10d9deb5-26b4-4ebe-a37b-41e1fdec1037n*40googlegroups.com?utm_medium=email&utm_source=footer__;JQ!!Mak6IKo!LZqh0A2nDt0mRsewyds4KGDxAMXR0yiR6uVrKzMnUhhgRxnzpGL_G-mItt0BNX6E85FtgDOxibRx1YgTxMNb$>. -- You received this message because you are subscribed to the Google Groups "ProjectChrono" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion visit https://groups.google.com/d/msgid/projectchrono/a4f47d9a-447f-4b8a-8381-8b0fd3b3efd1n%40googlegroups.com<https://urldefense.com/v3/__https:/groups.google.com/d/msgid/projectchrono/a4f47d9a-447f-4b8a-8381-8b0fd3b3efd1n*40googlegroups.com?utm_medium=email&utm_source=footer__;JQ!!Mak6IKo!M1N1xkpPgwUX8debhG2NoYwS8xOkXEl2iE_2wA1atPG4NhTpCejq3PBHN_SG2XgrIB7urdtomJ8ChAHuzvYP$>. -- You received this message because you are subscribed to the Google Groups "ProjectChrono" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/projectchrono/CH3PPF46CDC2185C0CA12681DD37C73B329A73B2%40CH3PPF46CDC2185.namprd06.prod.outlook.com.
