FAQ  •  Login

Assn 10

<<

ME751Justin

ME751 Student

Posts: 2

Joined: Tue Mar 02, 2010 10:37 pm

Unread post Wed Apr 07, 2010 12:57 pm

Re: Assn 10

My convergence plot:
Backward Euler is order 1, BDF is order 4. Residual error: 10^-8
I run into machine precision problems with the BDF curve when my time step is smaller than 2^-13
Attachments
hw10_p5Plot_Justin.jpg
<<

Dan Negrut

Global Moderator
Global Moderator

Posts: 833

Joined: Wed Sep 03, 2008 12:24 pm

Unread post Wed Apr 07, 2010 1:20 pm

Re: Assn 10

i can't see any plots?  does anybody else have this problem?
dan
<<

ME751Toby

ME751 Student

Posts: 4

Joined: Tue Mar 02, 2010 10:38 pm

Unread post Wed Apr 07, 2010 1:30 pm

Re: Assn 10

Dan Negrut wrote:i can't see any plots?  does anybody else have this problem?
dan


I couldn't see any plots when I wasn't logged in. Once I logged in to post, then I could see the pictures. But because you are posting, you must be logged in, so I have no idea.
<<

ME751Makarand

ME751 Student

Posts: 5

Joined: Tue Mar 02, 2010 10:38 pm

Unread post Wed Apr 07, 2010 5:09 pm

Re: Assn 10

see
Attachments
HW10_5_convergence.png
<<

ME751James

ME751 Student

Posts: 13

Joined: Tue Mar 02, 2010 10:20 pm

Unread post Wed Apr 07, 2010 5:24 pm

Help with problem 4

I'm having trouble with problem 4

I'm evaluating the g(xn,yn) using this matlab code

  Code:
function [e] = evaluate(prev_x, prev_y, alpha, beta, xn, yn, h)

    e(1,1) = prev_x + h * ( alpha - xn - (4*xn*yn)/(1+xn^2)) - xn;
    e(2,1) = prev_y + h * ( beta * xn * (1 - yn/(1+xn^2))) - yn;

end


And the Jacobian using this code

  Code:
function [jac] = jacobian(h, beta, x, y)

    jac = [1,1;1,1];
   
    jac(1,1) = (4 * h * (x^2 - 1) * y)/(x^2+1)^2 - h - 1;
    jac(1,2) = (-4 * h * x) / (x^2 + 1);
   
    jac(2,1) = (beta * h * (x^2 - 1) * y) / (x^2 + 1)^2 + beta * h;
    jac(2,2) = (-1 * beta * h * x) / (x^2 + 1) - 1;
end


I've checked both at least three times although I get the same answer if I turn the Jacobian off in fsolve

for alpha = beta = 1 I get this plot for x using bEuler

Image

and this for fEuler

Image

The x axis is not plotted correctly.

I feel like the forward euler is probably the correct solution but I can't figure out what could be wrong with my backward Euler.
could someone run their backward Euler with alpha = beta = 1 and at least confirm that one of the two plots are correct
Last edited by ME751James on Wed Apr 07, 2010 5:29 pm, edited 1 time in total.
<<

Rob Bradford

ME751 Student

Posts: 7

Joined: Tue Mar 02, 2010 10:16 pm

Unread post Wed Apr 07, 2010 5:28 pm

Re: Assn 10

Rob's Convergence Plot #5
Attachments
Convergence Plot.jpg
<<

ME451Tyler

ME751 Student

Posts: 25

Joined: Tue Mar 02, 2010 10:19 pm

Unread post Wed Apr 07, 2010 5:30 pm

Re: Assn 10

Delta < 10^-7

steps from 2^-6 to 2^-12
Attachments
convergence.png
convergence.png
Last edited by ME451Tyler on Wed Apr 07, 2010 6:10 pm, 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 5:44 pm

Re: Assn 10

Rob Bradford wrote:Rob's Convergence Plot #5


can't see your plots, can see Tyler's.
dan
<<

ME451Tyler

ME751 Student

Posts: 25

Joined: Tue Mar 02, 2010 10:19 pm

Unread post Wed Apr 07, 2010 6:11 pm

Re: Assn 10

Now that I have correct slopes, here is my new convergence plot.
Attachments
convergence.png
<<

ME751Arman

ME751 Student

Posts: 7

Joined: Tue Mar 02, 2010 10:19 pm

Unread post Wed Apr 07, 2010 6:13 pm

Re: Assn 10

Here are my plots, same as other's!
Attachments
convergencePlot1.png
convergencePlot2.png
slope.png
<<

Rob Bradford

ME751 Student

Posts: 7

Joined: Tue Mar 02, 2010 10:16 pm

Unread post Wed Apr 07, 2010 8:22 pm

Re: Assn 10

Here it is a second try.  I'm not sure why you can't see it.  I can (along with Tyler's).  It's the same as everyone else's plot.
Attachments
Convergence Plot.jpg
<<

ME751Chris

ME751 Student

Posts: 55

Joined: Tue Mar 02, 2010 10:15 pm

Unread post Wed Apr 07, 2010 9:06 pm

Re: Help with problem 4

ME751James wrote:I'm having trouble with problem 4

I'm evaluating the g(xn,yn) using this matlab code

  Code:
function [e] = evaluate(prev_x, prev_y, alpha, beta, xn, yn, h)

    e(1,1) = prev_x + h * ( alpha - xn - (4*xn*yn)/(1+xn^2)) - xn;
    e(2,1) = prev_y + h * ( beta * xn * (1 - yn/(1+xn^2))) - yn;

end


And the Jacobian using this code

  Code:
function [jac] = jacobian(h, beta, x, y)

    jac = [1,1;1,1];
   
    jac(1,1) = (4 * h * (x^2 - 1) * y)/(x^2+1)^2 - h - 1;
    jac(1,2) = (-4 * h * x) / (x^2 + 1);
   
    jac(2,1) = (beta * h * (x^2 - 1) * y) / (x^2 + 1)^2 + beta * h;
    jac(2,2) = (-1 * beta * h * x) / (x^2 + 1) - 1;
end


I've checked both at least three times although I get the same answer if I turn the Jacobian off in fsolve




my bEuler is what you have.
<<

ME751Chris

ME751 Student

Posts: 55

Joined: Tue Mar 02, 2010 10:15 pm

Unread post Wed Apr 07, 2010 9:07 pm

Re: Assn 10

is F the forces in the global reference frame? so [0 0 -9.81*mass]'

Jbar is simply a diagonal matrix filled with the value from 1/12*mass*4^2 right?
<<

ME751James

ME751 Student

Posts: 13

Joined: Tue Mar 02, 2010 10:20 pm

Unread post Wed Apr 07, 2010 9:18 pm

Re: Assn 10

For number five, are we supposed to derive the coefficients for order 4 BDF?  Or is the table in the notes accurate enough?  I'm having problems with my BDF and I'm not sure if I'm supposed to do all of the work of solving the order 4 coefficients.
<<

ME751Ryan

ME751 Student

Posts: 3

Joined: Tue Mar 02, 2010 10:19 pm

Unread post Wed Apr 07, 2010 10:25 pm

Re: Assn 10

Here are my convergence plots.  Note that below ~2^-11 I ran into machine precision issues...  Above that limit though, i see the expected slopes.
Attachments
rp_conv_nogood.jpg
rp_conv_good.jpg
PreviousNext

Return to ME751 Spring 2010: Advanced Computational Multibody Dynamics

Who is online

Users browsing this forum: No registered users and 2 guests

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