Error Reduction via Removal of Background TermsΒΆ

As discussed in section Governing Equations, CGCAM uses simple means to estimate the net fluxes, forces, and heat transfer at each cell face. When balances are computed for distorted mesh cells, various errors conspire to produce deviations from expected behavior. For example, consider a common situation where the background pressure and density are functions of altitude alone, i.e. \(\bar{p}=\bar{p}(z)\) and \(\bar{\rho}=\bar{\rho}(z)\). If this pressure distribution is integrated analytically over a distorted mesh cell, one will find

\[\Sigma \bar{F}_{px} = 0; \qquad \Sigma \bar{F}_{py} = 0; \qquad \Sigma \bar{F}_{pz} = -mg,\]

where \(m\) is the mass contained in the cell volume. If the same evaluations are made using the CGCAM approximations, all three of the above truths will be violated to some degree. While these deviations will reduce as the mesh is refined, we are motivated to find more direct means to reduce or eliminate the obvious errors. A simple way to do this is to subtract known balances from the conservation laws before the various terms are computed. As an example, let's enlarge the prior example to also have 1-D background wind profiles with zero vertical velocity: \(\bar{u}=\bar{u}(z)\), \(\bar{v}=\bar{v}(z)\), and \(\bar{w}=0\). The derivation is easier to follow if we use the differential form of the governing equations and, if we evaluate the momentum equation for the background fields, we get

\[\frac{\partial \bar{p}}{\partial x_i} - \bar{\rho}g\delta_{i3} + \frac{\partial \bar{\sigma}_{ij}}{\partial x_j} = 0\]

If we subtract the above equation from the full momentum equation (see section Governing Equations) and denote deviations from the background by a prime (e.g. \(p^\prime=p-\bar{p}\), the momentum equation becomes

\[\frac{\partial \rho u_i}{\partial t} + \frac{\partial \rho u_i u_j}{\partial x_j} = -\frac{\partial p^\prime}{\partial x_i} - \rho^\prime g\delta_{i3} + \frac{\partial \sigma^\prime_{ij}}{\partial x_j}\]

While this form is analytically equivalent to the full momentum equation, it differs numerically since the errant background pressure balance has been removed. This same equation is arrived at from a different perspective in Section Hydrostatic balance.

We can go one step further if we notice that the advective terms due to the backgrounds (\(\partial \bar{\rho} \bar{u}_i\bar{u}_j/\partial x_j\)) will not evaluate to zero under the CGCAM approximation. Since these terms are zero analytically, we can subtract them as well to get

\[\frac{\partial \rho u_i}{\partial t} + \frac{\partial(\rho u_i u_j - \bar{\rho} \bar{u}_i\bar{u}_j)}{\partial x_j} = -\frac{\partial p^\prime}{\partial x_i} - \rho^\prime g\delta_{i3} + \frac{\partial \sigma^\prime_{ij}}{\partial x_j}\]

Starting from this form of the momentum equation has the distinct advantage that known numerical approximation errors associated with the background terms have been removed. It is also clear that this equation displays an exact numerical equilibrium when the solution is initialized to the background state.

Similar modifications are made to mass and energy conservation laws and, collectively, these have a close tie-in with the data assimilation scheme discussed in Section Data Assimilation.

As a practical matter, the conservation laws can be put in a more computationally-efficient form when the background contributions are to be removed. To see this, note that all of the advective terms are of the form \(\partial(\rho u_j\alpha)/\partial x_j\). If the background contributions are to be removed, we can operate as follows:

\[\begin{split}\begin{eqnarray} (\rho u_j)\alpha - (\overline{\rho u_j})\bar{\alpha} & = & (\rho u_j)(\bar{\alpha} + \alpha^\prime) - (\overline{\rho u_j})\bar{\alpha} \\[0.1in] & = & [(\overline{\rho u_j}) + (\rho u_j)^\prime]\bar{\alpha} + (\rho u_j)\alpha^\prime - (\overline{\rho u_j})\bar{\alpha} \\[0.1in] & = & (\rho u_j)^\prime\bar{\alpha} + (\rho u_j)\alpha^\prime. \end{eqnarray}\end{split}\]

This form shows that the net advection is the sum of two simple terms: the advection of \(\alpha^\prime\) by the full mass flux and the advection of \(\bar{\alpha}\) by the fluctuating mass flux.

Removal of the background terms is not automatic in CGCAM, but is activated by the user inputs i_bak_flux=1 and i_hydrostat=1. It should be noted that the background treatment discussed here is not necessary for a purely Cartesian mesh, where the vertical hydrostatic balance is satisfied numerically, and symmetry nulls errors when computing flux and pressure differences in the horizontal directions.