Message Boards Message Boards

0
|
4835 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

DSolve: how to plot the heat equation solution?

Posted 9 years ago

Hi everyone

First of all, sorry for my poor english, that's not my native language.

Secondly I'm trying to solve the heat equation with spherical coordinates but I have some issues in plotting the solution. Here's my problem: I'm solving the heat equation with a spherical laplacian and I'm considering that the temperature only depends on the radius r. There are two sources of temperature: one at T1 at r=rmin et an other one at T2 at r=rmax. I'm solving the heat equation with a solution of the form T=T(r)e^(iwt) , where T(r) can be complex

Then the heat equation D*Laplacien(T)=d(T)/dt becomes DLaplacien(T(r))=iw*T(r)

Thus I wrote the following code:

 Thermalconductivity = 148
Thermalcapacity = 711
Density = 2338
d = N[Thermalconductivity/(Density*Thermalcapacity)]

f = 1
w = 2 Pi*f

T0 = 300
T1 = 300.1

rmin = 1.35*0.000001
rmax = 500*0.000001

r =. ..
sol = DSolve[{d T''[r] + (2 d/r) T'[r] == I w T[r], T[rmin] == T1, 
   T[rmax] == T0}, T[r], {r, rmin, rmax}]

Then I want to plot the modul of T, so I wrote:

Plot[Evaluate[Abs[T[r]]], {r, rmin, rmax}]

However I only got the two axes y;x without any curve -_-

Does anybody has an idea of where my mistake is?

Cheers

2 Replies

Thank you very much for these explanations :)

Dsolve returns a rule. See this article for information on how to use rules in this situation:

http://support.wolfram.com/kb/12505

Plot[Evaluate[Abs[T[r]]] /. First[sol], {r, rmin, rmax}]
POSTED BY: Sean Clarke
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