In fluid simulations, there are two dominant ways to represent a fluid: Eulerian and Lagrangian. So, what are they? Which can we use to make a good fluid simulation for a specific project? And how can we implement them?
First, let's discuss the Navier-Stokes equations, which generalize the motion of Newtonian fluids. The momentum of a particle in a Newtonian fluid is as follows:
The equation above gives us a fluid's motion at a particular point, and a fluid simulation works by calculating the velocity of lots of these points and interpolating between them. (For this model, we'll ignore the viscosity term and assume that the fluid we're simulating is a superfluid, just to make things slightly more manageable.) But at which points should we solve Navier-Stokes?
One approach is to track the position of each particle in the fluid and figure out its motion at its position. This is the Lagrangian approach, which is mathematically expressed as
Simulating every molecule seems like it would be very accurate, and it is. However, it's also very computationally expensive. The Eulerian approach tracks the fluid globally, setting the reference point to a fixed position. It calculates Navier-Stokes at fixed points along the fluid, which can be much faster computationally, but it's also less accurate. Mathematically, this approach is expressed as
Both the Eulerian and Lagrangian approaches are functions of position and time, and they can be related with the equation
Comments
Post a Comment