Differential Geometry#
Problem Statement#
When working with Spectral Element Methods, we are able to handle complex geometry through the use of an unstructured mesh. Additionally, each element in the mesh is allowed to have curved sides. To make this possible, we define a mapping from physical space to a reference "computational" element. The mapping is then approximated by an interpolant whose knots coincide with those used to represent the solution; this is called an isoparameteric mapping.
In SELF, all of the elements are tensor-product element; in 1-D we work with line segments, in 2-D we have quadrilaterals, and in 3-D we have hexahedra. The reference space is then
where
Recall that we are interested in approximating solutions to the conservation law
The problem we have is that we want to compute the divergence of the conservative flux in physical space, but we only know the coordinate transformation and how to estimate derivatives in computational space. For example, consider calculating
The problem here is that we know how to compute
These notes explain how we can calculate derivative operators in physical space given that we have the ability to calculate derivatives in computational space and that we know the coordinate transformation from computational to physical space.
Div, Grad, and Curl in mapped coordinates#
In this section, we derive formulas for computing derivatives, divergence, gradient, and curl under coordinate transformations. We then use the formulas to develop algorithms for implementing spectral element methods under coordinate transformations.
We begin with the premise that we have a logically hexahedral space. The physical positions in this space is represented by a vector with three components
We assume that the physical positions can be calculated in terms of “computational” positions,
When working in mapped coordinates, we want to understand how to calculate divergence, gradient, and curl of scalar and vector quantities. We are usually given a coordinate transformation
As an example, to calculate the derivative of a function
From the above equation, you can show that the divergence of a vector is
where
Similarly, the gradient of a scalar function is
and the curl of a vector is
The vectors are called the contravariant basis vectors and are usually denoted
The problem with these formulations is that we usually know the transformation from computational space to physical space (
Let's first see how we can construct measures of length area and volume. We know that we can relate a small change in
The vectors
The quantities
A small unit area can be calculated by taking the cross product of two units of length.
A differential volume element is calculated by projecting a differential area in the direction of
The quantity
Let’s now look at how to calculate the divergence. The divergence is defined as
The integral on the right hand side is a boundary integral over the faces of the volume element
With
Upon taking the limit as the volume shrinks to zero, we have
Now, we know that the divergence of a constant vector is equal to zero. This implies that
In order for the divergence of a constant vector to be valid for any arbitrary constant, it must be that
This equation is known as the metric identities. Using the metric identities allows us to write the divergence as
In comparison with our original formulations for the divergence, we can now relate the contravariant basis vectors to the covariant basis vectors
Similar to the definition of the covariant metric tensor, the contravariant metric tensor is define as
With this, we can now define the divergence, gradient, and curl under a coordinate transformation.
Operator | Conservative Form | Non-Conservative Form |
---|---|---|
Divergence | ||
Gradient | ||
Curl |
Free Stream Preservation#
Free stream preservation is a property of a numerical method that refers to the ability of the method to satisfy the metric identities.
With collocation style spectral element methods, we approximate the Jacobian-weighted contravariant basis vectors as a polynomial of degree
Kopriva (2006) demonstrated the generation of spurious sound waves in an Euler equations solver when the metric identities are not satisfied discretely. Further, he showed that we can use alternate formulations for the contravariant basis vectors that eliminate the aliasing error through basic vector calculus identities.
First, recall that we can write
These relations follow from the product rule and the fact that the curl of a gradient is identically zero. From this identity, we can write
Note that
Further, the contravariant basis vectors can be written
If we let
For example, when
and when
By comparison, we can see that
Through basic vector calculus, we've shown that we can write the Jacobian weighted contravariant basis vectors as either
or
Both formulations are guaranteed to be Divergence free and are known as the "conservative forms". The "curl invariant" form is obtained by averaging the two, to get
When calculating the metric terms in a numerical method, we opt to use the curl form of the metric terms, since we can guarantee that the metric terms will be satisfied.