Viscous Terms¶
Momentum Equation¶
The viscous terms from the momentum equation are
where \(\sigma_{ij}\) is the surface stress tensor, \(\mu\) is the dynamic viscosity, \(p\) is the thermodynamic pressure, \(\delta_{ij}\) is the Kronecker delta, and where \(S_{ij}\) is the strain rate tensor, given by
The above two equations may be combined to give
Before proceeding with a discrete approximation to the viscous terms above it is instructive to write them in an alternative form. Starting from Eq. (1), we can write
The first term in the square brackets is the Laplacian of the velocity and represents the dominant diffusive effect of the viscous terms. It is important to represent this term as accurately as possible in the discrete approximation. The second term in the square brackets is the gradient of the velocity divergence. For low to moderate Mach number atmospheric flows, the velocity divergence is expected to be rather small, and thus this term should have a minimal effect. The next full term is proportional to the viscosity gradient, which may or not be significant depending of the situation. In particular, it is probably negligible for the direct numerical simulation of a laminar atmospheric flow. The term may be significant, however, in a high Reynolds number turbulent flow where the viscosity coefficient \(\mu\) represents the sum of the eddy and molecular viscosities. The final term represents the pressure gradient, which is expected to be important in most cases.
Prior to making a discrete approximation to the viscous terms it is useful to introduce some notation that will make the derivation more compact. Assuming a uniform computational mesh with spacing \(\Delta x\), we define the two- and three-point first difference operators as
and
and the three-point second difference operator as
Note that the symbol \(\delta\) is used somewhat ambiguously to mean either the Kronecker delta (as in Eq (1)), or the finite difference operator (as used above). The number and format of the subscripts are different, however, and this is used to distinguish between the two. It will also be convenient to define the two-point interpolation operator as
As indicated, all of the above discrete approximations are second order accurate at the indicated grid location. The need for the midpoint locations \(i+1/2\) will become apparent below (see Figure Fig. 11).
Use the definitions above, it is possible to derive the following identities, which will come in handy in the derivation to be performed below.
In the finite volume context we work work with an integral form of the conservation laws. If we integrate the momentum equation over a single computational cell and concentrate on the viscous terms, we can write
where the sum in the final term is taken over the six faces of the computational cell, having area-weighted, outward-pointing, normal vectors \([(n\Delta \mathcal{S})_j]_l~~\scriptsize{j=1,2,3},~~~~ \scriptsize{l=1,2,...,6}\). Since the solution variables are stored at the cell centers, interpolation must be used to calculate the viscous terms (diffusive fluxes) at the cell faces. The basic idea can be illustrated using an \(x-y\) cross-section of a Cartesian mesh as shown below.
Here the locations of the solution variables are denoted filled circles whereas the locations of the cell faces where the fluxes must be computed for cell \((i,j)\) are denoted with 'X' symbols. These points are labeled N, S, E, and W in analogy with compass coordinates. The geometric terms \((n\Delta\mathcal{S})_j\) for the faces N, S, E, and W are \((0,1,0)\Delta x\Delta z\), \((0,-1,0)\Delta x\Delta z\), \((1,0,0)\Delta y\Delta z\), and \((-1,0,0)\Delta y\Delta z\), respectively, where \(\Delta z\) the mesh spacing in the direction perpendicular to the plane of the sketch. The area-weighted normal vectors for the faces with normals perpendicular to the plane of the sketch are \((0,0,1)\Delta x\Delta y\), and \((0,0,-1)\Delta x\Delta y\) Using this information, the discrete approximation to the sum of the viscous fluxes is
The fact that the above result is in the form of a finite difference approximation indicates that our finite-volume scheme is equivalent to a correctly-chosen discrete approximation to the differential form of the conservation laws. In particular, it is necessary to evaluate the stress terms midway between the solution points. Notice that the differences above are taken across one grid spacing. Thus using the operator notation above, the discrete approximation can be written as
where it is understood that the stress tensor is to be evaluated at the cell faces. The most straightforward manner to achieve such an evaluation is to compute the derivatives required by \(\sigma_{ij}\) at the cell centers using three-point difference operators, and then interpolate these values to the various cell faces. However doing this would spread the computational stencil across 5 points in each direction, which raises the truncation error and degrades the the spectral characteristics of the diffusion terms at high wavenumber as compared to 3-point operators. Motivated this realization, we form the following discrete approximation to the above equation
which is different from a straightforward averaging of the stress tensor to the cell face due to the absence of an interpolation operator on the first velocity gradient term, \(\partial_1 u_i/\partial_1 x_j\). Since the data points straddle the face for this term, a two-point difference produces a second order centered approximation at the face (which is at the midpoint of the data). Making this choice keeps the computational stencil more compact, thereby lowering the truncation error and improving the spectral characteristics of the approximation.
Additional insight can be gained by operating on the result above assuming constant viscosity and uniform mesh spacing (both of these constraints can be relaxed at the expense of additional algebraic complexity, but no net change in the conclusions to be drawn below). Under these restrictions, and after a modest amount of simplification, it is possible to rewrite the above relation as
This is the discrete analog of Eq. (3), written for constant viscosity. Note that our chosen approximation in Eq. (10) results in 3-point operators for the dominant Laplacian and pressure gradient terms. The velocity divergence term can not be written more compactly, but this is not a major concern since we expect it to be negligible.
In order to better understand the advantage of our chosen discritization, consider for a moment the straightforward alternative of uniformly interpolating all elements of the stress tensor to the cell faces. If this is done, the Laplacian term would be approximated as
where
This is identical in form to the standard 3-point second difference (Eq. (6)), but effectively using twice the mesh spacing. By skipping over every other point the above formula behaves much like a 3-point operator on a twice coarsened mesh. Since the formula is still second order accurate, the truncation error is increased by a factor of \(2^2=4\). Additional insight can be gained by looking at the spectral characteristics of these two possible second difference operators. To do this note that the Fourier transform of the exact second derivative is
where \(k\) is the wavenumber and \(\hat{\phi}(k)\) is the Fourier transform of \(\phi(x)\). The discrete approximations of Eqs. (6) and (11) are
and
where \({k_m^2}_2\) and \({k_m^2}_4\) are the 'modified wavenumbers (squared)' for the discrete approximations. The Taylor series approximations about \(k=0\) confirms that both approximations are second order accurate and that the truncation error of \(\delta_4^2\phi/\delta_4x\) is four times greater than for \(\delta_2^2\phi/\delta_2x^2\). For turbulence simulation, the behavior of the finite difference approximations at the high frequency end of the spectrum is equally important as turbulent dissipation is focused there. The spectral characteristics of the two alternative approximations are plotted in terms of their associated modified wavenumbers in the figure below.
While the three-point approximation is not great for high wavenumbers, the five-point approximation is absolutely terrible. It grossly under predicts the second derivative over all but the first third of the spectral range and actually returns a value of zero for the highest wavenumber! It would be completely unacceptable to use this approximation for turbulence simulations.
Looking beyond accuracy issues, the viscous terms in the momentum equation must obey a few additional physical constraints. Most importantly it is necessary that the viscous terms generate no vorticity for a constant-viscosity fluid. Since the vorticity equation is formed by taking the curl of the momentum equation, it is of interest to take the curl of the viscous terms. This analysis is , the viscous terms (for a constant viscosity fluid) contribute to the time rate of change of \(\omega_z\) via
Energy Equation¶
The rate of work done by the viscous terms appears in the energy equation as
Using the finite volume approach, simplified for a Cartesian mesh as done for the momentum equation, the work term is approximated as
where \(\tilde{\sigma}_{ij}\) is defined in Eq. (10).
The energy equation also contains a thermal conduction term that has a form similar to the viscous terms. It is
which is approximated as