Video summary

[CFD] The Finite Volume Method in CFD

Main summary

Key takeaways

Educational

Main ideas and lessons (Finite Volume Method in CFD)

  • The goal is to convert the Navier–Stokes equations (PDE form) into a solvable linear algebra system (matrix form) using the finite volume method (FVM).
  • This conversion is done by:

    • Integrating each term of the Navier–Stokes equations over a control volume (cell).
    • Applying special handling for different terms:
      • Source terms: straightforward integration; sometimes split into implicit vs explicit contributions.
      • Convection term: use the divergence theorem to convert volume integrals into surface integrals, then require face interpolation because unknowns are stored at cell centroids.
      • Diffusion term: handled similarly using the divergence theorem, but the detailed derivation is deferred to another video.
  • The method shown is a cell-centered, second-order FVM suitable for polyhedral meshes:

    • Variables (e.g., pressure, temperature, velocity, turbulent kinetic energy) are stored at cell centroids.
    • Within each cell, these quantities are assumed to vary linearly.

Methodology / step-by-step process described

A) Write Navier–Stokes equations in matrix form

  • Start from the steady incompressible Navier–Stokes equations (noting it can extend to compressible and unsteady forms).
  • Linearize/discretize to obtain a system of the form:
    • ( M \, U = B )
      • (U): unknown velocity (and generally flow variables) for each cell centroid in the mesh.
      • (M): matrix of coefficients created from discretized terms (convection, diffusion, source contributions).
      • (B): right-hand side contributions (including explicit parts of source terms).

B) Use generalized polyhedral cell discretization

  • Consider an owner cell (P) with centroid (P).
  • Identify neighboring cells (N) with centroids (N).
  • For a polyhedral cell with (m) faces:
    • Owner cell (P) has (m) neighbors connected by (m) faces.
  • Integrate over the volume of owner cell (P).

C) Integrate term-by-term over the owner cell

  • Integrate the Navier–Stokes equation over cell volume.
  • Use commutativity of integration and addition to treat each term separately because they require different discretization.

Source term treatment (implicit vs explicit choices)

1) Constant source term (e.g., gravity)

  • If the source is constant across the cell (example: acceleration due to gravity (G)):
    • Pull it outside the integral.
    • Contribution becomes: ( G \, V_P ).
  • Interpretation in (MU=B):
    • Since it does not depend on velocity, it goes into the right-hand side (B).

2) Linear velocity-dependent source term

  • If the source has form: ( S = s_P \, U ) (scalar (s_P) times velocity)
  • Assume linear variation of velocity in the cell (second-order FVM):
    • Expand (U) inside the cell using centroid value and gradient.
  • Key result:
    • The term involving (\int (X - X_P)\, dV) becomes zero by the definition of centroid.
  • Final simplified contribution:
    • ( s_P \, U_P \, V_P ).

Implicit vs explicit placement

  • If moved to the left side (implicit):
    • Add (-s_P V_P) to the diagonal of (M) (diagonal because it multiplies (U_P), the owner cell unknown).
  • If kept on the right side (explicit):
    • Add ( s_P U_P V_P ) to (B).

The emphasis is that CFD codes may choose on-the-fly whether to treat a source implicitly or explicitly to improve diagonal dominance of (M) (stability). - If it improves diagonal dominance (e.g., depending on the sign of (s)), choose implicit. - If it reduces diagonal dominance, choose explicit.

3) Nonlinear source terms (e.g., (S \propto U^2), (U^3))

  • Strategy: linearize using the previous iteration’s known velocity:
    • Replace (U) in nonlinear source expressions with lagged/previous-iteration values.
  • This yields a mixed implicit-explicit approach:
    • The unknown (U_P) remains in the linearized form,
    • Coefficients come from previous iteration (known at that time).
  • The code decides based on effect on diagonal dominance whether to place the contribution in (M) or (B).

Convection term treatment (requires face interpolation)

1) Apply divergence theorem

  • Convection term involves a divergence operator (conceptually like (\nabla\cdot(\mathbf{U}\mathbf{U}))).
  • Use the divergence theorem:
    • Convert volume integral of divergence into a surface integral over the cell boundary.

2) Interpret the surface integral physically

  • The integrand structure becomes:
    • (\mathbf{U}\,(\mathbf{U}\cdot \mathbf{n})) integrated over each face.
  • The factor (\mathbf{U}\cdot \mathbf{n}) times face area corresponds to the volume flow rate out of the cell through that face.

3) Split the surface into faces

  • For a polyhedral cell, replace the surface integral by a sum over faces.

4) Approximate face integrals using face-center values

  • Approximation:
    • Evaluate needed terms at the face center instead of integrating continuously over the face.

5) Interpolation is required

  • In a cell-centered CFD scheme:
    • Values are known at cell centroids ((P) and neighbor (N)),
    • Not directly at face centers.
  • Therefore, compute face-centered velocity/variables via interpolation from:
    • owner centroid value + neighbor centroid value.
  • The interpolation scheme choice determines the convection discretization:
    • upwind differencing
    • central differencing
    • linear upwind differencing

6) Assemble convection contributions into the matrix

  • After obtaining face-center values:
    • Add contributions to (M) and (B).
  • Matrix pattern:
    • Diagonal terms come from contributions associated with owner cell (P).
    • Off-diagonal terms come from contributions associated with neighbor cells (N).
  • Number of off-diagonal entries depends on cell connectivity:
    • Example: a hexahedral cell with 6 neighbors contributes to the diagonal + multiple off-diagonals accordingly.

Diffusion term

  • The diffusion term is stated to be handled similarly using the divergence theorem, but:
    • Requires additional detail such as orthogonal correctors.
  • The diffusion derivation is explicitly postponed to another video.

Final assembly and solution

  • For the overall discretized system:
    • Each Navier–Stokes term contributes to (M) and (B).
    • Contributions are summed/assembled to form the final ( M U = B ) system.
  • The velocity field is solved using an iterative linear solver.
  • Example method mentioned:
    • Algebraic multigrid (AMG).

References / resources mentioned

  • ANSYS Fluent User Guide, specifically Section 25.3.1.
  • Professor Y. A. Sax thesis (Imperial College London), recommended for detailed derivations.
  • Face interpolation schemes mentioned (covered in a separate video):
    • Upwind differencing, central differencing, and linear upwind differencing.
  • A link to the speaker’s website for summary notes/equations.

Speakers or sources featured

  • Aiden (speaker; “fluid mechanics 101”)
  • Professor Y. A. Sax (thesis reference: Imperial College London)
  • ANSYS Fluent User Guide (Section 25.3.1)

Original video