Background. Fluid simulation is an area of ongoing research. In recent years, simulators have become more realistic and stable, partly by employing the condition of having divergence-free velocity fields. A divergence-free velocity field is a strict constraint that requires a high level of correctness in a simulation. Another recent development is in the subject of performance optimization, where asynchronous time integration is used. Asynchronous time integration means integrating different parts of a fluid with varying time step sizes. Doing so leads to overall larger time step sizes, which improves performance. This thesis combines the divergence-free velocity field condition with asynchronous time stepping in a particle-based simulator. Objectives. This thesis aims to achieve a performance speedup by implementing asynchronous time integration into an existing particle-based simulator that assures the velocity field is divergence-free. Methods. With an open source simulator employing a divergence-free velocity field as a starting point, asynchronous time integration is implemented. This is achieved by dividing the fluid into three regions, each with their own time step sizes. Introducing asynchronous time integration means significantly lowering the stability of a simulation. This is countered by implementing additional steps to increase stability. Results. Roughly a 40\% speedup is achieved in two out of three scenes, with similar visual results as the original synchronous simulation. In the third scene, there is no performance speedup as the performance is similar to that of the original simulation. The two first scenes could be sped up further with more aggressive settings for asynchronous time integration. This is however not possible due to stability issues, which are also the cause for the third scene not resulting in any speedup. Conclusions. Asynchronous simulation is shown to be a valid option even alongside a divergence solver. However, occasional unrealistic behavior resembling explosions among the particles do occur. Besides from being undesirable behavior, these explosions also decrease performance and prevent more aggressive performance settings from being used. Analysis of their cause, attempted solutions and potential future solutions are provided in the discussion chapter.
Identifer | oai:union.ndltd.org:UPSALLA1/oai:DiVA.org:bth-22186 |
Date | January 2021 |
Creators | Holmqvist Berlin, Theo |
Publisher | Blekinge Tekniska Högskola, Institutionen för programvaruteknik |
Source Sets | DiVA Archive at Upsalla University |
Language | English |
Detected Language | English |
Type | Student thesis, info:eu-repo/semantics/bachelorThesis, text |
Format | application/pdf |
Rights | info:eu-repo/semantics/openAccess |
Page generated in 0.0012 seconds