1
$\begingroup$

please how can I write gradient numerically? I have an eq. $\dfrac{\partial X}{\partial t}=\nabla^2 X + u\nabla X$ I wonder how write this in 3D. Many thanks for any idea... I can find how to solve the "pure" heat eq. but so I don't know..

$\endgroup$
6
  • 1
    $\begingroup$ Hi lovis, and welcome to scicomp! I presume $X$ is a scalar quantity, right? $\endgroup$ – Paul Feb 7 '13 at 17:32
  • $\begingroup$ yes, it is. Many thanks for your message. What can be done with this? $\endgroup$ – lovis Feb 7 '13 at 17:39
  • $\begingroup$ Excellent. Are you using finite difference method to solve this equation as well? What order accuracy do you expect your solution to have? $\endgroup$ – Paul Feb 7 '13 at 17:47
  • $\begingroup$ Do you only want to know how to discretize the gradient or how to solve the system? Can you rewrite your question to clarify? $\endgroup$ – vanCompute Feb 7 '13 at 17:48
  • 4
    $\begingroup$ Your equation is called advection-diffusion equation. You may want to google for that. $\endgroup$ – Wolfgang Bangerth Feb 8 '13 at 0:39

Browse other questions tagged or ask your own question.