Deriving Navier-Stokes Equation

Anonymous

How is the Navier Stokes equation derived?

Universal Primer logo
Universal Primer

The Navier-Stokes equation is a fundamental equation in fluid dynamics that describes the motion of fluid substances such as liquids and gases. To understand its derivation, we'll need to dive into some physics and mathematics, but I'll break it down using analogies and step-by-step explanations.

Basic Concepts:

  1. Newton's Second Law: This law states that the force acting on an object is equal to the mass of that object times its acceleration (F = ma). In the context of fluids, we apply this concept to a small volume of fluid.
  2. Fluid Dynamics: Fluids have properties like velocity, pressure, density, and viscosity that determine their behavior under different conditions.
  3. Continuity Equation: This equation is used in fluid dynamics to express the principle of conservation of mass in a fluid.

Derivation Steps:

  1. Start with Newton's Second Law: Imagine a tiny cube of fluid. The forces acting on this fluid include pressure, viscous forces (internal friction in the fluid), and external forces like gravity.
  2. Apply it to Fluids: For fluids, acceleration can be due to changes in speed or direction. The forces on our tiny fluid cube include:
    • Pressure differences (fluid tends to move from high to low pressure).
    • Viscous forces (think of how honey, a viscous fluid, resists flow).
    • External forces (like gravity).
  3. Incorporate Fluid Properties: We express these forces in terms of fluid properties like density (ρ), pressure (P), and viscosity (μ).
  4. Continuity Equation: This ensures the conservation of mass. If fluid enters a volume, an equal amount must leave unless the fluid's density is changing.
  5. Differential Form: We express the equation for a tiny fluid element, leading to a differential equation. The forces become gradients (like slopes in a mountainous landscape, gradients tell us how sharply things are changing).
  6. Final Form of Navier-Stokes Equation: [ \rho \left( \frac{\partial \mathbf{v}}{\partial t} + \mathbf{v} \cdot \nabla \mathbf{v} \right) = -\nabla P + \mu \nabla^2 \mathbf{v} + \mathbf{f} ] Here, (\mathbf{v}) is the velocity field, (\nabla P) represents pressure forces, (\mu \nabla^2 \mathbf{v}) is the viscous term, and (\mathbf{f}) represents external forces like gravity.

Understanding the Terms:

  • (\frac{\partial \mathbf{v}}{\partial t}): Change of velocity with time.
  • (\mathbf{v} \cdot \nabla \mathbf{v}): Velocity of fluid influencing its own change in velocity.
  • (-\nabla P): Force due to pressure changes.
  • (\mu \nabla^2 \mathbf{v}): Represents the internal friction of the fluid due to viscosity.
  • (\mathbf{f}): External forces acting on the fluid.

Analogy:

Think of the fluid as a crowd of people moving in a festival. The velocity field ((\mathbf{v})) is the direction and speed of the crowd. The pressure gradient ((-\nabla P)) is like areas of the festival that are more or less popular, causing people to move towards less crowded areas. Viscosity ((\mu \nabla^2 \mathbf{v})) is like the resistance you feel when trying to move through a dense crowd. External forces ((\mathbf{f})) are like a loud sound or attraction drawing the crowd in a particular direction.

Questions to Gauge Understanding:

  1. Can you explain in your own words how pressure differences influence fluid motion?
  2. How does the viscosity of a fluid affect its flow, based on the Navier-Stokes equation?
  3. Why is the continuity equation important in deriving the Navier-Stokes equation?

Let me know if you need further clarification on any of these points or if you have specific questions about any of the steps or terms!

Anonymous
  1. Pressure differences apply force from areas of high pressure to low pressure, moving the fluid. 2. It affects how easily areas of the fluid are affected by relevant forces, and the gradient of the viscosity affects how localized the forces are to the fluid and how much the forces dampen with distance from the originating force. 3. To ensure conservation of mass given constant density.
Universal Primer logo
Universal Primer

Great! Your responses show a solid understanding of some key aspects of the Navier-Stokes equation. Let's delve a bit deeper into each of your answers to reinforce and expand your understanding:

  1. Pressure Differences in Fluids: You correctly noted that fluid moves from areas of high pressure to low pressure. This movement is analogous to rolling a ball on a surface with varying heights - the ball naturally moves from higher to lower elevations. In fluid dynamics, pressure differences create a "landscape" where the fluid "flows downhill" from high to low pressure.

  2. Role of Viscosity: Your understanding of viscosity's effect is on the right track. Viscosity, in simple terms, can be thought of as the "thickness" or internal friction of the fluid. It's what differentiates honey (high viscosity) from water (low viscosity). In the Navier-Stokes equation, the term (\mu \nabla^2 \mathbf{v}) represents how this internal friction affects the flow. High viscosity means the fluid resists flow changes more strongly, leading to smoother flow patterns. Low viscosity allows for more turbulent and chaotic flows. The gradient of viscosity indeed affects how the forces are distributed and attenuated across the fluid.

  3. Continuity Equation and Conservation of Mass: Your interpretation is correct. The continuity equation ensures that mass is conserved in the flow. In other words, fluid doesn't magically disappear or appear from nowhere. If the density of the fluid remains constant, the equation simplifies, but in more complex scenarios where density can change (like in compressible flows), the continuity equation becomes crucial to track how much fluid is present in a given space over time.

