New Reply

Initial Condition Problems with Heat Equation in Mathematica

 
Share Thread Thread Tools
Dec12-10, 01:16 PM   #1
 

Initial Condition Problems with Heat Equation in Mathematica


I've been trying to work through the heat equation given in this Sous Vide cooking primer:

http://amath.colorado.edu/~baldwind/sous-vide.html

It gives a modified version of the heat equation with a shape parameter for simplification. The equations are shown below:



When I try to put this into Mathematica, one of the initial conditions gives me the value "True". I can't figure it out for the life of me. My Mathematica input is here:

pde = {D[u[r, t],
t] == \[Alpha] (D[u[r, t], r, r] + \[Beta] D[u[r, t], r]/r),
u[r, 0] == Temp0, D[u[0, t], r] == 0,
D[u[R, t], r] == (h/k) (TempW - u[R, t])}

And this is what it spits out:

{Derivative[0, 1][u][r, t] ==
9.95*^-8*(Derivative[1, 0][u][r, t]/r +
Derivative[2, 0][u][r, t]), u[r, 0] == 25, True,
0 == 1250.*(60 - u[R, t])}

I've got some dummy variables in there for the alpha, beta, h, k, ... constants. I'm just not sure why this gives me "True". I know I'm completely missing something simple here. But it's been a while since I've tried to solve anything like this without finite elements.
 
PhysOrg.com
PhysOrg
science news on PhysOrg.com

>> Hong Kong launches first electric taxis
>> Morocco to harness the wind in energy hunt
>> Galaxy's Ring of Fire
Dec20-10, 04:09 PM   #2
 
Try "Derivative[1, 0][u][0,t] == 0" instead of "D[u[0, t], r] == 0". I think the latter evaluates, and the former represents (and will evaluate if it makes certain sense) but I'm not sure.
 
Dec20-10, 04:34 PM   #3
 
You're plugging in a value for r in your original equation for u and then differentiating with respect to r. Since there will be no terms with r in it (since you plugged 0 in for r), the resulting partial derivative will be 0. Since 0=0 is a true statement, you are getting back "true" as a result.

Try defining the derivative of u as a function and then plugging r in the derivative. However, this could also give a similar 0=0 result.

Hope this helps.
 
Dec20-10, 04:43 PM   #4
 

Initial Condition Problems with Heat Equation in Mathematica


The reason it's giving your "True" is that the expression D[u[0,t],r] means "take the partial derivative of u[0,t] with respect to r". Since u[0,t] is not a function of r, its partial derivative with respect to r is 0, so this equation reduces to 0==0, which reduces to "True". As Leperous said, you can type , "Derivative[1, 0][u][0,t] == 0", or what is perhaps more clear: "(D[u[r, t], r] /. r -> 0) == 0", which means "take the partial derivative of u[r,t] with respect to r, and then set r=0", which is what you really want.
 
Aug13-11, 03:37 AM   #5
 
I am also trying to put the PDE from Douglas Baldwin's Sous Vide cooking primer into Mathematica. With the comments before (on correct notation) I was able to add the equations to Mathematica. However NDSolve is trapped by the singularity for r=0 in (1). The second term in the usual 1D heat equation is added (as far as I understand) to be able to compensate with the Beta parameter for 3D shapes such as bricks and cylinders using approriate correction factors between 0 and 2 for Beta. The condition (2) makes the singularity "better behaving" but I found no simple way to convince NDSolve not being trapped by the 1/r term in (1).

(1) D[u[r, t], t] == \[Alpha] (D[u[r, t], r, r] + \[Beta] D[u[r, t], r]/r)
(2) D[u[r, t], r] /. r -> 0) == 0

Any ideas?
 
New Reply

Tags
boundary conditions, initial conditions, mathematica, pde
Thread Tools


Similar Threads for: Initial Condition Problems with Heat Equation in Mathematica
Thread Forum Replies
Final condition instead of initial condition Differential Equations 2
Heat Equation Initial Conditions Calculus & Beyond Homework 2
Solve initial-value problem for heat equation and find relaxation time Introductory Physics Homework 0
Heat equation, initial and boundary numerical conditions Calculus & Beyond Homework 2
Heat Equation in Polar coordinates in Mathematica Math & Science Software 0