I'm quite new to the smoothed particle hydrodynamics method, so I'm trying to find Matlab or Python code to help me understand it. Specifically, I want to know how to solve the one-dimensional diffusion equation like in this paper,

$$\frac{\partial u}{\partial t} = \lambda \frac{\partial^2 u}{\partial x^2}$$

SPH is reviewed in many good introductory texts, eg. Monaghan and Price papers. I understand the math/theory, but I'm trying to find a detailed simple code to see how things work numerically. I know there are software packages like DualSPHysics, but I prefer something basic for solving the above differential equation. Can you please help?



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.