import mesh to project chrono

124 views
Skip to first unread message

Richard Kelly

unread,
Nov 18, 2022, 10:34:38 AM11/18/22
to ProjectChrono
Hi all,



I am trying to simulate a boat on the water in project Chrono. I know I have some work ahead of me. As a first step I am just trying to get a couple of motors working with props. I have spent signigicant time trying to get the working with DualSPHysics and am now working through how Chrono works. Can anyone point me to a simple example of how to import a mesh? I found this example online:

https://api.projectchrono.org/development/tutorial_pychrono_demo_mesh.html


but that uses pychrono. I am currently using the C++ API.


Then I compiled this tutorial:


https://api.projectchrono.org/tutorial_demo__f_e_a_cosimulate_load.html


which compiles fine but I am missing the rest of the files that go with the example so it doesn't run. I'll have a look through the git repo to see if I can find them, but at the same time if someone can point me to a nice simple example that would be great.


Much Thanks,


Richard





This email is governed by the Terms and Conditions found in our Disclaimer<http://www.mi.mun.ca/ict/disclaimer>.

Dan Negrut

unread,
Nov 20, 2022, 8:08:17 PM11/20/22
to Richard Kelly, ProjectChrono, ivan.marti...@uvigo.es
Ivan - is there any way you can help Richard with this issue?
Dan

-------------------------------------------------
Bernard A. and Frances M. Weideman Professor
NVIDIA CUDA Fellow
Director, Wisconsin Applied Computing Center
Department of Mechanical Engineering
Department of Computer Science
University of Wisconsin - Madison
4150ME, 1513 University Avenue
Madison, WI 53706-1572
608 772 0914
http://sbel.wisc.edu/
http://projectchrono.org/
-------------------------------------------------
--
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 projectchron...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/6633198a1d5348a2b6dcdffa2a517d05%40mi.mun.ca.

Iván Martínez Estévez

unread,
Nov 21, 2022, 10:12:29 AM11/21/22
to Dan Negrut, Richard Kelly, ProjectChrono
Dear Richard,

The class ChBodyEasyMesh may be used in order to import a mesh in Project Chrono, for example:  auto mesh = chrono_types::make_shared<ChBodyEasyMesh>(GetChronoDataFile("models/cube.obj"), 100.0, mat, 0.05, csys_type);
This code is included in the package of Chrono: https://github.com/projectchrono/chrono/blob/main/src/demos/irrlicht/demo_IRR_visualize_collision.cpp
Note that you should enable the use of the Irrlicht module to compile and execute the suggested case.

Another thing, please let me know if you have any problem or you need help dealing with the coupling DualSPHysics-Chrono.

Regards,
Iván

El lun, 21 nov 2022 a las 2:08, Dan Negrut (<neg...@wisc.edu>) escribió:
Ivan - is there any way you can help Richard with this issue?
Dan

-------------------------------------------------
Bernard A. and Frances M. Weideman Professor
NVIDIA CUDA Fellow
Director, Wisconsin Applied Computing Center
Department of Mechanical Engineering
Department of Computer Science
University of Wisconsin - Madison
4150ME, 1513 University Avenue
Madison, WI 53706-1572
608 772 0914
-------------------------------------------------

-----Original Message-----
From: projec...@googlegroups.com <projec...@googlegroups.com> On Behalf Of Richard Kelly
Sent: Friday, November 18, 2022 9:35 AM
To: ProjectChrono <projec...@googlegroups.com>
Subject: [chrono] import mesh to project chrono

Hi all,



I am trying to simulate a boat on the water in project Chrono. I know I have some work ahead of me. As a first step I am just trying to get a couple of motors working with props. I have spent signigicant time trying to get the working with DualSPHysics and am now working through how Chrono works. Can anyone point me to a simple example of how to import a mesh? I found this example online:



but that uses pychrono. I am currently using the C++ API.


Then I compiled this tutorial:




which compiles fine but I am missing the rest of the files that go with the example so it doesn't run. I'll have a look through the git repo to see if I can find them, but at the same time if someone can point me to a nice simple example that would be great.


