Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Re: Numerical Solutions To Differential Equations

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-12-2017
09:30 PM

11-12-2017
09:30 PM

Can someone help me with this program. I cannot seem to plot the graphs nor can I get the output matrices.

Thanks

RA

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-13-2017
12:53 PM

11-13-2017
12:53 PM

Instead of ending the program with [t f u u''] end it with:

augment(t,f,u,u'')

Then you should be able to plot u versus t for example.

Success!

Luc

21 REPLIES 21

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-13-2017
12:55 AM

11-13-2017
12:55 AM

Re: Numerical Solutions To Differential Equations

Show please your ODEs!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-13-2017
06:04 AM

11-13-2017
06:04 AM

Re: Numerical Solutions To Differential Equations

here is the zp file

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-13-2017
06:14 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-13-2017
06:15 AM

11-13-2017
06:15 AM

Re: Numerical Solutions To Differential Equations

did you get the zip file?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-13-2017
07:22 AM

11-13-2017
07:22 AM

Re: Numerical Solutions To Differential Equations

Yep, the zip file was found. I'm limited to Prime Express (no programming a.o.) so I cannot run the program.

At first glance:

In your *Solution* program you assign n*delta_t to each of the values t[i (That is t with index i). Note that n*delta_t is a constant of 2 seconds. I guess you want to assign i*delta_t to each value of t[i...

Then you go and test the t[i value against, 0, t.1 and t.2 .... Note that there is a difference between t[1 and t.1

t[1 is the second (!) value in the array t, that is because array inexing starts at 0 (controlled by the constant ORIGIN)

t.1 is just a variable t with subscript 1.

Try to correct your sheet with the above notions in mind and come back for further advice if needed.

Success!

Luc

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-13-2017
04:44 AM

11-13-2017
04:44 AM

Re: Numerical Solutions To Differential Equations

"help me with this program"

Which program?

Please send in your Mathcad or Prime worksheet.

You may have to zip it first. A serious bug in this forum prevents direct uploading of Mathcad and Prime worksheets for most users. But a .ZIP file can be attached to a posting.

To get the .zip file, use Windows Explorer, select the file, right-mouse click and select "Send to" then "Compressed (.zip) folder". this results in a .zip file containing the worksheet that you can attach.

Luc

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-13-2017
06:08 AM

11-13-2017
06:08 AM

Re: Numerical Solutions To Differential Equations

hope this works

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-13-2017
10:28 AM

11-13-2017
10:28 AM

Re: Numerical Solutions To Differential Equations

Luc, thanks for you help. I got the program to work, but not very sure how to output the all the results. Can you please show me?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-13-2017
11:25 AM

11-13-2017
11:25 AM

Re: Numerical Solutions To Differential Equations

You attached the very same sheet file, not the corrected one.

Hence no results for me to work with.

Luc

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-13-2017
11:48 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-13-2017
11:48 AM

11-13-2017
11:48 AM

Re: Numerical Solutions To Differential Equations

Sorry, here it is

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-13-2017
12:21 PM

11-13-2017
12:21 PM

Re: Numerical Solutions To Differential Equations

You still have a problem in your program.

The calculation for u'' gives units of ft^2/s^4, where it most probably would need to result in ft/s^2.

Correct that and come back when you need more help.

Success!

Luc

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-13-2017
12:40 PM

11-13-2017
12:40 PM

Re: Numerical Solutions To Differential Equations

Luc, I am able to get individual results for t, f, u and u'' not not all the results together. The units are also consistent when individually extracted.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-13-2017
12:49 PM

11-13-2017
12:49 PM

Re: Numerical Solutions To Differential Equations

Sorry, my mistake. I multiplied f.i/m with omega^2*u.0, instead of subtracting.

But I do get an error message saying *Solution* is undefined.

What do you get when you evaluate t[0=

?

Luc

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-13-2017
12:53 PM

11-13-2017
12:53 PM

Instead of ending the program with [t f u u''] end it with:

augment(t,f,u,u'')

Then you should be able to plot u versus t for example.

Success!

Luc

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-13-2017
01:18 PM

11-13-2017
01:18 PM

Re: Numerical Solutions To Differential Equations

Thanks Luc, that worked

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-13-2017
08:47 AM

11-13-2017
08:47 AM

Re: Numerical Solutions To Differential Equations

Hi RA,

you could use the finite difference method below:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-13-2017
10:14 AM

11-13-2017
10:14 AM

Re: Numerical Solutions To Differential Equations

Yes, FDM is one of the several ways, and thanks for sharing that program with us. The time intervals need to be no more than 1/10 of the peak forcing function, which means that the number of iterations for a 2 sec response would be in the thousands.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-13-2017
10:20 AM

11-13-2017
10:20 AM

Re: Numerical Solutions To Differential Equations

Hi ,

For any order matrix, you can do so as indicated below:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-13-2017
10:24 AM

11-13-2017
10:24 AM

Re: Numerical Solutions To Differential Equations

Excellent solution procedure, and I will sure try that.

Thanks You very much

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-13-2017
10:26 AM

11-13-2017
10:26 AM

Re: Numerical Solutions To Differential Equations

I got my program to work, but unable to extract the t, u, and u''. Can you please show me how to display a table of all these values?