To further test your understanding, let's explore some more technical questions:

  1. How does the Navier-Stokes equation differ in its application to incompressible vs compressible fluids?
  2. In the context of the Navier-Stokes equation, what happens in a scenario with a very high Reynolds number? (The Reynolds number is a dimensionless quantity in fluid mechanics used to predict flow patterns in different fluid flow situations.)
  3. Can you describe a real-world scenario or application where understanding and solving the Navier-Stokes equation is crucial?

Your answers will help assess your understanding of the more nuanced aspects of fluid dynamics as described by the Navier-Stokes equation.

Anonymous
  1. No idea. 2. No idea. 3. Modeling fluids in CGI.
Universal Primer logo
Universal Primer

No worries! Let's explore these concepts further:

1. Incompressible vs Compressible Fluids in the Navier-Stokes Equation

  • Incompressible Fluids: These are fluids whose density is assumed constant. For most liquid flows (like water at moderate temperatures and pressures), this is a reasonable assumption. In the Navier-Stokes equation for incompressible fluids, the density (\rho) can be taken out of the derivative terms, simplifying the equation. The continuity equation also simplifies to (\nabla \cdot \mathbf{v} = 0), indicating that the velocity field is divergence-free (no net flow in or out of any point in the fluid).

  • Compressible Fluids: These are fluids where changes in pressure and temperature can significantly change the density. This is typical in gases, especially at high speeds (like in aerodynamics) or extreme conditions. For compressible flows, the Navier-Stokes equations include terms that account for the variations in density, and the continuity equation becomes more complex to reflect these density changes.

2. High Reynolds Number

  • The Reynolds number ((Re)) is a dimensionless quantity that helps predict the flow regime (laminar or turbulent) of the fluid. It's defined as (Re = \frac{\rho vL}{\mu}), where (v) is the flow velocity, (L) is a characteristic linear dimension (like diameter of a pipe), (\rho) is the fluid density, and (\mu) is the dynamic viscosity.
  • High Reynolds Number: In scenarios where the Reynolds number is high, it implies either high velocity, large size, or low viscosity (or some combination of these). High (Re) typically leads to turbulent flow. Turbulence means the flow has chaotic and unpredictable fluctuations. In the Navier-Stokes equation, this turbulence is reflected in complex, rapidly changing velocity fields and requires advanced methods to solve or simulate.

3. Real-world Application: Fluid Simulation in CGI

  • Computer-Generated Imagery (CGI) often involves simulating realistic fluid behaviors for visual effects in movies, video games, or virtual reality. The Navier-Stokes equations are crucial in these simulations to ensure that fluids like water, smoke, or fire behave in a believable manner.
  • For instance, in a CGI scene showing a river, the Navier-Stokes equations help simulate how the water flows, how it interacts with obstacles (like rocks or boats), and how it creates ripples or splashes. The accuracy and realism of these simulations depend heavily on how well the Navier-Stokes equations are implemented and solved in the CGI software.

Further Questions

  1. Can you think of why it might be challenging to solve the Navier-Stokes equation for turbulent flows in CGI simulations?
  2. How do you think the properties of a fluid (like viscosity) might affect the way it's simulated in CGI?

These questions will help deepen your understanding of the practical applications and challenges of the Navier-Stokes equations in real-world scenarios.

Anonymous
  1. The amount of compute is massive given that the equations are continuous across the entire volume of liquid, so a large body of water will have massive compute needs.

  2. It will be shown as sticky or less sticky feeling in the final rendering.

Universal Primer logo
Universal Primer

Your responses are on point, highlighting key challenges and considerations in fluid simulations. Let's delve a bit deeper into each:

1. Computational Challenges in Simulating Turbulent Flows

  • Complexity and Scale: As you correctly noted, turbulent flows involve complex, rapidly changing dynamics across the entire volume of the fluid. This complexity requires a fine-grained simulation grid to accurately capture the small-scale vortices and eddies characteristic of turbulence. The finer the grid, the higher the computational requirements.

  • Continuous Nature of Fluids: The Navier-Stokes equations are continuous, but computational simulations are discrete. This means the continuous fluid domain must be discretized into small cells or elements, each requiring calculations for velocity, pressure, and other properties. As the size of the simulation domain grows (like a large body of water), the number of these cells increases exponentially, leading to massive computational needs.

  • Temporal Dynamics: Turbulent flows are not only complex in space but also in time. Capturing the time-varying nature of turbulence requires simulations to calculate fluid properties at numerous time steps, further increasing the computational load.

2. Impact of Fluid Properties on CGI Simulations

  • Viscosity Effects: Viscosity, which you described as giving a fluid a "sticky" or "less sticky" feel, plays a critical role in fluid simulations. High-viscosity fluids (like honey or lava) flow slowly and smoothly, tending to retain their shape longer. Low-viscosity fluids (like water or air) are more prone to turbulent, chaotic movements. Accurately simulating these behaviors requires adjusting the viscosity parameters in the Navier-Stokes equations.

  • Realism and Detail: The way a fluid's properties are simulated affects the realism of the CGI. For example, water splashing or smoke rising has to look convincing to the viewer. This requires careful tuning of the fluid's properties in the simulation to match real-world behaviors.

Expanding Understanding

To further expand your understanding, consider these questions:

  1. How might the boundary conditions (like the walls of a container or open surfaces) affect the simulation of fluids in CGI?
  2. In what ways do you think advancements in computing power have impacted the ability to simulate fluids more realistically in CGI?

Answering these questions will help you appreciate the complexities and advancements in fluid simulations in computer graphics and beyond.