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
- :
- Error in Thomas algorithm

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

12-18-2013
04:38 PM

12-18-2013
04:38 PM

Error in Thomas algorithm

Hey guys,

I was given a parabolic differential equation with the boundary condition of dT/dR = 0 when R = 0 but I am not quite sure how I am suppose to incorporate that into my Thomas algorithm/Crank-Nicolson program.

I currently have it in the program as u1 = du/dr but it tells me the value must be scalar. When I just get rid of it, there are complex answers in my solution.

Please help?

Labels:

3 REPLIES 3

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

12-20-2013
03:53 AM

12-20-2013
03:53 AM

Re: Error in Thomas algorithm

HI Emilia,

First step of creating the PDE solution from the differential equations isn't too difficult.

Only issue is that there appears to be a singularity , to avoid this I've added a 10^-299 term in the first equation (keeps MathCad running).

Since you are using a du/dr term in the program later , the U.r() helper function has also been created.

Understanding of what the program is trying to achieve is a little harder.

The indices of the matrices & loops are quite confusing.

Can you explain the basic principles ?

Regards

Andy

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

12-20-2013
09:54 AM

12-20-2013
09:54 AM

Re: Error in Thomas algorithm

Ok, so never trust the result without a 'sanity check'.

There does seem to be a problem with the initial condition & boundary condition

u(r,0)=0 & u(1,z)=1

at the point r=1,z=0

Need clarification here.

Otherwise the equations have been re-written & seem (now) to work a little better.

Last iteration there were major discrepancies in the A() & B() results.

Regards

Andy

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

12-21-2013
12:03 PM

12-21-2013
12:03 PM

Re: Error in Thomas algorithm

They seem to work even better when expressed as in the attached (though I'm not sure this is any help in sorting out the problems in the Thomas and Crank-Nicholson method!).

Alan

Top Tags