Much Thanks,


Richard







--
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 projectchron...@googlegroups.com.

Richard Kelly

unread,
Nov 21, 2022, 11:21:21 AM11/21/22
to Iván Martínez Estévez, ProjectChrono, Dan Negrut

Hi Ivan,

 

Thanks for the response. I’ll give that example a go. I do have Irrlicht working with some of the other examples. Also a big thank you for offering to provide some help with the coupling of DualSPHysics and Chrono.  I will take you up on that offer. I have spent a fair bit of time working on it from the DualSPHysics side of things but have been getting strange results. I didn’t see the source of Chrono that DualSPHysics is using, but there seems to be some modification of the library to make it work. If I were to guess, I would Imagine DualSPHysics is using links and not motors, but that is just a guess. I would like to add some real time controls of the motors. I was just overwriting the angular velocity of a boats prop which worked for about a second of simulation time and then the Prop would become instable.  So now I am playing around with Project Chrono to better understand its workings and capabilities.  I also noticed that DualSPHysics comes with its own SPH solver, FSI.. I don’t know if it is worth looking at that route as well. Thanks for your help. It is greatly appreciated. For now I’ll spend my afternoon looking through the example you provided. I have also been playing around with the demo_MCORE_motors example as well. With the example you sent I’ll try to replace a rotating rectangle with a prop and report back my results.

 

Thanks again for your help.

 

It is appreciated.

 

From: Iván Martínez Estévez <ivan.marti...@uvigo.es>
Sent: Monday, November 21, 2022 11:37 AM
To: Richard Kelly <Richar...@mi.mun.ca>
Cc: ProjectChrono <projec...@googlegroups.com>; Dan Negrut <neg...@wisc.edu>
Subject: Re: import mesh to project chrono

 

Dear Richard,

 

The class ChBodyEasyMesh may be used in order to import a mesh in Project Chrono, for example as:  auto mesh = chrono_types::make_shared<ChBodyEasyMesh>(GetChronoDataFile("models/cube.obj"), 100.0, mat, 0.05, csys_type);

Note that you should enable the use of the Irrlicht module to compile and execute the suggested case.

 

Another thing, please let me know if you have any problem or you need help dealing with the coupling DualSPHysics-Chrono.

 

Regards,

Iván

El lun, 21 nov 2022 a las 2:08, Dan Negrut (<neg...@wisc.edu>) escribió:

Ivan - is there any way you can help Richard with this issue?
Dan

-------------------------------------------------
Bernard A. and Frances M. Weideman Professor
NVIDIA CUDA Fellow
Director, Wisconsin Applied Computing Center
Department of Mechanical Engineering
Department of Computer Science
University of Wisconsin - Madison
4150ME, 1513 University Avenue
Madison, WI 53706-1572
608 772 0914

-------------------------------------------------

-----Original Message-----
From: projec...@googlegroups.com <projec...@googlegroups.com> On Behalf Of Richard Kelly
Sent: Friday, November 18, 2022 9:35 AM
To: ProjectChrono <projec...@googlegroups.com>
Subject: [chrono] import mesh to project chrono

Hi all,



I am trying to simulate a boat on the water in project Chrono. I know I have some work ahead of me. As a first step I am just trying to get a couple of motors working with props. I have spent signigicant time trying to get the working with DualSPHysics and am now working through how Chrono works. Can anyone point me to a simple example of how to import a mesh? I found this example online:



but that uses pychrono. I am currently using the C++ API.


Then I compiled this tutorial:




which compiles fine but I am missing the rest of the files that go with the example so it doesn't run. I'll have a look through the git repo to see if I can find them, but at the same time if someone can point me to a nice simple example that would be great.


Much Thanks,


Richard







--
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 projectchron...@googlegroups.com.


 

--

Iván Martínez Estévez

PhD Student in Computer Science

Environmental Physics Laboratory (EPhysLab), CIM-UVIGO

Universidade de Vigo

