The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: PDE Toolbox is solving my parabolic equation incorrectly.
Replies: 1   Last Post: Nov 11, 2013 5:53 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 1
Registered: 11/11/13
PDE Toolbox is solving my parabolic equation incorrectly.
Posted: Nov 11, 2013 3:27 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello all,

I'm having a problem with getting parabolic to return the correct solutions.

I'm working with the equation:
u_t = u_xx + u_yy +nu for any c value
on the domain [-1, 1] x [-1, 1]

From the analytic solution, I know that with an initial condition of sin(pi*x)*sin(pi*y), the solution should be
so if n < 2pi^2, then u should go to 0 over time. (e is raised to a negative exponent)
If n=2pi^2, then u should go to sin(pi*x)*sin(pi*y) (e is raised to 0)
and if n > 2pi^2, then u should go to positive infinity over time. (e is raised to a positive exponent)

I tried to simulate these results using PDE Toolbox and the parabolic function, but the results are far from what they're supposed to be as indicated by the analytic solution. Most of the solutions go to negative infinity, regardless of the n value. Can anyone tell me where I'm going wrong in my code/logic and why I'm getting wacky results?

I use the gui to define the boundaries and the mesh from x = -1:1 and y= -1:1, then I export decomposed geometry as p, e, and t.

Then, here's the MATLAB code I'm using to solve and plot:

tlist=0:.1:1; %Set tspan
a=-(n); % I input actual values for n before I run the code.

*I'm using the raw code instead of the pde toolbox gui to solve simply because I prefer the raw code. I get the same results if I use the pde toolbox gui.

Any suggestions or comments are greatly appreciated!

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.