2
$\begingroup$

I wanted to solve a heat equation for cube which has initial temperature of $100°C $ and is cooling to the temperature of $20°C$.

I calculated heat equation and I wanted get the coefficients $a_{n,m,l}$.

The conditions are $T(x,y,z,t)=20$ for all $(x,y,z)$ on the boundary of the cube and all $t > 0$ and $T(x,y,z,0)=100$ for all $(x,y,z)$ inside the cube. The equation which I tried to solve:

$\frac{\partial T}{\partial t} = \alpha \left(\frac{\partial^2 T}{\partial x^2} + \frac{\partial^2 T}{\partial y^2} + \frac{\partial^2 T}{\partial z^2} \right)$

The function I got

$T(x,y,z,t) = 20 + \sum_{n=1}^{\infty} \sum_{m=1}^{\infty} \sum_{l=1}^{\infty} a_{n,m,l} \sin\left(\frac{n \pi x}{a}\right) \sin\left(\frac{m \pi y}{a}\right) \sin\left(\frac{l \pi x}{a}\right) e^{-\alpha^2 \lambda_{n,m,l} t}$

I calculated

$$ a_{n,m,l} = \frac{8}{a^3} \int_{0}^a \int_{0}^a \int_{0}^a 80 \sin\left(\frac{n \pi x}{a}\right)\sin\left(\frac{m \pi y}{a}\right) \sin\left(\frac{l \pi x}{a}\right) dx \;dy \;dz \\ = -\frac{2560 \;sin^2\left(\frac{n \pi}{2}\right) sin^2\left(\frac{m \pi}{2}\right) (1-cos(\pi l))}{\pi^3 n m l} = \\ = 80 \left(\frac{2}{\pi}\right)^3 \frac{1}{nml} (1-(-1)^n)(1-(-1)^m)(1-(-1)^l)$$

But it seems not right. I don't know how to determine the right Fourier coefficient. I get this:

It should be 100 for t=0

Thank you for help. I get this

coefficient

$\endgroup$
16
  • $\begingroup$ You have no boundary conditions: $T(x,y,z,t)=20$ simply means that $T=20$ for all $x,y\text{ and }z$ and for all of time. You need three BCs: one for $x$, one for $y$ one for $z$. W/o these your problem is ill-posed. $\endgroup$
    – Gert
    Apr 23 at 23:37
  • $\begingroup$ @Gert I explain the initial conditions. $\endgroup$ Apr 23 at 23:43
  • $\begingroup$ You have a PDE, second order and in three dimensions (plus time). That means you need an initial condition (which you have) and TWO BCs per dimension, in order to be able to determine all integration constants (there are six of them). $\endgroup$
    – Gert
    Apr 23 at 23:46
  • $\begingroup$ I've corrected conditions for $x,y,z$, are they enough to find $T(x,y,z,t)$? $\endgroup$ Apr 23 at 23:56
  • $\begingroup$ Yes, I'll formulate an answer now $\endgroup$
    – Gert
    Apr 23 at 23:59
3
$\begingroup$

Your boundary conditions (BC) are better formulated as: $$T(0,y,z,t)=T(a,y,z,t)=20$$ $$T(x,0,z,t)=T(x,a,z,t)=20$$ $$T(x,y,0,t)=T(x,y,a,t)=20$$ Such BC are called 'non-homogeneous' and very difficult to handle.

But there's a 'cheap-and-easy' remedy: transform the dependent variable $T$ to:

$$u=T-20$$ The new boundary conditions in $u$ are now homogeneous, because: $$u(0,y,z,t)=u(a,y,z,t)=0$$ $$u(x,0,z,t)=u(x,a,z,t)=0$$ $$u(x,y,0,t)=u(x,y,a,t)=0$$

All your derivatives remain the same because $20$ is a constant and derives to $0$.

The new PDE is now:

$$\frac{\partial u}{\partial t} = \alpha \left(\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} + \frac{\partial^2 u}{\partial z^2} \right)$$

Now you solve this PDE with the new, homogeneous BCs (the IC becomes $u(x,y,z,0)=80$) and when you're done you apply:

$$T(x,y,z,t)=20+u(x,y,z,t)$$

That's where your mystery constant come from.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.