## 2 Fluid Models
### SPH Model
\[\frac{dV_{i}}{dt}=\Big{(}f_{i}^{pressure}+f_{i}^{viscosity}\Big{)}+g+f_{i}^{ collision}, \tag{2}\]  
\[f_{i}^{pressure}=-\sum\
olimits_{i}m_{i}\bigg{[}\frac{p_{i}}{\rho_{i}^{2}}+ \frac{p_{j}}{\rho_{j}^{2}}\bigg{]}\
abla\
olimits_{i}W\big{(}\tau_{ij},h\big{)}, \tag{3}\]  
\[f_{i}^{viscosity}=-\mu\sum\
olimits_{j}m_{i}\bigg{[}\frac{v_{i}+v_{j}}{\rho_{i} }\bigg{]}\
abla\
olimits_{i}^{2}W\big{(}\tau_{ij},h\big{)}. \tag{4}\]  
The pressure field is computed directly from an equation of state using weak compressibility: \"[PERSON]'s equation.\" See [6] and [22] for reference. Equation (5) is [PERSON]'s equation, where \(\rho_{0}=1000\) Kg/m\({}^{3}\) is the rest density of water, \(c_{s}=1480\) m/s is the speed of sound and \(\gamma=7\) is a selected constant. Weak compressibility is used, rather than enforcing incompressibility with the Poisson equation [7] and compromising the real time performance. \[p=\frac{\rho_{0}c_{s}{}^{2}}{\gamma^{\prime}}\bigg{(}\bigg{(}\frac{\rho}{\rho _{0}}\bigg{)}^{\gamma^{\prime}}-1\bigg{)} \tag{5}\]  
Finally, solving force Equations (3) and (4) for a single particle and adding them with the gravity vector \(g\) and the collision fluid-to-solid force, the total force of a particle \(i\) at certain time step is obtained and described in Equation (2). The collision force is the force acting in every particle within the range of influence of the solid boundaries (the vessel walls). Just as particles are the primitive elements of the fluid, triangles are the primitives of the solids (vessels). Therefore, fluid-to-solid collisions are particle-to-triangle collisions that are computed by trivial intersections just as in [23], with real time GPU performance. Thus, the final computed force, _force vector_ in Figure 2, is then time-integrated twice to find the updated velocity and position of particle \(i\) and complete one timestep computation of SPH. The leapfrog scheme is used for the integration task because of its symplectic nature; i.e., its time reversibility feature [24]. An integration time step of 2 milliseconds should be used. Boundary conditions are far from being trivial to any control model of fluid handling. Wall boundary conditions are simulated here as collision forces between solid body primitives (triangles) and the particles. This combination has been used frequently in 3D modelling to improve processing cost at the expense of boundary stability [23]. Modelling solids as fixed particles improves stability, but also increases the processing cost by adding to the number of particles in the region to compute [25]. Boundary forces occurring in free surface interface between liquid and air (i.e., atmospheric pressure) are typically negligible for robot kinematics in domestic settings simulations. An important parameter is the choice of the pouring velocity, or the height of liquid over the vessel rim. The faster the pour is, the faster SPH needs to calculate fluid particles at shorter time steps. But also, too low a \(h_{q}\) will compromise the outflow trajectory due to the fluid viscosity [26]. There is also a subcritical regime to take care of when the height increases drastically and then excites hydraulic jumps [3]. Thus, a minimal expression of \(h_{q}\) has to be studied based in the minimal expression of the SPH method. And, this is the particle itself. Each particle has a range of influence. That range, called smoothing length in SPH (\(h\) in Equations (3) and (4)), is defined by a spatial range where neighboring particles influence a given particle. By defining the minimum size of \(h_{q}\) as the size of the smoothing length, the particles carry along the flow of the added forces of the particles around it. This diminishes the sources of turbulence and provide added forces to the outflow every time step. In our simulation, a scaled smoothing length of 10 mm was used, and thus a radius of interaction of 5 mm as the minimum value for \(h_{q}\).