Edificio do Campus da Auga

Rúa Canella da Costa da Vela 12, Campus Sur

32004 Ourense, SPAIN

Phone number: +34988387270

Iván Martínez Estévez

unread,
Nov 21, 2022, 1:14:00 PM11/21/22
to Richard Kelly, ProjectChrono, Dan Negrut
The available coupling DualSPHysics-Chrono does not allow the use of motors yet, but it includes the ChLinkLockRevolute constraint of Project Chrono to simulate rotational joints. In case you need something in depth about DualSPHysics, feel free to contact me.

Regards,
Iván

Richard Kelly

unread,
Nov 24, 2022, 10:08:49 AM11/24/22
to Iván Martínez Estévez, ProjectChrono, Dan Negrut
Hi Ivan,


I have the example you suggested working and was able to bring in a mesh to act as a prop on a motor. I am going to play around some more with DualSPHysics now. My goal is to be able to control the props in the simulation and see what that does to the the fluid and motion of the hull. My understanding is that you can setup the initials with the current chrono coupling but not set them in simulation? I guess that makes sense if it is a link? It seems that the chrono lib in the DualSPHysics is modified.. Any chance you know where I can get the source for that so I can better understand the coupling? Again any help or suggestions would be greatly appreciated.


Richard


________________________________
From: Iván Martínez Estévez <i.martin...@gmail.com>
Sent: Monday, November 21, 2022 2:43 PM
To: Richard Kelly
Cc: ProjectChrono; Dan Negrut
Subject: Re: import mesh to project chrono

The available coupling DualSPHysics-Chrono does not allow the use of motors yet, but it includes the ChLinkLockRevolute constraint of Project Chrono to simulate rotational joints. In case you need something in depth about DualSPHysics, feel free to contact me.

Regards,
Iván


El lun, 21 nov 2022 a las 17:21, Richard Kelly (<Richar...@mi.mun.ca<mailto:Richar...@mi.mun.ca>>) escribió:
Hi Ivan,

Thanks for the response. I’ll give that example a go. I do have Irrlicht working with some of the other examples. Also a big thank you for offering to provide some help with the coupling of DualSPHysics and Chrono. I will take you up on that offer. I have spent a fair bit of time working on it from the DualSPHysics side of things but have been getting strange results. I didn’t see the source of Chrono that DualSPHysics is using, but there seems to be some modification of the library to make it work. If I were to guess, I would Imagine DualSPHysics is using links and not motors, but that is just a guess. I would like to add some real time controls of the motors. I was just overwriting the angular velocity of a boats prop which worked for about a second of simulation time and then the Prop would become instable. So now I am playing around with Project Chrono to better understand its workings and capabilities. I also noticed that DualSPHysics comes with its own SPH solver, FSI.. I don’t know if it is worth looking at that route as well. Thanks for your help. It is greatly appreciated. For now I’ll spend my afternoon looking through the example you provided. I have also been playing around with the demo_MCORE_motors example as well. With the example you sent I’ll try to replace a rotating rectangle with a prop and report back my results.

Thanks again for your help.

It is appreciated.

From: Iván Martínez Estévez <ivan.marti...@uvigo.es<mailto:ivan.marti...@uvigo.es>>
Sent: Monday, November 21, 2022 11:37 AM
To: Richard Kelly <Richar...@mi.mun.ca<mailto:Richar...@mi.mun.ca>>
Cc: ProjectChrono <projec...@googlegroups.com<mailto:projec...@googlegroups.com>>; Dan Negrut <neg...@wisc.edu<mailto:neg...@wisc.edu>>
Subject: Re: import mesh to project chrono

Dear Richard,

The class ChBodyEasyMesh may be used in order to import a mesh in Project Chrono, for example as: auto mesh = chrono_types::make_shared<ChBodyEasyMesh>(GetChronoDataFile("models/cube.obj"), 100.0, mat, 0.05, csys_type);
This code is included in the package of Chrono: https://github.com/projectchrono/chrono/blob/main/src/demos/irrlicht/demo_IRR_visualize_collision.cpp<https://urldefense.com/v3/__https://github.com/projectchrono/chrono/blob/main/src/demos/irrlicht/demo_IRR_visualize_collision.cpp__;!!D9dNQwwGXtA!UtxWPGQrI4n7i494zHMd2PUgzq217e7fYcS_tsa2liE21m0OFc7by45d_rbypGQC5JuXlgKZt53axXC5xlD5DrMVHjG9gIhDWTs_iA$>
Note that you should enable the use of the Irrlicht module to compile and execute the suggested case.

Another thing, please let me know if you have any problem or you need help dealing with the coupling DualSPHysics-Chrono.

Regards,
Iván

El lun, 21 nov 2022 a las 2:08, Dan Negrut (<neg...@wisc.edu<mailto:neg...@wisc.edu>>) escribió:
Ivan - is there any way you can help Richard with this issue?
Dan

-------------------------------------------------
Bernard A. and Frances M. Weideman Professor
NVIDIA CUDA Fellow
Director, Wisconsin Applied Computing Center
Department of Mechanical Engineering
Department of Computer Science
University of Wisconsin - Madison
4150ME, 1513 University Avenue
Madison, WI 53706-1572
608 772 0914
https://urldefense.com/v3/__http://sbel.wisc.edu/__;!!D9dNQwwGXtA!QbywaaeG0V_1TxapZwzkvu0Tq40k-aFkNAROV5GgGxYKQd09lKR0HmRZgEnG2CZrIWBnyewKCEZHWpHe6XBmeYYUpWg$<https://urldefense.com/v3/__http:/sbel.wisc.edu/__;!!D9dNQwwGXtA!QbywaaeG0V_1TxapZwzkvu0Tq40k-aFkNAROV5GgGxYKQd09lKR0HmRZgEnG2CZrIWBnyewKCEZHWpHe6XBmeYYUpWg$>
https://urldefense.com/v3/__http://projectchrono.org/__;!!D9dNQwwGXtA!QbywaaeG0V_1TxapZwzkvu0Tq40k-aFkNAROV5GgGxYKQd09lKR0HmRZgEnG2CZrIWBnyewKCEZHWpHe6XBmKyr4n4E$<https://urldefense.com/v3/__http:/projectchrono.org/__;!!D9dNQwwGXtA!QbywaaeG0V_1TxapZwzkvu0Tq40k-aFkNAROV5GgGxYKQd09lKR0HmRZgEnG2CZrIWBnyewKCEZHWpHe6XBmKyr4n4E$>
-------------------------------------------------

-----Original Message-----
From: projec...@googlegroups.com<mailto:projec...@googlegroups.com> <projec...@googlegroups.com<mailto:projec...@googlegroups.com>> On Behalf Of Richard Kelly
Sent: Friday, November 18, 2022 9:35 AM
To: ProjectChrono <projec...@googlegroups.com<mailto:projec...@googlegroups.com>>
Subject: [chrono] import mesh to project chrono

Hi all,



I am trying to simulate a boat on the water in project Chrono. I know I have some work ahead of me. As a first step I am just trying to get a couple of motors working with props. I have spent signigicant time trying to get the working with DualSPHysics and am now working through how Chrono works. Can anyone point me to a simple example of how to import a mesh? I found this example online:

https://urldefense.com/v3/__https://api.projectchrono.org/development/tutorial_pychrono_demo_mesh.html__;!!D9dNQwwGXtA!QbywaaeG0V_1TxapZwzkvu0Tq40k-aFkNAROV5GgGxYKQd09lKR0HmRZgEnG2CZrIWBnyewKCEZHWpHe6XBmL69Agjg$<https://urldefense.com/v3/__https:/api.projectchrono.org/development/tutorial_pychrono_demo_mesh.html__;!!D9dNQwwGXtA!QbywaaeG0V_1TxapZwzkvu0Tq40k-aFkNAROV5GgGxYKQd09lKR0HmRZgEnG2CZrIWBnyewKCEZHWpHe6XBmL69Agjg$>


