Group Abstract Group Abstract

Message Boards Message Boards

Why the heat equation doesn't work with NDSolve?

Posted 11 years ago

Hi. I want to find a numerical solution for the heat equation. I use Mathematica 10.0. The code that I use to find the solution is this:

NDSolve[{D[u[t, x], t] == D[u[t, x], x, x], u[0, x] == 0, 
  u[t, 0] == Sin[t], u[t, 5] == 0}, u, {t, 0, 10}, {x, 0, 5}]

The problem is that, when I click on "evaluate notebook", the program runs for few seconds and then it stops without error messagges, but only with a "beep" sound. So I click on "Help / Why the Beep?..." and this is the message that appears on the screen: "The kernel Local has quit (exited) during the course of an evaluation."

What does it mean? Please help me, I don't know how to solve this problem. Thanks for your suggestions.

Jo R

POSTED BY: Jo R
11 Replies
Posted 11 years ago

Thank you Bruce Miller. I will do that.

POSTED BY: Jo R
Posted 11 years ago

I opened the task manager while kernel was running and i saw that the memory occupied was 2GB max. So it isn't the problem. It's very strange. However thank you for your help.

POSTED BY: Jo R
POSTED BY: Bruce Miller
Posted 11 years ago

I've tried to solve the problem by resetting Mathematica, but it hasn't worked. However, I'm thinking that I activated the software with product key, but I didn't registered it on the wolfram's website. Would it be the cause of the problem?

POSTED BY: Jo R
Posted 11 years ago

I doubt that is the problem. The kernel can exit if out of memory. I would think 6GB was enough, but the least I have on a system is 8GB on my laptop.

POSTED BY: David Keith
Posted 11 years ago

For simple equations it works perfectly. I've tried also to solve ordinary differential equations and it works without any problem. The problem appears when I try to solve more complex equations, like partial differential equations. I don't know what to do, I'm spending a lot of time only to understand what kind of problem it is.

POSTED BY: Jo R
Posted 11 years ago

This is unusual. If resetting doesn't work, you might want to contact tech support. Or . . . maybe someone else on the forum has an insight.

POSTED BY: David Keith
Posted 11 years ago
POSTED BY: David Keith
Posted 11 years ago

Hi David Keith. Thank you for the answer. I post the notebook here. It is possible that it's an hardware problem? I have an ASUS F552EP with: - microprocessor AMD quad-core 2.0 GHz - 6 GB RAM The OS is Windows 7 (64-bit).

Attachments:
POSTED BY: Jo R
Posted 11 years ago

Hi Jo -- this notebook works OK for me. I suggest resetting Mathematica.

POSTED BY: David Keith
Posted 11 years ago

The code you posted works for me. Try running it in a fresh kernel. If it still doesn't work, I suggest you post the notebook.

In[12]:= $Version

Out[12]= "10.0 for Microsoft Windows (64-bit) (December 4, 2014)"

In[13]:= sol = 
  NDSolve[{D[u[t, x], t] == D[u[t, x], x, x], u[0, x] == 0, 
     u[t, 0] == Sin[t], u[t, 5] == 0}, u, {t, 0, 10}, {x, 0, 5}] // 
   First;

In[14]:= Plot3D[u[t, x] /. sol, {t, 0, 10}, {x, 0, 5}, 
 PlotRange -> All]

enter image description here

POSTED BY: David Keith
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard