Thank you for clarification środa, 16 listopada 2022 o 23:10:34 UTC+1 Radu Serban napisał(a):
> Tymo, > > > > You are doing a dynamics analysis, more precisely “forward dynamics”. In > this case, the motion of the system is dictated by its initial state > (positions and velocities) and the set of applied forces. Forward dynamics > analysis calculates the accelerations (think Newton’s second law a = F/m) > and then integrates to find the new velocity and position. > > > > In the examples you show, gravity is the only applied force so, as > expected, the body’s acceleration will end up being the gravitational > acceleration. > > > > The function SetPos_dtdt can be used for other types of analysis, for > example inverse dynamics. > > > > --Radu > > > > *From:* [email protected] <[email protected]> *On > Behalf Of *Tymo > *Sent:* Wednesday, 16 November 2022 22:29 > *To:* ProjectChrono <[email protected]> > *Subject:* [chrono] G_acc overrides SetPos_dtdt. What's the point? > > > > There is a problem with SetPos_dtdt. > > coords_dtdt.pos seems to be overwritten with G_acc, so what is the point > of SetPos_dtdt? > > > > ChSystemNSC sys; > auto body = make_shared<ChBody>(); > sys.AddBody(body); > body->SetPos_dtdt(Vector(0, 1, 0)); > cout << body->GetPos_dtdt().y() << endl;//1 > sys.DoFrameDynamics(1); > cout << body->GetPos_dtdt().y() << endl;//-9.81 value overwritten > sys.Set_G_acc(Vector(0, 0, 0)); > body->SetPos_dtdt(Vector(0, 1, 0)); > cout << body->GetPos_dtdt().y() << endl;//1 > sys.DoFrameDynamics(2); > cout << body->GetPos_dtdt().y() << endl;//0 value overwritten again > > > > > > -- > 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/e4fd6b97-06ae-4381-a12f-c45eef5a772an%40googlegroups.com > > <https://groups.google.com/d/msgid/projectchrono/e4fd6b97-06ae-4381-a12f-c45eef5a772an%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/3ad9f8ed-4754-4d08-8777-57957cc23881n%40googlegroups.com.
