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
- :
- solving differential equations

Options

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

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

Showing results for

Highlighted
##

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

03-13-2012
03:54 PM

03-13-2012
03:54 PM

solving differential equations

Solving Torricelli's Law for the flow out of a cylindrical tank through a round hole is pretty straight forward. It can be done by direct integration. However, when trying to solve it numerically with rkfixed or odesolve I ran into some unexpected problems.

rkfixed gave the message: D(t,h) must be real ! odesolve would not not converge to the efflux time corresponding to h = o. With the substitution u = sq. root h, it was smooth sailing to use either program. Is this a tolerence issue? Something else? It it a pretty straight forward linear 1st degree differential equation after all!

WSU1963

Labels:

7 REPLIES 7

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

03-14-2012
12:01 AM

03-14-2012
12:01 AM

Re: solving differential equations

I think your problem is that your equation may be trying to reach ln(0) which is not possible. When you changed to the sq root of h, it is trying to reach 0, which it can do. If I'm not correct, then supply the differential equation that you are trying to solve.

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

03-14-2012
12:25 AM

03-14-2012
12:25 AM

Re: solving differential equations

And where the ODE itself?

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

03-14-2012
07:58 AM

03-14-2012
07:58 AM

Re: solving differential equations

Please attach your Mathcad worksheet to the message.

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

03-14-2012
08:40 AM

03-14-2012
08:40 AM

Re: solving differential equations

No problem!

(I didn't try for Odesolve)

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

03-14-2012
10:24 AM

03-14-2012
10:24 AM

Re: solving differential equations

Nice work Fred

Wayne

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

03-14-2012
06:34 PM

03-14-2012
06:34 PM

Re: solving differential equations

Fred,

If you extend the problem beyond the empty time (1015 s), the integration fails, both for rkfixed and Rkadapt. The fix is to limit the value of h to a positive value.

The snip below shows the failure of rkfixed without the h limit and a solution with the limit. Since the time to empty is usually not known, this eliminates trial and error. This may explain the error Donald was getting.

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

03-15-2012
04:52 AM

03-15-2012
04:52 AM

Re: solving differential equations

Limit h to positive or the radical to real:

Top Tags