FAQ  •  Login

Still having trouble implementing time

Moderators: Dan Negrut, RaduS

<<

f14-mewalczak

Jr. Member
Jr. Member

Posts: 53

Joined: Mon Sep 08, 2014 2:08 pm

Unread post Sun Dec 14, 2014 1:48 pm

Still having trouble implementing time

All,


I am still having trouble figuring out how I can vary this problem with time. I think I have everything else needed to run a simulation but without something varying with time, everything stays constant.

If anybody could point me in the right direction that would be great!

Mike
<<

f14-jwhendricks2

Newbie
Newbie

Posts: 21

Joined: Mon Sep 08, 2014 2:08 pm

Unread post Sun Dec 14, 2014 2:21 pm

Re: Still having trouble implementing time

I used a for loop with N-R inside it to solve for q, qd, and qdd at each time step.
At each iteration I define t as t = stepSize*(i-1) where stepSize comes from the acffile.

for i = 1:timeSteps
t = stepSize*(i-1)

So for the first iteration i=1 t=0 and it grows by .001 at each iteration.

Hopefully that helps!

-Jake Hendrickson
<<

f14-mewalczak

Jr. Member
Jr. Member

Posts: 53

Joined: Mon Sep 08, 2014 2:08 pm

Unread post Sun Dec 14, 2014 2:31 pm

Re: Still having trouble implementing time

Hey Jake thanks for the help,

I think I got how to use time for the iterative portion of the simulation but I am not sure how to implement time to make jac, phi, nu, gamma change with each time step since nothing in the problem explicitly varies with time.

Or does nothing really vary with time and I am just really confused? (I am trying to do my simulation like the Quasi Newton Method on the second to last slide of Dec 9th)

Thanks again for the help!
<<

f14-jwhendricks2

Newbie
Newbie

Posts: 21

Joined: Mon Sep 08, 2014 2:08 pm

Unread post Sun Dec 14, 2014 2:46 pm

Re: Still having trouble implementing time

In this case jac, phi, nu, and gamma don't depend on time since there are no driving constraints. Phi and jac are functions of q (x1,y1,phi1,x2,etc...). Nu is just zeros in this case and gamma depends on q and qd (x1,y1,phi1,xD1,yD1,etc...).

Even though none of them are functions of time, they will still vary with time because the generalized positions and velocities (q and qd) will change at each time step in the N-R process. When you do the N-R process you're solving for qdd and then using those values to update q and qd using Newmark. You keep repeating until the correction is within the tolerance and then move to the next time step.

Does that make sense?

-Jake Hendrickson
<<

f14-mewalczak

Jr. Member
Jr. Member

Posts: 53

Joined: Mon Sep 08, 2014 2:08 pm

Unread post Sun Dec 14, 2014 3:15 pm

Re: Still having trouble implementing time

This makes sense. I will try to implement it. Thanks for the help!
<<

Dan Negrut

Global Moderator
Global Moderator

Posts: 833

Joined: Wed Sep 03, 2008 12:24 pm

Unread post Sun Dec 14, 2014 4:54 pm

Re: Still having trouble implementing time

Jake - thanks for your input, it was great.
since q, qd, qdd, and lambda change in time, the value of Phi, Phi_q, gamma, etc. will change with time.
Dan

Return to ME451 Fall 2014: Kinematics and Dynamics of Machine Systems

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software.