ABSTRACT

In the previous chapter we saw that a crucial step of the fluid simulation is solving the advection equation https://www.w3.org/1998/Math/MathML"> D q / D t = 0. https://s3-euw1-ap-pe-df-pch-content-public-p.s3.eu-west-1.amazonaws.com/9781315266008/9ef028a4-40db-4499-bfd1-64ec0ed7470c/content/ueqn3_1_B.tif" xmlns:xlink="https://www.w3.org/1999/xlink"/> We will encapsulate this in a numerical routine https://www.w3.org/1998/Math/MathML"> q n + 1 = advect  ( u → ,   Δ t ,   q n ) , https://s3-euw1-ap-pe-df-pch-content-public-p.s3.eu-west-1.amazonaws.com/9781315266008/9ef028a4-40db-4499-bfd1-64ec0ed7470c/content/ueqn3_2_B.tif" xmlns:xlink="https://www.w3.org/1999/xlink"/> which given a velocity field https://www.w3.org/1998/Math/MathML"> u → https://s3-euw1-ap-pe-df-pch-content-public-p.s3.eu-west-1.amazonaws.com/9781315266008/9ef028a4-40db-4499-bfd1-64ec0ed7470c/content/ineqn3_1_B.tif" xmlns:xlink="https://www.w3.org/1999/xlink"/> (discretized on a MAC grid), a time step size Δt, and the current field quantity qn returns an approximation to the result of advecting q through the velocity field over that duration of time.