Hi Lukas,

Sorry, I gave you the wrong function name (GetF returns the value of the 
preload in a ChLinkForce, something that is not set for a ChLinkBushing).  The 
correct function to use is ChLinkForce::GetForce, but that one is cumbersome to 
use as it takes some arguments (you can access the required values, but that’s 
not a good API).

So, I added two functions ChLinkBushing::GetForce and ChLinkBushing::GetTorque 
which directly return the quantities you want.

(Note that I cleaned up a bit the ChLinkBushing class and that resulted in a 
change to the enum used to specicy the type of bushing (Mount or Spherical) – 
see the updated demo)

--Radu

From: [email protected] <[email protected]> On Behalf 
Of Lukas K
Sent: Wednesday, June 28, 2023 12:54 AM
To: ProjectChrono <[email protected]>
Subject: Re: [chrono] Bushing reaction forces

Thanks for guidance and explanations.
I ran demo_MBS_link_bushing.cpp with example 4 which uses ChLinkBushing.
Then I used bushing_link->GetForce_X().GetF() to extract reaction forces but 
still getting zeroes.
Where I'm making a mistake?

wtorek, 27 czerwca 2023 o 08:34:51 UTC+2 Radu Serban napisał(a):
Lukas,

When using ChLinkBushing, you need to access the various individual ChLinkForce 
objects, using ChLinkLock::GetForceX(), ChLinkLock::GetForceY(), etc. (see 
https://api.projectchrono.org/classchrono_1_1_ch_link_lock.html ) and then 
invoke the GetF() method on each one (see 
https://api.projectchrono.org/classchrono_1_1_ch_link_force.html).
I realize that this is a bit too convoluted, so I will add a ChLinkBushing 
functions to directly return the bushing force and torque.
As a side note, ChLinkBushing is implemented as a “free” joint with internal 
forces on the 6 DOFs, so it is no surprise that Get_react_force() returns all 
zeros (there are no constraints).

For ChLoadBodyBodyBushingGeneric, use ChLoadBodyBody::GetForce() and 
ChLoadBodyBody::GetTorque() (see 
https://api.projectchrono.org/classchrono_1_1_ch_load_body_body.html).

--Radu

From: [email protected] <[email protected]> On Behalf Of 
Lukas K
Sent: Tuesday, June 27, 2023 12:37 AM
To: ProjectChrono <[email protected]>
Subject: [chrono] Bushing reaction forces

What is the way to get reaction forces from bushing for:
1. ChLinkBushing
2. ChLoadBodyBodyBushingGeneric

When I use Get_react_force() I get only zeroes
--
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 on the web visit 
https://groups.google.com/d/msgid/projectchrono/c70dc292-4f6b-478d-a34e-268c16a3d79fn%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/c70dc292-4f6b-478d-a34e-268c16a3d79fn%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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 on the web visit 
https://groups.google.com/d/msgid/projectchrono/c55bd0bf-4831-4ced-b02e-1273add587dan%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/c55bd0bf-4831-4ced-b02e-1273add587dan%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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 on the web visit 
https://groups.google.com/d/msgid/projectchrono/PH0PR06MB8237E0B651C791E646C03934A725A%40PH0PR06MB8237.namprd06.prod.outlook.com.

Reply via email to