There are some traces of the existence of internal ocean in some icy moons, such as the vapor plumes of Europa and Enceladus. This implies a region of liquid water beneath the surface ice shell. Since liquid water would be essential for the origin of life, it is important to understand the development of these internal oceans, particularly their temperature distribution and evolution. The balance between tidal heating and radiative cooling is believed to sustain liquid water beneath an icy moon’s surface. We aim to simulate the tidal heating of an internal ocean in an icy moon using 3-dimensional numerical fluid calculations with the Smoothed Particle Hydrodynamics (SPH) method. We incorporated viscosity and thermal conduction terms into the governing equations of SPH. However, we encountered two issues while calculating rigid body rotation using SPH with a viscous term: (1) conventional viscosity formulations generated unphysical forces that hindered rotation, and (2) there was artificial internal energy partitioning within the layered structure, which was due to the standard SPH formulations. To address the first issue, we modified the viscosity formulation. For the second, we adopted Density Independent SPH (DISPH) developed in previous studies to improve behavior at discontinuous surfaces. Additionally, we implemented radiative cooling using an algorithm to define fluid surfaces via the particle method. We also introduced an equation of state accounting for phase transitions. With these modifications, we have refined the SPH method to encompass all necessary physical processes for simulating the evolution of icy moons with internal oceans.