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
- :
- Solve non linear second order differential equatio...

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

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

03-01-2019
05:42 PM

03-01-2019
05:42 PM

Re: Solve non linear second order differential equation with initial and boundary condition

Hi Luc,

It is giving me a different error now. "Matrix is not valid because boundary condition is not valid". This is the same boundary condition used in pdesolve. Also rhs has 5 different parameters in it. Would that not affect it?

Regards

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

03-02-2019
11:47 AM

03-02-2019
11:47 AM

Re: Solve non linear second order differential equation with initial and boundary condition

I bet Prime doesn't like the way you set up your init() and bc() functions, using a programming bar.

Anyway. I experimented a little with numol in Mathcad 11, and got this:

Note that I used the very same values as for pdesolve, a few days ago.

What struck me is the fact that phi goes negative here, which I attributed to the fact that your boundary conditions aren't exactly included (notice how bc_func only specifies 0's). I guessed they should be better added as a form of PAE (see help description) but so far have been unlucky in using numol with a PAE construct. And I'm not the only one. I searched this forum, and found no successful examples.

Then I experimented with more spatial resolution: changed nx from 25 to 250. The result is that the pdesolve solution now goes negative like the numol result shown above, but the numol result with that same spatial resolution stays mostly positive.

I hope you can port the implementation to Prime and make it work there. My Mathcad 11 file with pdesolve and numol is attached.

Success!

Luc

- « Previous
- Next »

Top Tags