  The study of the stability of massive gaseous disks around a star in a
non-isolated context is not a trivial issue and becomes a more complicated task
for disks hosted by binary systems. The role of self-gravity is thought to be
significant, whenever the ratio of the disk to the star mass is non-negligible.
To tackle these issues we implemented, tested and applied our own Smoothed
Particle Hydrodynamics (SPH) algorithm. The code (named GaSPH) passed various
quality tests and shows good performances, so to be reliably applied to the
study of disks around stars accounting for self-gravity. This work aims to
introduce and describe the algorithm, making some performance and stability
tests. It constitutes the first part of a series of studies in which
self-gravitating disks in binary systems will be let evolve in larger
environments such as Open Clusters.
