Link unexpected behavior

99 views
Skip to first unread message

Aleksandr Prokhorov

unread,
Nov 6, 2024, 2:49:01 PM11/6/24
to ProjectChrono
Dear CHRONO.

I have started to investigate a CHRONO engine recently.
The problem I am trying to solve is the control of 1-DOF system in the application of the quarter-car model. I have a picture of my model assembly.

Scheme1DOF.png

The links a Initialized with te next constraints:

wheelAxisLink = chrono_types::make_shared<ChLinkMateSpherical>();
wheelAxisLink->Initialize(wheel, axis, false, wheel->GetPos(), axis->GetPos());
wheelAxisLink->SetConstrainedCoords(true, true, true, true, true, false);

holdBodyRotationLink = chrono_types::make_shared<ChLinkMateSpherical>();
holdBodyRotationLink->Initialize(body, floor, false, body->GetPos(), floor->GetPos());
holdBodyRotationLink->SetConstrainedCoords(false, false, false, true, true, true);

holdBodyTranslationLink = chrono_types::make_shared<ChLinkMateSpherical>();
holdBodyTranslationLink->Initialize(body, axis, false, body->GetPos(), axis->GetPos());
holdBodyTranslationLink->SetConstrainedCoords(true, false, true, true, true, true);

It is working properly. But if the mass of "wheel" is significantly larger than the mass of "body" and the speed of motor rotation is high, the constraints applied for the links are not satisfied anymore.

Capture d'écran 2024-11-06 175103.png

Could you help with any idea how to fix that issue if any exists?
Also by some reason, the pice of code:

tools::drawSpring(vis.get(), 1, newSystem.GetBodyPos(), newSystem.GetWheelPos(),
                                        ChColor(1, 1, 1), 80, 10, true);
does not make a "spring" visible.


Best regards, Alex

Dan Negrut

unread,
Nov 6, 2024, 3:00:18 PM11/6/24
to Aleksandr Prokhorov, ProjectChrono

Alex – did you try to reduce the integration time step to some small value, to see if this makes any difference?

Dan

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

Bernard A. and Frances M. Weideman Professor

NVIDIA CUDA Fellow

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/

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

 

From: projec...@googlegroups.com <projec...@googlegroups.com> On Behalf Of Aleksandr Prokhorov
Sent: Wednesday, November 6, 2024 10:55 AM
To: ProjectChrono <projec...@googlegroups.com>
Subject: [chrono] Link unexpected behavior

 

Dear CHRONO.

 

I have started to investigate a CHRONO engine recently.

The problem I am trying to solve is the control of 1-DOF system in the application of the quarter-car model. I have a picture of my model assembly.

 

 

The links a Initialized with te next constraints:

 

                wheelAxisLink = chrono_types::make_shared<ChLinkMateSpherical>();
                wheelAxisLink->Initialize(wheel, axis, false, wheel->GetPos(), axis->GetPos());
                wheelAxisLink->SetConstrainedCoords(true, true, true, true, true, false);

                holdBodyRotationLink = chrono_types::make_shared<ChLinkMateSpherical>();
                holdBodyRotationLink->Initialize(body, floor, false, body->GetPos(), floor->GetPos());
                holdBodyRotationLink->SetConstrainedCoords(false, false, false, true, true, true);

                holdBodyTranslationLink = chrono_types::make_shared<ChLinkMateSpherical>();
                holdBodyTranslationLink->Initialize(body, axis, false, body->GetPos(), axis->GetPos());
                holdBodyTranslationLink->SetConstrainedCoords(true, false, true, true, true, true);

 

It is working properly. But if the mass of "wheel" is significantly larger than the mass of "body" and the speed of motor rotation is high, the constraints applied for the links are not satisfied anymore.

 

 

Could you help with any idea how to fix that issue if any exists?

Also by some reason, the pice of code:

 

tools::drawSpring(vis.get(), 1, newSystem.GetBodyPos(), newSystem.GetWheelPos(),
                                        ChColor(1, 1, 1), 80, 10, true);

does not make a "spring" visible.

 

 

Best regards, Alex

 

--
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 visit https://groups.google.com/d/msgid/projectchrono/ced273ee-b083-4f20-bb63-28b997acdd15n%40googlegroups.com.

Dario Mangoni

unread,
Nov 7, 2024, 1:28:48 AM11/7/24
to ProjectChrono
Also, if you are using, as I expect, an iterative solver, increase the number of iterations! 

Aleksandr Prokhorov

unread,
Nov 7, 2024, 5:25:59 AM11/7/24
to Dario Mangoni, ProjectChrono
Yeah, It seems like, decreasing of time for integration solves the problem. Thank you so much!
By chance, maybe you know the possible issues with drawing the spring between "body" and "wheel", I use such definition:

tools::drawSpring(vis.get(), 1, newSystem.GetBodyPos(), newSystem.GetWheelPos(),
                                        ChColor(1, 1, 1), 80, 10, true);

but it is now working, as you can see in the screenshot.

Best Regards
Aleksandr Prokhorov


Dan Negrut

unread,
Nov 7, 2024, 12:27:38 PM11/7/24
to Aleksandr Prokhorov, Dario Mangoni, ProjectChrono

Aleksandr Prokhorov

unread,
Nov 7, 2024, 1:06:58 PM11/7/24
to Dan Negrut, Dario Mangoni, ProjectChrono
A screenshot of the simulation is below. I expect the spring that I define with the piece of code (1) should be between a gray block and a red-white circle;
(1)
tools::drawSpring(vis.get(), 1, newSystem.GetBodyPos(), newSystem.GetWheelPos(), ChColor(1, 1, 1), 80, 10, true);

But in fact, it does not appear here. May be any body has any Idea how to solve this issue?

Simulation is performed with the Irrlicht visualization system.

Capture d'écran 2024-11-07 111336.png


Best Regards
Aleksandr Prokhorov

Radu Serban

unread,
Nov 7, 2024, 1:37:26 PM11/7/24
to ProjectChrono

Aleksandr,

 

  1. How/where do you invoke the tools::drawSpring function?
    Keep in mind that it should be called *every* time you render a frame, and the call must be made *between* the calls to BeginScene and EndScene.
  2. Better yet, instead of using this low-level function, why not attach a spring visualization asset to the spring link that you likely have in your model.
    That way, you are not limited to the Irrlicht run-time visualization but could also use Chrono::VSG.
    Look through the demos to see this usage (e.g. line 148 of demo_MBS_spring)

 

--Radu

 

 

From: projec...@googlegroups.com <projec...@googlegroups.com> On Behalf Of Aleksandr Prokhorov
Sent: Thursday, November 7, 2024 7:07 PM
To: Dan Negrut <neg...@wisc.edu>
Cc: Dario Mangoni <dariom...@gmail.com>; ProjectChrono <projec...@googlegroups.com>
Subject: Re: [chrono] Link unexpected behavior

 

A screenshot of the simulation is below. I expect the spring that I define with the piece of code (1) should be between a gray block and a red-white circle;

(1)

tools::drawSpring(vis.get(), 1, newSystem.GetBodyPos(), newSystem.GetWheelPos(), ChColor(1, 1, 1), 80, 10, true);

 

But in fact, it does not appear here. May be any body has any Idea how to solve this issue?

 

Simulation is performed with the Irrlicht visualization system.

 

 

 

Best Regards

Aleksandr Prokhorov

 

Reply all
Reply to author
Forward
0 new messages