fdvsfv 1D situation 3D situation

When it comes to discretization approaches, CFD textbooks tell the differences between Finite-Difference Method and Finite-Volume Method in their introductionary chapters. I have remembered the points below since I began learning CFD.

  • The starting point of the FD method is the the differential conservation equations. The partial derivatives are approximated in term of nodal values. It’s easy to obtain higher-order schemes on regular grids.
  • The FV method applied the integral form of conservation equations to a finite number of contiguous control volumes(CV). Interpolation is used to express valued at the CV surface in terms of CV center values. It’s suitable for complex gemetries.

But I haven’t fully understood these sentences until I write codes using both methods. Here I write down my understanding of both methods.

1D situation

It’s easy to illustrate 1D conservation law at the begining because it’s simple and doesn’t involve geometry and coordinate transformation.

Finite-Difference

$$
begin{equation}
u_t + f_x=0
end{equation}
$$

Using forward difference in time and central difference in space(FTCS):
$$
begin{equation}
frac{u_j^{n+1}-u_j^n}{Delta t} + frac{f_{j+1/2}^n - f_{j-1/2}^n}{Delta x}=0
end{equation}
$$

It is just Mathematics. The concepts used here are forward and central difference. Taylar expansion can be used to abtain the accuracy.

Finite-Volume

$$
begin{equation}
frac{partial}{partial t}int u dx + oint f dx=0
end{equation}
$$

Let $bar{u}=frac{1}{Delta x} int_Omega dx$ be the cell-averaged value. Let $f_{j+1/2}$ and $f_{j-1/2}$ be hte fluxes deffined at the cell boundaries.When the equation is applied to a control volume centered at $x=x_j$ , and divided by the cell volume $Delta x$ , we obtain:
$$
begin{equation}
frac{dbar{u}_j}{d t} + frac{f_{j+1/2}^n - f_{j-1/2}^n}{Delta x}=0
end{equation}
$$

Using the forward Euler time integration scheme, we obtain the same fomular as the FD method.
The concepts used here are cell-averaged value and cell boundary flux. They all have physical meanings.
One more thing need to remember is that the volume-averaged value differs from the cell center value by $mathcal{O}(Delta x^2)$ .

3D situation

The FD method need to transform the variables in physical space $(x,y,z,t)$ to computational space $(xi,eta,zeta,t)$ . In the process, metrics and jacobian of the transformation are requested.
The FV method need geometry quantities such as volume and area to compute cell-averaged value and cell boundary flux.
In this section, I will illustrate the equivalence between Mathematicial derivatives
metrics and Physical quantities areas in regular grid.

Generalized Coordinates

CFL3D manual gives a detialed three-dimensional transformation between the Cartesian variables $(x,y,z,t)$ and the generalized coordinated $(xi,eta,zeta,t)$ .
Here is a simple version without moving-grid.