FDEs

Moderator: Mike Everman

pezman
Posts: 613
Joined: Fri Oct 08, 2004 4:13 am
Antipspambot question: 0
Location: USA

SAGE-acious

Post by pezman » Mon Feb 11, 2008 10:47 pm

minor rant, deleted -- life's too short (and too long) to spent it working with anything but finest tools.

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

what is a derivative? (re: FDEs)

Post by WebPilot » Tue Feb 12, 2008 12:06 am

This was at the bottom of the last page and I feel it was prematurely
advanced to the 'back' of this thread due to last post.

Image

This is important to know because of what's to come next.
Last edited by WebPilot on Tue Feb 12, 2008 8:30 pm, edited 1 time in total.
Image

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

central difference formulae (re: FDEs)

Post by WebPilot » Tue Feb 12, 2008 4:15 am

Image

So, here we have formulas for f'(xj) and f''(xj) whose values at
a point xj can be determined by evaluating the function at
the points xj-1, xj and xj+1.

The error decreases as one makes smaller the interval, h. The
'run time' will increase though.
Last edited by WebPilot on Tue Feb 12, 2008 8:32 pm, edited 1 time in total.
Image

Mike Everman
Posts: 5007
Joined: Fri Oct 31, 2003 7:25 am
Antipspambot question: 0
Location: santa barbara, CA
Contact:

Post by Mike Everman » Tue Feb 12, 2008 2:59 pm

Is it just me, or are the picture links dead?
Mike Often wrong, never unsure.
__________________________

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

central difference formulae (re: FDEs)

Post by WebPilot » Tue Feb 12, 2008 5:07 pm

Appears to be, Mike.

Here is a repeat of the last two:

Image

Image
Image

PyroJoe
Posts: 1743
Joined: Wed Aug 29, 2007 5:44 pm
Antipspambot question: 125
Location: Texas

Post by PyroJoe » Tue Feb 12, 2008 7:05 pm

When working with structural components calculating the deflection and such, may give an idea about how the structure will behave. Depending upon the Factor of Safety "allowed" may tell more as to why a structure appears very rigged for certain applications.

Sometimes you find yourself in weird areas, such as narrow load bearing columns where standard equations miss a buckling effect. Euler has some interesting formulas.

http://en.wikipedia.org/wiki/Buckling

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

discretization of the deflection (re: FDEs)

Post by WebPilot » Tue Feb 12, 2008 8:45 pm

Pics are back online ...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PyroJoe wrote:
When working with structural components calculating the deflection and such, may give an idea about how the structure will behave. Depending upon the Factor of Safety "allowed" may tell more as to why a structure appears very rigged for certain applications.

Sometimes you find yourself in weird areas, such as narrow load bearing columns where standard equations miss a buckling effect. Euler has some interesting formulas.

http://en.wikipedia.org/wiki/Buckling
Thanks PyroJoe,

In those 'weird areas' where you cannot find a 'canned' formula
that applies, a numerical method is your only resort.

Euler was a prolific man; I see his name in numerical methods,
engineering mechanics and fluid mechanics books all the time.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is the beginning of the numerical approach, for which some of
you have patiently been waiting. I shall give it to you, the reader,
in 'bite size' chunks. If I have 'done a good job' in my preliminary
posts, I think some of you will 'pick it up'.

Image

NOTE: M(x) means M is a function of x, not M times x ... I have
tried to be consistent and where two terms are multiplied together, I
have used a 'centered dot'.

NOTE #2: the notation, yj+1, means y(xj+1), etc.

NOTE #3: the f(x) term in the middle on the right hand side of the
central difference formula should have been written, f(xj) or more
compactly, fj.

NOTE #4: j and i are 'dummy variables' and can take on the values
0, 1, 2, 3, 4 ... n.
Image

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

numerical evaluation of 2nd derivative (re: FDEs)

Post by WebPilot » Wed Feb 13, 2008 4:56 am

Here are some minor revisions and some additional material.

Image (c.t.)
Image

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

moving to point 2 and back to 0 (re: FDEs)

Post by WebPilot » Wed Feb 13, 2008 4:14 pm

Image (c.t.)
Image

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

the 2nd to the last point (re: FDEs)

Post by WebPilot » Thu Feb 14, 2008 1:03 am

Image (c.t.)
Image

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

matrix notation and solution (re: FDEs)

Post by WebPilot » Thu Feb 14, 2008 4:09 pm

Matrix notation is a form of mathematical 'shorthand' used in
Linear Algebra. As you'll see it saves an incredible amount of
writing (or typing).

Image (c.t.)
Image

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

spreadsheet implementation of 'fdm' solution (re: FDEs)

Post by WebPilot » Fri Feb 15, 2008 6:26 am

The present spreadsheet additions are pretty straightforward.

1. n = 10 segments (n+1 points)
2. h = 720/10 = 72 in
3. xi's in cells B14:B24
4. elements of array, A, in C14:M24 (directly from my notes)
5. bi's in O14:O24 (note the formula for which is shown in the window)

Image (c.t.)
Image

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

Matrix inversion in 2 simple steps (re: FDEs)

Post by WebPilot » Fri Feb 15, 2008 5:38 pm

Excel has some powerful tools.

Let's invert the matrix, A.

Define Matrix, A
1. select cells C14:M24 and click Insert - Name - Define - A

Select where you wish the inverse to be located
2. select cells C27:M37 and type in window
- minverse(A)
- and then press Ctrl-Shift-Enter (3 keys simultaneously)

Image (c.t.)

Voilà! there it is! Rather easy, n'est-ce pas ?
Image

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

finally calculating the yi's (re: FDEs)

Post by WebPilot » Sat Feb 16, 2008 5:12 am

Define this inverted matrix as AI
3. select cells C27:M37 and click Insert - Name - Define - AI

Let's finally calculate the yi's

4. type yi in cell G39
5. select cells C40:C50 (we need to put them somewhere)
- =MMULT(AI,bi)
- and then press Ctrl-Shift-Enter (3 keys simultaneously)

Image (c.t.)
Image

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

compare 'fdm' and 'exact' plots {re:FDEs}

Post by WebPilot » Sun Feb 17, 2008 5:07 pm

For plotting purposes, we need to compute xi/L (the station numbers).
Please see previous pic.

6. type xi/L in cell F39
7. type =B14/L in cell F40
8. select and copy this into cells F41:F50
- this is done by left mouse clicking cell F:40 and 'dragging'
its lower right corner down to cell F50

We are ready to plot the numerical solution against the
analytical one that I (we) did previously.

Image (c.t.)

The analytical (exact) maximum deflection is 2.396 and
the numerical (fdm) value is 2.415 . The fdm method differs
from the exact at this location by a mere +0.793% (< 1%).

If you wish to experiment, change the value of h.
Image

Post Reply