1
$\begingroup$

I'm writing a simple FDM algorithm for solving the well known 3D heat equation

$$ \frac{\partial u}{\partial t} = \alpha \nabla^2 u + \frac{q}{c_p \rho} $$

where $q(x,y,z,t)$ represents the internal heat generation and $\alpha$, $\rho$ and $c_p$ are constants. Now, in order to test my numerical solution, it would be great to have some (even easy) initial conditions and boundary conditions for which an analytical solution is known so I can evaluate my algorithm and different finite difference schema. Can someone point me out in the right direction?

$\endgroup$

1 Answer 1

3
$\begingroup$

If you want to test your algorithm I suppose $q$, $\rho$ and $c_p$ are free to be chosen. Let's for simplicity put $\rho = c_p = 1$. Now choose whatever solution, $u$, you desire (so long as it can be appropriately differentiated) and operate on it with $$ \frac{\partial}{\partial t} - \alpha \nabla^2. $$ Whatever the result is will be your $q$. Initial and boundary conditions can then be derived directly from the $u$ you chose.

This is known as the Method of Manufactured Solution (MMS).

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .