Smoothed particle hydrodynamics (SPH) is a mesh-free numerical method which leads to an N-body problem-like. This
method was specifically created for astrophysical simulations and has been proved to be useful for certain hydrodynamical
problems. In this article SPH is introduced, and implemented for solving the free-fall collapse of a planet, which is an ideal
problem for validation because its analytical solution is known. In order to compare with a mesh method, the finite difference
method (FDM) is also implemented. Although FDM allows to implement restrictions that affect the symmetry of the
problem, resulting in better solutions, discretization with SPH is less restrictive and it is straightforward to formulate more
complex problems
2018/2019