Hi Gianni,

All tracker-related methods can only be used after initialization, meaning 
you have to call *SetGeometryWildcardValues *after *Initialize()*. I know 
this is self-evident, but just remember the rule of thumb: trackers are 
used to modify the states (pos, vel...) of the simulation objects, and when 
you need to modify the states of objects, the simulation world has to be 
"initialized" first so these quantities exist; while simulation object 
definitions, such as *InformCentroidPrincipal *or material property 
assignments, are in general done before initialization.

As for *InformCentroidPrincipal*, I realized that the comments for the mesh 
version of the method have some copy-paste artifacts which I'll fix soon. 
But I think your understanding is basically correct (with a loose usage of 
"geometrical center"). I'll write down how I see these methods should be 
used, and I think your notes regarding the principal axes are equivalent:

These two methods are used w.r.t. the underlying frame you created the mesh 
with. If you want fewer brain teasers, it's preferable to choose to create 
the mesh with the CoM of the object that the mesh represents at (0, 0, 0) 
and its principal frame aligned with XYZ. If you do this, then you never 
need to call *InformCentroidPrincipal* or *Move*. However, if you did not 
do this during mesh creation, then *InformCentroidPrincipal* or *Move* can 
be used as remedial measures. You can use *InformCentroidPrincipal *to 
notify the solver where the CoM and principal frame are in the mesh's own 
underlying frame (then the mesh will be modified accordingly under the 
hood). I wouldn't suggest using *Move *as its name does suggest something 
ambiguous but it's intended for the same purpose: using it here means 
rotating and then translating the mesh in the hope that after this, its 
principal frame agrees with its underlying frame. Whether you call the 
methods or not, after the simulation starts, the meshed objects' simulation 
world pos/rot always means the pos/rot of its principal frame.

And it's correct that you can use *SetMOI *to fully define the object.

Thank you,
Ruochun

On Monday, January 20, 2025 at 7:08:31 AM UTC+8 [email protected] wrote:

> Hi Ruochun,
>
> sorry again but I have a few more questions regarding DEM-Engine.
>
> First, I am using as template the code "test_DEME_BallDrop_Cosim.cpp". I 
> have created my assembly in project chrono with the motors I need, while 
> for the DEM-Engine part I imported a mesh of a box so that I can apply to 
> all the triangles composing the body some properties using the Wildcards. 
> This would allow me to simulate electrostatic interaction between the body 
> and the particles and other physical effects. This is the part of my code 
> where I deal with it.
>
> [image: Screenshot From 2025-01-19 23-42-11.png]
>
> However, when I try to run the simulation it exits with the following 
> error:
> [image: Screenshot From 2025-01-19 23-42-34.png]
>
> Have you got any idea about how to solve this problem?
>
> Second, I wanted to ask you an explanation about the difference between 
> the "move" and "InformCentroidPrincipal" functions. I read the online 
> documentation but I am not sure to fully understand their difference. Do 
> they allow to assign to the body's CoM a different position with respect to 
> the geometrical center and to state how the principal inertia axis are 
> oriented with respect to the global frame? If so, then I could specify the 
> principal moment of inertia with "SetMoi" and my body would be fully 
> defined. In case I am completely wrong, is there another way to do this?
>
> Thank for your time.
>
> Gianni
> Il giorno sabato 18 gennaio 2025 alle 23:55:16 UTC+1 Gianni Curti ha 
> scritto:
>
>> Hi Ruochun,
>>
>> in the end, I solved the problem by installing again a new driver. This 
>> time I picked the version 560.35.03 and everything works again now. 
>> However, it is quite surprising for me since before I was working with the 
>> driver version specifically recommended by NVIDIA website.
>>
>> Thank you again for your time.
>>
>> Gianni
>>
>> Il giorno sabato 18 gennaio 2025 alle 21:49:48 UTC+1 Ruochun Zhang ha 
>> scritto:
>>
>>> Hi Gianni,
>>>
>>> From what I know, the CUDA version shown by *nvidia-smi *is the *maximum 
>>> *CUDA version supported by the current driver. It looks like it does 
>>> not support the CUDA installation you have (I get flashbacks from our 
>>> previous posts...). About the error in DEME, it shows the program failed at 
>>> the first GPU call, when it tried to detect the number of devices the 
>>> system has. So indeed, there is a high chance that the driver does not work.
>>>
>>> I know managing the environment can be frustrating, but if the code ran 
>>> well before, and you got this after the driver update, then I'd definitely 
>>> undo the driver update, and see if that can undo the damage and revert the 
>>> code to a runnable state. After that, I'd start experimenting if I can 
>>> update the driver to a more preferrable version that supports CUDA 12.6.
>>>
>>> Thank you,
>>> Ruochun
>>>
>>> On Sunday, January 19, 2025 at 1:32:03 AM UTC+8 [email protected] 
>>> wrote:
>>>
>>>> Hi Ruochun and Dario,
>>>>
>>>> thank you for your answers.
>>>>
>>>> Now I have solved the problem with my driver and I have the version 
>>>> 550.142 correctly working. However, I am not able to run DEM-Engine 
>>>> scripts 
>>>> anymore since I always have the following problem:
>>>>
>>>> [image: Screenshot From 2025-01-18 18-26-11.png]
>>>>
>>>> I have also tried to compile again from source DEM-Engine but the 
>>>> problem persists. I attach also the cmakecache in case it helps. I am 
>>>> using 
>>>> GNU 11.5 and nvidia-smi and nvcc --version give the following correct 
>>>> outputs:
>>>> [image: Screenshot From 2025-01-18 18-30-05.png]
>>>>
>>>> Thank you for your kindness.
>>>>
>>>> Gianni
>>>> Il giorno sabato 11 gennaio 2025 alle 11:17:16 UTC+1 
>>>> [email protected] ha scritto:
>>>>
>>>>> Just a side note: I saw that you enabled Multicore and you are playing 
>>>>> with CUDA; please mind that USE_MULTICORE_CUDA is currently bugged, at 
>>>>> least on Win. 
>>>>> I have the fix but not yet pushed so if you are trying things around 
>>>>> do not get mad with that. 
>>>>>
>>>>> Il giorno sabato 11 gennaio 2025 alle 04:21:47 UTC+1 Ruochun Zhang ha 
>>>>> scritto:
>>>>>
>>>>>> Hi Gianni,
>>>>>>
>>>>>> For building this Chrono-DEME co-simulation project, it probably 
>>>>>> doesn't matter. You could try if you can run the smallest demo in it 
>>>>>> which 
>>>>>> is the ball drop co-simulation version. If it runs, everything should be 
>>>>>> fine.
>>>>>>
>>>>>> Thank you,
>>>>>> Ruochun
>>>>>>
>>>>>> On Saturday, January 11, 2025 at 4:22:05 AM UTC+8 [email protected] 
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Ruochun,
>>>>>>>
>>>>>>> I found that the power cap problem for nvidia GPU has been widely 
>>>>>>> discussed and reported. I found out that one possible solution could be 
>>>>>>> downgrading the driver to 525 version, which is still compatible with 
>>>>>>> both 
>>>>>>> CUDA 12.3 and 12.6 and capable of allowing the user to set the power 
>>>>>>> cap as 
>>>>>>> desired.
>>>>>>>
>>>>>>> Another question that came up to me while compiling a project with 
>>>>>>> chrono and DEME is the following one. As you can see in the image, 
>>>>>>> cmake 
>>>>>>> detects the CUDA version 12.3 which satisfies Multicore. However, I 
>>>>>>> know 
>>>>>>> from the instructions that DEME does not work well with this version. 
>>>>>>> Thus, 
>>>>>>> which CUDA version do you advice to specify to cmake? I tried with CUDA 
>>>>>>> 12.3 and everything seems to work at a first glance but I want to be 
>>>>>>> sure 
>>>>>>> of what I am doing.
>>>>>>> [image: Screenshot From 2025-01-10 21-11-26.png]
>>>>>>>
>>>>>>> Thank you again.
>>>>>>>
>>>>>>> Gianni
>>>>>>> Il giorno venerdì 10 gennaio 2025 alle 00:10:25 UTC+1 Ruochun Zhang 
>>>>>>> ha scritto:
>>>>>>>
>>>>>>>> Hi Gianni,
>>>>>>>>
>>>>>>>> That's good to know. I'd like to note that depending on the model 
>>>>>>>> of your GPU and the problem you are running, it could be natural that 
>>>>>>>> the 
>>>>>>>> actual consumption is a bit far from the power limit. But as you said, 
>>>>>>>> it 
>>>>>>>> could also be related to the driver. DEME does not touch the driver so 
>>>>>>>> I 
>>>>>>>> would say if you don't update the driver out of the CUDA installation 
>>>>>>>> supported range, then it should be fine.
>>>>>>>>
>>>>>>>> Thank you,
>>>>>>>> Ruochun
>>>>>>>>
>>>>>>>> On Friday, January 10, 2025 at 6:28:54 AM UTC+8 [email protected] 
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi Ruochun,
>>>>>>>>> thank you again now everything is working fine! 
>>>>>>>>> However, I have another question related to the nvidia driver. For 
>>>>>>>>> now, I have the 560 version and I have noticed a power cap on my GPU 
>>>>>>>>> of 35W 
>>>>>>>>> against the 110W limit specified by the manufacturer. Looking in some 
>>>>>>>>> forums I understood that the problem may be related to the driver 
>>>>>>>>> itself, 
>>>>>>>>> therefore I want to update it. Do you know if this will cause any 
>>>>>>>>> problem 
>>>>>>>>> to DEME?
>>>>>>>>>
>>>>>>>>> Thank you again.
>>>>>>>>>
>>>>>>>>> Gianni 
>>>>>>>>>
>>>>>>>>> Il giorno giovedì 9 gennaio 2025 alle 11:54:59 UTC+1 Ruochun Zhang 
>>>>>>>>> ha scritto:
>>>>>>>>>
>>>>>>>>>> Hi Gianni,
>>>>>>>>>>
>>>>>>>>>> The error you saw is about an outdated API. *UpdateStepSize *now 
>>>>>>>>>> needs a number as an argument. I am surprised I didn't spot it when 
>>>>>>>>>> I tried 
>>>>>>>>>> it. It's certainly not a big problem though: I pushed a new version 
>>>>>>>>>> of 
>>>>>>>>>> chrono-project, could you please do a pull and rebuild the project? 
>>>>>>>>>> Thank 
>>>>>>>>>> you for the catch and for testing it!
>>>>>>>>>>
>>>>>>>>>> Ruochun
>>>>>>>>>>
>>>>>>>>>> On Thursday, January 9, 2025 at 8:33:31 AM UTC+8 
>>>>>>>>>> [email protected] wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi Ruochun,
>>>>>>>>>>>
>>>>>>>>>>> first of all thank you for your patience. I did more attempts 
>>>>>>>>>>> and in the end, I saw that the problem was due to the fact that I 
>>>>>>>>>>> cloned 
>>>>>>>>>>> the main branch of chrono-projects. Instead, if I clone the 
>>>>>>>>>>> feature/DEME 
>>>>>>>>>>> branch the prompt "ENABLE_DEME_TESTS" appears and I can link DEME 
>>>>>>>>>>> against 
>>>>>>>>>>> Chrono. However, while building the following errors appear.
>>>>>>>>>>>
>>>>>>>>>>> [image: Screenshot From 2025-01-09 01-27-19.png]
>>>>>>>>>>>
>>>>>>>>>>> I left as active only the option to compile the scripts where 
>>>>>>>>>>> DEME and Chrono are used together since in Chrono I have only Core, 
>>>>>>>>>>> Vehicle 
>>>>>>>>>>> and Multicore installed so I didn't want to trigger some kind of 
>>>>>>>>>>> error 
>>>>>>>>>>> related to other missing modules. To be clearer, these are the 
>>>>>>>>>>> screenshots 
>>>>>>>>>>> showing CMAKE settings and outputs during configuration.
>>>>>>>>>>>
>>>>>>>>>>> [image: Screenshot From 2025-01-09 01-20-39.png]
>>>>>>>>>>>
>>>>>>>>>>> [image: Screenshot From 2025-01-09 01-21-43.png]
>>>>>>>>>>>
>>>>>>>>>>> [image: Screenshot From 2025-01-09 01-21-57.png]
>>>>>>>>>>>
>>>>>>>>>>> [image: Screenshot From 2025-01-09 01-22-09.png]
>>>>>>>>>>>
>>>>>>>>>>> [image: Screenshot From 2025-01-09 01-22-36.png]
>>>>>>>>>>>
>>>>>>>>>>> Thank you again.
>>>>>>>>>>>
>>>>>>>>>>> Gianni
>>>>>>>>>>>
>>>>>>>>>>> Il giorno mercoledì 8 gennaio 2025 alle 20:53:17 UTC+1 Ruochun 
>>>>>>>>>>> Zhang ha scritto:
>>>>>>>>>>>
>>>>>>>>>>>> Hi Gianni,
>>>>>>>>>>>>
>>>>>>>>>>>> Can you post a screenshot of the Cmake UI after you 
>>>>>>>>>>>> "ENABLE_PROJECTS" and re-generate? If DEME-DIR is not shown, I'd 
>>>>>>>>>>>> like to 
>>>>>>>>>>>> know what is shown. Besides, if there is any warning or error in 
>>>>>>>>>>>> the 
>>>>>>>>>>>> process, please show them too.
>>>>>>>>>>>>
>>>>>>>>>>>> Ruochun
>>>>>>>>>>>>
>>>>>>>>>>>> On Thursday, January 9, 2025 at 2:09:38 AM UTC+8 
>>>>>>>>>>>> [email protected] wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>> I am trying to compile DEM-Engine as a Chrono library on my pc 
>>>>>>>>>>>>> running a Linux system on Ubuntu 24.10. I have already compiled 
>>>>>>>>>>>>> both 
>>>>>>>>>>>>> Project Chrono (with CUDA toolkit 12.3) and DEM-Engine (with CUDA 
>>>>>>>>>>>>> toolkit 
>>>>>>>>>>>>> 12.6). I am following the instructions given on the website to 
>>>>>>>>>>>>> complete 
>>>>>>>>>>>>> this passage but I am stuck at the point where I have to set the 
>>>>>>>>>>>>> field 
>>>>>>>>>>>>> DEME-DIR. In fact, this field does not appear even though I have 
>>>>>>>>>>>>> put 
>>>>>>>>>>>>> "ENABLE_PROJECTS" to ON therefore I am unable to link DEM-Engine 
>>>>>>>>>>>>> with 
>>>>>>>>>>>>> Chrono.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Could you please give me some guidance about how to resolve 
>>>>>>>>>>>>> the problem?
>>>>>>>>>>>>> Plus, do I need CUDA 12.3 or 12.6 to complete this process?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thank you in advance for your assistance and kindness.
>>>>>>>>>>>>>
>>>>>>>>>>>>> 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/b09debd2-33ab-46be-a41c-355d826d7d5cn%40googlegroups.com.

Reply via email to