Message Boards Message Boards

Why the heat equation doesn't work with NDSolve?

Posted 9 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 9 years ago

Thank you Bruce Miller. I will do that.

POSTED BY: Jo R
Posted 9 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

Registering or not registering should have nothing to do with a crash.

Since this is repeatable for you, try catching a dump of it.

  • Start the Mathematica kernel by itself (Start menu - All Programs -
    Wolfram Mathematica - Wolfram Mathematica 10.0 Kernel).
  • Paste the line of code into it. (See first screen shot.) enter image description here
  • Evaluate the line of code with Enter or Shift+Enter.
  • If there is a crash notice,
    • open the Task Manager,
    • locate the MathKernel process,
    • right-click on it, and
    • in the pop-up menu click on Create Dump File.

enter image description here

This will probably be too big to send by email. It can be uploaded via http://upload.wolfram.com/. For the "Recipient:" field, put "support@wolfram.com". In the "Additional notes:", mention this discussion number, 424357.

It would be helpful if you sent the output from running systeminfo in a command-prompt window (via Start - Programs - Accessories, or Start - Run - cmd.exe) (This also is long. Copy and paste it into return email or put it into a file and attach the file.) It looks like

C:\>systeminfo

Host Name:                 MLLRWIN
OS Name:                   Microsoft Windows 7 Professional
OS Version:                6.1.7601 Service Pack 1 Build 7601
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Member Workstation
OS Build Type:             Multiprocessor Free
... 
POSTED BY: Bruce Miller
Posted 9 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 9 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 9 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 9 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 9 years ago

One more thing, Jo. I notice this is the 2nd post in which you describe an unexpected kernel exit. Does anything work? For example, If you start Mathematica fresh and then input x = 2, do you get the same problem? If so, you might read the information on resetting preferences: Resetting Mathematica

(similar post is http://community.wolfram.com/groups/-/m/t/424530 - moderator)

POSTED BY: David Keith
Posted 9 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 9 years ago

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

POSTED BY: David Keith
Posted 9 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

Group Abstract Group Abstract