Information about DEM-Engine

316 views
Skip to first unread message

Davide

unread,
Dec 7, 2023, 9:49:13 AM12/7/23
to ProjectChrono
Hi all,
I am writing my master's thesis about tyre-ground interaction and I have read that there is the possibility to use DEM-engine in collaboration with Chrono. I was wondering if it could work also on CPU or on a single GPU instead of two.
Thank you in advance!

Davide

Radu Serban

unread,
Dec 8, 2023, 12:13:47 PM12/8/23
to ProjectChrono

Hi Davide,

 

Yes, you can set up a co-simulation between a Chrono system and a DEM-E granular system.  DEM-E should also work with a single GPU.

 

Another alternative is to use the Chrono::GPU module in Chrono (which is the precursor to DEM-E). That is a (single) GPU-based DEM simulation tool, but has certain limitations compared to DEM-E (most notably is that it can only work with mono-disperse granular material).

 

For a CPU based solution, you can use the Chrono::Multicore module which is an OpenMP-parallelized solver for granular and multibody dynamics.  While performance is lower than with a GPU code, Chrono::Multicore allows monolithic simulation of vehicles on granular terrain (no need to set up a co-simulation), allows you to use arbitrary particle shapes (but beware that more complex particle geometries will obviously affect performance), and supports both smooth and non-smooth contact formulations (while all GPU-based DEM solvers only support the smooth contact formulation).

 

For vehicle-terrain interaction problems, you may want to also look at the co-simulation framework in Chrono::Vehicle which allows you to co-simulate a Chrono vehicle model with any of the terrain systems (rigid or deformable) available in Chrono (currently, DEM-E is not supported but I may add that sometime in the future).

 

--Radu

--
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/d5ca2e15-b5c8-4680-9192-882b4260b9bdn%40googlegroups.com.

Ruochun Zhang

unread,
Dec 8, 2023, 7:07:28 PM12/8/23
to ProjectChrono
Hi Davide,

To add a bit further explanation in addition to Radu's reply... DEM-Engine works on one GPU. 

For running co-simulation with DEM-Engine specifically, you can:
  1. Use pyDEME, in conjunction with pyChrono or other python packages. This is probably easy.
  2. Refer to this post or this section of DEME's documentation to build the C++ version of DEME as a library, then link your simulation scripts against it. This gives you C++ performance.
For other potential approaches to your research project, you can explore the options in Radu's reply.

Thank you,
Ruochun

Davide

unread,
Dec 14, 2023, 10:53:13 AM12/14/23
to ProjectChrono
Thank you Ruochun and Radu for your answer! So, is it fine to use only one GPU for Chrono and DEM-Engine? Apart from higher computational time, are there other critical issues?

Ruochun Zhang

unread,
Dec 14, 2023, 11:49:00 AM12/14/23
to ProjectChrono
Hi Davide,

Yes, it's fine. The utility provided by DEME remains completely the same. As you noted, the only difference is the computational time and the amount of VRAM that you have access to.

Ruochun

Davide

unread,
Dec 15, 2023, 4:56:07 AM12/15/23
to ProjectChrono
Thank you very much for your quick answer! Could you give me an indicative estimate of the weight of the final results of a vehicle simulation + terrain DEM? 

Davide

Ruochun Zhang

unread,
Dec 15, 2023, 5:05:03 AM12/15/23
to ProjectChrono
Hi Davide,

I didn't quite understand. The weight in terms of what? Did you mean the total weight of all the simulation entities?

Thank you,
Ruochun

Davide

unread,
Dec 15, 2023, 5:25:26 AM12/15/23
to Ruochun Zhang, ProjectChrono
Hi Ruochun,
I mean how much does it weight, on average, a simulation of a vehicle + terrain DEM in terms of GB. I know that it could depend on several factors such as the number of particles involved or the simulation time, but I would like to know just a rough estimate.

Thank you,
Davide

--
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.

Ruochun Zhang

unread,
Dec 15, 2023, 11:29:50 AM12/15/23
to ProjectChrono
Hi Davide,

I see. If it's a full-vehicle mobility simulation we are talking about, then compared to the terrain, the memory needed for a vehicle is negligible. For a test bed ~20m² in area and ~30cm in depth and using elements with size ~1cm (which is usually enough for accuracy), I expect 1.5M complex-shaped elements, and that probably uses something like 3 GiB, which is possible with consumer cards.  It is, of course, a rough estimate and it's easy to shift that number up or down by an order of magnitude by selecting your own element size. The simulation time usually does not have an impact on the memory needed. 

Thank you,
Ruochun

Davide

unread,
Dec 23, 2023, 10:02:41 AM12/23/23
to ProjectChrono
Thank you Ruochun for your answer! Just a clarification: given that DEME works only on Linux, also Chrono must be installed on Linux or is it possible to work with the Windows version of Chrono?

Ruochun Zhang

unread,
Dec 23, 2023, 7:27:42 PM12/23/23
to ProjectChrono
Hi Davide,

Unless you are willing to do something super hacky, I'd say Chrono should be installed on Linux too, if you are going to do co-simulations between DEME and Chrono (true for both C++ and Python versions). Until I found a solution to the Windows build problem, that is.

Thank you,
Ruochun

Davide

unread,
Dec 28, 2023, 4:44:39 AM12/28/23
to Ruochun Zhang, ProjectChrono
Hi Ruochun,
Thank you for your answer! Just a further clarification: is it necessary to have a NVIDIA GPU? Could DEM-Engine also work on an AMD GPU?

Ruochun Zhang

unread,
Dec 30, 2023, 8:54:49 AM12/30/23
to ProjectChrono
Hi Davide,

Then this is asking whether you can run CUDA code on AMD GPUs. While tools like Heterogeneous-compute Interface for Portability might offer porting CUDA code to HIP code for AMD GPUs to run, you probably see more failures than successes. For DEME, the chance that it works is even slimmer since it uses NIVIDA jitify. So I'd say no, unless you are super hacky and ready to legitimately become a developer of DEME by contributing to it.

Thank you,
Ruochun

Reply all
Reply to author
Forward
0 new messages