Post · 3 min read· pp. 114–115

3.19 Calculated derivatives

3.19 Calculated derivatives

The introduction to matrix construction, Sec. 3.5, described implicit and explicit discretisation of terms in an equation. It concluded that the principal derivatives of eqn that can be treated implicitly — forming matrix coefficients in eqn — are a time derivative, advection and Laplacian.

Terms with other derivatives must be calculated from respective fields, e.g. eqn from current values of eqn. In Sec. 3.15, we have described discretisation of a gradient, which is always explicit. This section gathers together the other derivatives found in equations for fluid dynamics and associated models.

General divergence term

A general divergence term is any term that can be represented by eqn. It excludes the Laplacian term which includes a gradient eqn, and advection which includes eqn.

PICT\relax \special {t4ht=

The discretisation of a general divergence term is an explicit calculation using current values of eqn. It is based on a surface integral using the divergence definition in Sec. 2.23 as shown below:

Z -1-- 1-X r = liVm!0 V S(dS ) ! V Sf f: f \relax \special {t4ht=(3.30)

The face value eqn is generally interpolated from cell values using the linear scheme. Terms discretised using this scheme include eqn in Eq. (2.45), a divergence of stress eqn, etc.

Curl of a vector

The curl derivative eqn is calculated from the gradient eqn and applying the Hodge dual operator given by Eq. (2.40) using the following relation:

r u = 2 (skw ru) : \relax \special {t4ht=(3.31)

In other words, eqn is discretised according to a scheme from Sec. 3.15, from which eqn is calculated by Eq. (3.31).

Mag-square grad-grad

A derivative which appears in some model equations is eqn, described as “mag-square grad-grad”. This derivative returns a scalar since the mag-square, e.g. eqn, represents the inner product of eqn with itself, as shown in Eq. (2.7).

The mag-square calculation always uses the appropriate inner product to reduce the result to a scalar. For a tensor eqn, it is the double inner product, i.e. eqn.

The grad-grad operator eqn yields a third-rank tensor in the case that eqn is a vector field. To avoid storing third-rank tensors, the mag-square grad-grad operator is evaluated by summing the result from the operator on each component eqn of eqn by

N X 1 jrr ij2 ; i=0 \relax \special {t4ht=(3.32)

where eqn is the number of components in eqn.