Abstract Virtual two-dimensional (2D) fluid simulation is useful for directly simulating fluids in various situations, including geological simulations for landslides and fluid simulations for teaching. This research aims to simulate the behaviour of three different types of fluids (water, coconut oil, and glycerine) in a 2D container and analyse how these three types of fluids behave under various conditions, including interactions with boundaries. The research used Python programming to simulate fluids and the Wondershare Filmora X application to combine images. The Smooth Particle Hydrodynamics method simulated fluid in a 2D container with 10,000 particles by deriving the force density field directly from the Navier-Stokes equations. The Navier-Stokes equations were utilized to find the acceleration and velocity of fluid particles by considering external forces, internal forces, and gravity through this method. Acceleration and velocity were validated due to wall collisions, collisions with boundaries, and collisions between particles, which caused changes in particle position and velocity. During visualization, the fluid velocity decreased over time due to attenuation caused by interactions between neighbour particles, particles with boundaries, and particles with walls. From the simulation, it was observed that the fluid flowed from a higher place to a lower place, with fluid particles taking the shape of the container and the surface of the fluid forming waves. On the other hand, simulations with boundaries indicated that smaller gap sizes and higher viscosities led to increased difficulty in fluid penetration into the gap within the container.
Read full abstract