[Mathematica] Solving Heat Equation in Spherical Coordinates

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 5K views
GAbit
Messages
2
Reaction score
0
Hello Folks,


I have this equation to solve (expressed in LaTeX):

\frac{\partial{h}}{\partial t} = \frac{1}{n} \left[ \frac{1}{r^2 \sin^2{\phi}} \frac{\partial}{\partial \theta} \left( K \frac{\partial h}{\partial \theta} \right) + \frac{1}{r^2 \sin \phi} \frac{\partial}{\partial \phi} \left( K \sin \phi \frac{\partial h}{\partial \phi}\right) + s(\theta,\phi,t) \right]

This is similar to heat equation expressed in spherical coordinates, using mathematical convention for \phi and \theta and where s is a source term (but comes from data and do not need to be computed), and n is constant (does not depend on time) and again this is something we know (or assume), and finally, as you can read, there is no gradient in the radial direction.

I'd like to use Mathematica as I need to resolve this equation numerically for different dataset (for K,n and s, that I have) on a sphere, and it seems to be THE tool for such task. But I don't have any experience (a very a little actually) with Mathematica.

Could someone help me with this?

thanks a lot!

G.
 
Last edited:
Physics news on Phys.org
I might have something close to what I need, but in Maple:

PDE := n*(diff(h(theta, phi, t), t)) = (diff(K*(diff(h(theta, phi, t),
theta)), theta))/(r^2*sin(phi)^2)+(diff(K*sin(phi)*(diff(h(theta, phi,
t), phi)), phi))/(r^2*sin(phi)) ;

sol := pdsolve(PDE, h(theta, phi, t));

but I really want to do it with Mathematica, as my Maple license will expire soon and only Mathematica will be available in my place.

Any ideas how I can convert this into Mathematica?

thanks.