but that uses pychrono. I am currently using the C++ API.


Then I compiled this tutorial:


https://urldefense.com/v3/__https://api.projectchrono.org/tutorial_demo__f_e_a_cosimulate_load.html__;!!D9dNQwwGXtA!QbywaaeG0V_1TxapZwzkvu0Tq40k-aFkNAROV5GgGxYKQd09lKR0HmRZgEnG2CZrIWBnyewKCEZHWpHe6XBmPXV2RBc$<https://urldefense.com/v3/__https:/api.projectchrono.org/tutorial_demo__f_e_a_cosimulate_load.html__;!!D9dNQwwGXtA!QbywaaeG0V_1TxapZwzkvu0Tq40k-aFkNAROV5GgGxYKQd09lKR0HmRZgEnG2CZrIWBnyewKCEZHWpHe6XBmPXV2RBc$>


which compiles fine but I am missing the rest of the files that go with the example so it doesn't run. I'll have a look through the git repo to see if I can find them, but at the same time if someone can point me to a nice simple example that would be great.


Much Thanks,


Richard





This email is governed by the Terms and Conditions found in our Disclaimer<https://urldefense.com/v3/__http://www.mi.mun.ca/ict/disclaimer__;!!D9dNQwwGXtA!QbywaaeG0V_1TxapZwzkvu0Tq40k-aFkNAROV5GgGxYKQd09lKR0HmRZgEnG2CZrIWBnyewKCEZHWpHe6XBmSg7df4w$<https://urldefense.com/v3/__http:/www.mi.mun.ca/ict/disclaimer__;!!D9dNQwwGXtA!QbywaaeG0V_1TxapZwzkvu0Tq40k-aFkNAROV5GgGxYKQd09lKR0HmRZgEnG2CZrIWBnyewKCEZHWpHe6XBmSg7df4w$> >.

--
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 projectchron...@googlegroups.com<mailto:projectchrono%2Bunsu...@googlegroups.com>.
To view this discussion on the web visit https://urldefense.com/v3/__https://groups.google.com/d/msgid/projectchrono/6633198a1d5348a2b6dcdffa2a517d05*40mi.mun.ca__;JQ!!D9dNQwwGXtA!QbywaaeG0V_1TxapZwzkvu0Tq40k-aFkNAROV5GgGxYKQd09lKR0HmRZgEnG2CZrIWBnyewKCEZHWpHe6XBmbYe_D0w$<https://urldefense.com/v3/__https:/groups.google.com/d/msgid/projectchrono/6633198a1d5348a2b6dcdffa2a517d05*40mi.mun.ca__;JQ!!D9dNQwwGXtA!QbywaaeG0V_1TxapZwzkvu0Tq40k-aFkNAROV5GgGxYKQd09lKR0HmRZgEnG2CZrIWBnyewKCEZHWpHe6XBmbYe_D0w$> .
Message has been deleted

Iván Martínez Estévez

unread,
Nov 25, 2022, 4:12:35 AM11/25/22
to Richard Kelly, ProjectChrono, Dan Negrut
Dear Richard,

The DualSPHysics package (v5.0.5) available in its website (https://dual.sphysics.org/downloads) includes several examples, in the folder DualSPHysics/examples/chrono/12_ExternalVelocity, of how to impose a motion to a prop by using external velocity. This package contains the coupling with Chrono as a precompiled library, which was generated from the source code of Chrono with several changes to allow DualSPHysics-Chrono coupling. There is a paper about this coupling that may be of interest:  Martínez-Estévez, I., Domínguez, J. M., Tagliafierro, B., Canelas, R. B., García-Feal, O., Crespo, A. J. C., & Gómez-Gesteira, M. (2023). Coupling of an SPH-based solver with a multiphysics library. Computer Physics Communications, 283, 108581. https://doi.org/10.1016/j.cpc.2022.108581

Regards
Iván
Reply all
Reply to author
Forward
0 new messages