FAQ  •  Login

Assn 10

<<

ME751Chris

ME751 Student

Posts: 55

Joined: Tue Mar 02, 2010 10:15 pm

Unread post Tue Apr 06, 2010 9:48 pm

Re: Assn 10

ME751Anne wrote:Did you make the convergence plot?

Not yet :(
<<

ME751Chris

ME751 Student

Posts: 55

Joined: Tue Mar 02, 2010 10:15 pm

Unread post Tue Apr 06, 2010 9:51 pm

Re: Assn 10

is gammahat just fdotdot when it's only one body (when say body j is connected to body i which is ground)...for the DP1 constraint?
<<

ME751Chris

ME751 Student

Posts: 55

Joined: Tue Mar 02, 2010 10:15 pm

Unread post Wed Apr 07, 2010 12:26 am

Re: Assn 10

ME751Anne wrote:I think the y(t) given in number 5 is incorrect. It doesn't agree with the IVP. Also, when I make my convergence plot, I get that my error increases as my step size decreases. Since I used the same approach as in the handout (using Newton-Raphson with an implicit integrator), I am more inclined to believe that the y(t) given is incorrect. As a smaller step size is used, the solution is more accurate and will thus diverge farther from this 'inaccurate' y(t) given.



Failed.

So when we do bEuler for this problem, I'm assuming we can't start at zero since that would give a value of infinity, and a correction value of infinity.  Could use some guidance on this one!
<<

ME751Chris

ME751 Student

Posts: 55

Joined: Tue Mar 02, 2010 10:15 pm

Unread post Wed Apr 07, 2010 12:30 am

Re: Assn 10

ME751Chris wrote:
ME751Anne wrote:I think the y(t) given in number 5 is incorrect. It doesn't agree with the IVP. Also, when I make my convergence plot, I get that my error increases as my step size decreases. Since I used the same approach as in the handout (using Newton-Raphson with an implicit integrator), I am more inclined to believe that the y(t) given is incorrect. As a smaller step size is used, the solution is more accurate and will thus diverge farther from this 'inaccurate' y(t) given.



Failed.

So when we do bEuler for this problem, I'm assuming we can't start at zero since that would give a value of infinity, and a correction value of infinity.  Could use some guidance on this one!


the time scale is from 1 to 10...that's clutch
<<

Dan Negrut

Global Moderator
Global Moderator

Posts: 833

Joined: Wed Sep 03, 2008 12:24 pm

Unread post Wed Apr 07, 2010 6:42 am

Re: Assn 10

ME751Chris wrote:is gammahat just fdotdot when it's only one body (when say body j is connected to body i which is ground)...for the DP1 constraint?


No, it's not.  If, as you say, body i is ground, then all time & partial derivatives of the vectors on body "i" are zero, since they are fixed and don't change.  Yet, all the time & partial derivatives of vectors on body "j" are not zero and they should show up in the RHS of the acceleration kin. constr. eq.
<<

ME751Chris

ME751 Student

Posts: 55

Joined: Tue Mar 02, 2010 10:15 pm

Unread post Wed Apr 07, 2010 9:19 am

Re: Assn 10

Dan Negrut wrote:
ME751Chris wrote:is gammahat just fdotdot when it's only one body (when say body j is connected to body i which is ground)...for the DP1 constraint?


No, it's not.  If, as you say, body i is ground, then all time & partial derivatives of the vectors on body "i" are zero, since they are fixed and don't change.  Yet, all the time & partial derivatives of vectors on body "j" are not zero and they should show up in the RHS of the acceleration kin. constr. eq.


Only for DP1 constraint it is just fdotdot since the non-zero terms from body i are multiplied by zero terms from body j (my code worked for it when it was just fdotdot).
Last edited by ME751Chris on Wed Apr 07, 2010 9:43 am, edited 1 time in total.
<<

ME751Anne

ME751 Student

Posts: 28

Joined: Tue Mar 02, 2010 10:14 pm

Unread post Wed Apr 07, 2010 9:25 am

Re: Assn 10

Ok, so Dan found a mistake in my math. This is indeed the correct y(t). However, my convergence plot does not look great. I've also included my code.
Attachments
BE Conv Plot.jpg

[The extension has been deactivated and can no longer be displayed.]

<<

ME751Chris

ME751 Student

Posts: 55

Joined: Tue Mar 02, 2010 10:15 pm

Unread post Wed Apr 07, 2010 9:37 am

Re: Assn 10

What tolerance (in the NR solver) should we use for our convergence plots.  I get different plots depending on the size of the tolerance.
<<

ME751Chris

ME751 Student

Posts: 55

Joined: Tue Mar 02, 2010 10:15 pm

Unread post Wed Apr 07, 2010 9:43 am

Re: Assn 10

I used 1.E-5 and 1.E-8 as my tolerances.  Also, to upload pictures, click Additional Options below the body of the text and attach the file.

I also attached my way in which my tolerance of the NR solver was 1.E-10, by step size were computed by:
nPoints = 8;        % number of points used to generate the convergence plot
hLargest = 2^(-4);  % largest step-size h considered in the convergence analysis
tEnd = 2;          % Tend

hSize = zeros(8,1);
hSize(1) = hLargest;
for i=1:nPoints-1
    hSize(i+1)=hSize(i)/2;
end

This gave me a plot in which the bEuler had a slope of about 1 and the BDF with a slope of about 4.
Attachments
tolneg5.png
tolneg8.png
myWay.png
Last edited by ME751Chris on Wed Apr 07, 2010 9:46 am, edited 1 time in total.
<<

Dan Negrut

Global Moderator
Global Moderator

Posts: 833

Joined: Wed Sep 03, 2008 12:24 pm

Unread post Wed Apr 07, 2010 10:24 am

Re: Assn 10

Chris - can you upload the convergence plots?
thanks,
dan
<<

ME751Chris

ME751 Student

Posts: 55

Joined: Tue Mar 02, 2010 10:15 pm

Unread post Wed Apr 07, 2010 10:58 am

Re: Assn 10

Dan Negrut wrote:Chris - can you upload the convergence plots?
thanks,
dan


Plots were already uploaded in previous post (I can see them but not sure if I did it right).
<<

ME451Tyler

ME751 Student

Posts: 25

Joined: Tue Mar 02, 2010 10:19 pm

Unread post Wed Apr 07, 2010 11:30 am

Re: Assn 10

I can see the plots

Problem 3, you wrote that you want the smallest step size at which your numerical solution loses stability.  Did you mean largest?
<<

ME751Anne

ME751 Student

Posts: 28

Joined: Tue Mar 02, 2010 10:14 pm

Unread post Wed Apr 07, 2010 11:46 am

Re: Assn 10

ha, I figured it out. I had the wrong initial condition. But I get a slope of 1 for both methods.
<<

ME751Chris

ME751 Student

Posts: 55

Joined: Tue Mar 02, 2010 10:15 pm

Unread post Wed Apr 07, 2010 11:47 am

Re: Assn 10

ME751Tyler wrote:I can see the plots

Problem 3, you wrote that you want the smallest step size at which your numerical solution loses stability.  Did you mean largest?


I think what he meant was you know a step size of 100 will lose stability, however, you don't know if 0.2 or 0.22 will lose stability.  Therefore, the smallest step size is not 100, but around 0.2 or so.  I was confused too...but realized the largest step size would be infinity.
<<

ME751Toby

ME751 Student

Posts: 4

Joined: Tue Mar 02, 2010 10:38 pm

Unread post Wed Apr 07, 2010 12:56 pm

Re: Assn 10

Here are my convergence plots as well. In the first, you can see that the error reached machine precision and did not improve with decreasing step size. The second used smaller time steps (2^-16 to 2^-12) and shows the correct slopes of 1 and 4.
Attachments
bdf_be_saturated.jpg
bdf_be.jpg
PreviousNext

Return to ME751 Spring 2010: Advanced Computational Multibody Dynamics

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.