Week 9 - FVM Literature Review
Finite Volume Method
Finite volume method (FVM), like FEM, is based on an unstructured (e.g. triangular) mesh. Therefore, it is suitable for irregular and complex geometries. FVM has another advantage over FEM for fluid mechanic problems. So far, the numerical methods that we presented have been based on PDEs. By contrast, FVM is based on the integral form of the conservation laws, rather than their differential form. This leads to more accuracy/stability, especially for sharp gradients (i.e. large derivatives) inside a domain, which is also called shock-capturing property. To explain this more clearly, as we mentioned before, the dynamics of flow can be described by conservation of mass, momentum, and energy. These conservation laws can be written as a system of PDEs. Alternatively, conservation laws can be expressed by integral equations (i.e. Reynolds transport theorem). For instance, the differential form of the continuity equation can be written as
`(∂ρ)/(∂t) + (∂(ρu))/(∂x) + (∂(ρv))/(∂y) + (∂(ρw))/(∂z) = 0`
where u, v, and w are the components of flow velocities in the x, y, and z directions, and ρ is the density. The integral form of continuity for a control volume (or a finite volume) can be written as
`∂/(∂t) * int_V ρ*dV + int_S ρu*dS=0`
where V is the control volume, S is the control surface, u = (u, v, w), and S is the surface vector.
Therefore, the change of mass inside a control/finite volume plus the net mass fluxes through the control surface should be zero. In FVM, the domain is first discretized into a number of nonoverlapping finite volumes or cells. Usually, these finite volumes are triangles (2D) or prisms (3D). Next, conservation laws are applied to each individual cell to form enough algebraic equations, which can be solved to compute the state variables.
The finite volume method (FVM) is a method for representing and evaluating partial differential equations in the form of algebraic equations. In the finite volume method, volume integrals in a partial differential equation that contain a divergence term are converted to surface integrals, using the divergence theorem. These terms are then evaluated as fluxes at the surfaces of each finite volume. Because the flux entering a given volume is identical to that leaving the adjacent volume, these methods are conservative. Another advantage of the finite volume method is that it is easily formulated to allow for unstructured meshes. The method is used in many CFD packages. "Finite volume" refers to the small volume surrounding each node point on a mesh.
Finite volume methods can be compared and contrasted with the finite difference methods, which approximate derivatives using nodal values, or finite element methods, which create local approximations of a solution using local data, and construct a global approximation by stitching them together. In contrast a finite volume method evaluates exact expressions for the average value of the solution over some volume, and uses this data to construct approximations of the solution within cells.
Consider a simple 1D advection problem
`(delrho)/(delt) + (delf)/(delx) = 0, t>=0` (1)
Here `rho = rho(x,t)` represents the state variable and `f = f(rho(x,t))` represents the flux or flow of `rho`. Conventionally, positive f represents flow to the right while negative f represents flow to the left. If we assume that the above equation represents a flowing medium of constant area, we can sub-divide the spatial domain, x into finite volumes or cells with cell centres indexed as i. For a particular cell, i, we can define the volume average value of `rho_i(t) = rho(x,t)` at time `t = t_1` and
x in `[ x_(i-1/2) , x_(i+1/2) ]`, as
`bar rho_i(t_1) = 1/( x_(i+1/2) - x_(i-1/2)) * int_( x_(i+1/2))^( x_(i-1/2)) * rho(x,t_1) dx` (2)
and at time `t = t_2` as,
`bar rho_i(t_2) = 1/( x_(i+1/2) - x_(i-1/2)) * int_( x_(i+1/2))^( x_(i-1/2)) * rho(x,t_2) dx` (3)
where `x_(i-1/2) and x_(i+1/2)` represent locations of the upstream and downstream faces or edges respectively of the `i^(th)` cell
Integrating equation (1) in time, we have
`rho(x,t_2) = rho(x,t_1) – int_(t_1)^(t_2) * f_x(x,t)dt` (4)
where `f_x = (delf)/(delx)`
To obtain the volume average of `rho(x,t)` at time `t = t_2`, we integrate `rho(x,t_2)` over the cell volume, `[x_(i-1/2), x_(i+1/2)]` and divide the result by `Deltax_i = x_(i+1/2) - x_(i-1/2)`
i.e `bar rho_i(t_2) = 1/(Deltax_i) * int_(x_(i-1/2))^(x_(i-1/2)) * { rho(x,t_1) – int_(t_1)^(t_2) f_x(x,t)dt}dx` (5)
We assume that f is well behaved and that we can reverse the order of integration. Also, recall that flow is normal to the unit area of the cell. Now, since in one dimension `f_x = grad * f`, we can apply the divergence theorem, i.e `oint_v grad * f dv = oint_S * f dS`, and substitute for the volume integral of the divergence with the values of `f(x)` evaluated at the cell surface (edges `x_(i-1/2) and x_(i+1/2)`) of the finite volume as follows
`bar rho_i(t_2) = bar rho_i(t_1) – 1/(Deltax_i) * (int_(t_1)^(t_2) * f_(i+1/2) dt - int_(t_1)^(t_2) * f_(i-1/2) dt)` (6)
where `f_(i+-1/2) = f(x_(i+-1/2),t)`
We can therefore derive a semi-discrete numerical scheme for the above problem with cell centres indexed as i, and with cell edge fluxes indexed as `i+-1/2`, by differentiating (6) with respect to time to obtain
`(d bar rho_i)/(dt) + 1/(Deltax_i) * [f_(i+1/2) – f_(i-1/2)] = 0` (7)
Where values for the edge fluxes, `f_(i+-1/2)` , can be reconstructed by interpolation or extrapolation of the cell averages. Equation (7) is exact for the volume averages, i.e no approximations have been made during its derivation.
This method can also be applied to a 2D situation by considering the north and south faces along with the east and west faces around a node
Difference between FDM and FVM
FDM is a differential scheme, that is approximation of a taylor series expansion. You try to write the first order, second order differential in terms of difference between two point values. This may bring in some approximation error.
Finite Volume method (FVM) is an integral scheme. Since you are integrating across the area, chance of error is minimized.
Finite Element Method is also an integral scheme.
So between a differential and an integral scheme (integral scheme scores in terms of error).
Differential schemes are faster and error can be minimized if you have regular grids (squares and rectangles).
Integral schemes are slightly slower but score over FDM when the mesh is irregular.
Most of the commercial software like FLUENT (FVM) are either FVM or FEM (Deform)
FDM are very popular methods in academic circles
Need for Interpolation schemes and Flux limiters
The approximations of surface and volume integrals require values of the variable at locations other than the computational nodes of the control volume. Values at these locations are obtained using interpolation formulae.
Types of interpolations methods are
Upwind interpolation
Linear interpolation
Quadratic upwind interpolation
Hybrid, TVD and ENO interpolation schemes
The idea of the flux limiter is to address the source of the oscillations. The source of the oscillations is actually the extrapolation and anytime you perform extrapolation you introduce potentially overshoots and undershoots.