a comparison of some shallow water test cases in homme using numerically and analytically computed...

16
A COMPARISON OF SOME SHALLOW WATER TEST CASES IN HOMME USING NUMERICALLY AND ANALYTICALLY COMPUTED TRANSFORMATIONS Numerical Approximations of Coordinate Transformations Dan Whitt Summer 2009 SIParCS Internship National Center for Atmospheric Research Mentor: Amik St-Cyr

Upload: roger-porter

Post on 20-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A COMPARISON OF SOME SHALLOW WATER TEST CASES IN HOMME USING NUMERICALLY AND ANALYTICALLY COMPUTED TRANSFORMATIONS Numerical Approximations of Coordinate

A COMPARISON OF SOME SHALLOW WATER TEST CASES IN HOMME USING NUMERICALLY AND

ANALYTICALLY COMPUTED TRANSFORMATIONS

Numerical Approximations of Coordinate

Transformations

Dan WhittSummer 2009 SIParCS InternshipNational Center for Atmospheric ResearchMentor: Amik St-Cyr

Page 2: A COMPARISON OF SOME SHALLOW WATER TEST CASES IN HOMME USING NUMERICALLY AND ANALYTICALLY COMPUTED TRANSFORMATIONS Numerical Approximations of Coordinate

HOMME – Cubed Sphere Geometry

Image 1 available at: http://141.104.22.210/Div/Winchester/jhhs/math/probweek/p2004/a022304.htmlImage 2 available at: http://www.csc.cs.colorado.edu/resources/research_images/homme/cubed_sphere.jpg

Page 3: A COMPARISON OF SOME SHALLOW WATER TEST CASES IN HOMME USING NUMERICALLY AND ANALYTICALLY COMPUTED TRANSFORMATIONS Numerical Approximations of Coordinate

These pictures are from Ram Nair’s website.

A Central Gnomonic Projection from the cube to the surface of the sphere.

Page 4: A COMPARISON OF SOME SHALLOW WATER TEST CASES IN HOMME USING NUMERICALLY AND ANALYTICALLY COMPUTED TRANSFORMATIONS Numerical Approximations of Coordinate

Curvilinear Coordinates

Physical Domain: S2, the sphere, broken up into 6 equivalent regions.

Computational Domains: 6 copies of [-1,1] x [-1,1] in R2. (one for each region in the physical domain)

Objects of Interest: Scalar and vector fields on S2. Current Physical Basis: the local λ and θ basis vectors, which

represent orthogonal unit vectors in the longitude and latitude direction respectively. E.g.: v = v1λ + v2θ

Alternative Physical Basis: the global X, Y, Z, Cartesian basis. E.g. v = v1X + v2Y +v3Z

Computational Basis: usual x,y Cartesian basis in R2.

Page 5: A COMPARISON OF SOME SHALLOW WATER TEST CASES IN HOMME USING NUMERICALLY AND ANALYTICALLY COMPUTED TRANSFORMATIONS Numerical Approximations of Coordinate

Transforming from the Sphere to the Cube

The projection of the local latitude/longitude coordinate system is non-orthogonal. Hence, the projected vector admits covariant and contravariant representations.

(And vice versa)

Figure available at: http://www.cgd.ucar.edu/research/abstracts/images/2007/gnomonic.jpg

Page 6: A COMPARISON OF SOME SHALLOW WATER TEST CASES IN HOMME USING NUMERICALLY AND ANALYTICALLY COMPUTED TRANSFORMATIONS Numerical Approximations of Coordinate

Contra-variant components

Covariant components

Contra-variant basis vectors

Covariant basis vectors

The vector X

22

112

21

1 eXeXeXeXX

Contravariant and Covariant Vector Representations

Page 7: A COMPARISON OF SOME SHALLOW WATER TEST CASES IN HOMME USING NUMERICALLY AND ANALYTICALLY COMPUTED TRANSFORMATIONS Numerical Approximations of Coordinate

Defining the Transformation

Use local transformation matrices, D, D-1, and covariant and contra-variant metric tensors, gjk, gjk.

Page 8: A COMPARISON OF SOME SHALLOW WATER TEST CASES IN HOMME USING NUMERICALLY AND ANALYTICALLY COMPUTED TRANSFORMATIONS Numerical Approximations of Coordinate

More Precisely…

nkji

gg

DDg

v

v

u

uD

xx

xxD

ki

jkij

Tjk

,...,1,,

coscos

2

1

21

21

- D transforms contra- variant components on the cube face to the physical domain on the sphere.

- The covariant metric tensor is the inverse of the contra-variant metric tensor.

y

Z

x

Zy

Y

x

Yy

X

x

X

D D3OR

Z

Y

X

D

v

v

v

u

uD

2

1

3OR

Two Observations:

Definition of D, the coordinate transformation matrix:

Page 9: A COMPARISON OF SOME SHALLOW WATER TEST CASES IN HOMME USING NUMERICALLY AND ANALYTICALLY COMPUTED TRANSFORMATIONS Numerical Approximations of Coordinate

Current HOMME Procedure

We analytically differentiate the transformation and use those formulas to obtain the transformation terms at each point on the mesh.

Easy to do, but one cannot have a mesh point on the pole.

Page 10: A COMPARISON OF SOME SHALLOW WATER TEST CASES IN HOMME USING NUMERICALLY AND ANALYTICALLY COMPUTED TRANSFORMATIONS Numerical Approximations of Coordinate

Problem

The Discrete Formulation of the Metric Identities is satisfied if and only if the interpolant (IN) of the metric terms is divergence free.

If we do not satisfy the metric identities, we introduce errors.

2,10)(2

1

nGeI

mm

mn

N

Page 11: A COMPARISON OF SOME SHALLOW WATER TEST CASES IN HOMME USING NUMERICALLY AND ANALYTICALLY COMPUTED TRANSFORMATIONS Numerical Approximations of Coordinate

Conservation and Metric Identities

If we initialize HOMME with a steady state problem, like SWTC2, a steady-state flow over the globe, we expect to find that the solution remains constant in time.

Since the flux is constant in space, its divergence must be zero, and the solution must remain constant.

This is the concept of “free-stream preservation” in CFD, which requires that a uniform flow remain uniform in time.

(Why we care)

Page 12: A COMPARISON OF SOME SHALLOW WATER TEST CASES IN HOMME USING NUMERICALLY AND ANALYTICALLY COMPUTED TRANSFORMATIONS Numerical Approximations of Coordinate

How do we fix this? Find a useful Theorem.

The discrete metric identities will be satisfied if we approximate the coordinate transformation terms to the same order N as we approximate the solution.

See: Kopriva, D.A. Metric Identities and the Discontinuous Spectral Element Method. Journal Sci. Comput. Vol. 26. No. 3. March 2006.

Page 13: A COMPARISON OF SOME SHALLOW WATER TEST CASES IN HOMME USING NUMERICALLY AND ANALYTICALLY COMPUTED TRANSFORMATIONS Numerical Approximations of Coordinate

Numerical Approximation

We approximate the coordinate transformation using the same order finite difference operator we use to obtain the solution.

Page 14: A COMPARISON OF SOME SHALLOW WATER TEST CASES IN HOMME USING NUMERICALLY AND ANALYTICALLY COMPUTED TRANSFORMATIONS Numerical Approximations of Coordinate

How we do that?

1. Partition the computational domain. Let the set N of points be the GLL quadrature nodes on the set [-1,1].

2. Take the interpolation projections of the transformation functions X(ξ,η), Y(ξ,η), and Z(ξ,η), where the {πi(ξ)}i=1,…,N are the basis of orthogonal polynomials. e.g.:

3. Differentiate to obtain the approximate values at the nodes by applying the following differentiation matrix:

(A 3D-Cartesian example)

NN ,...,1

)()(),()),((0 0

j

N

i

N

jiji

N XXI

otherwise

jiNN

jiNN

jiL

L

d

dD

jijN

iN

jjiN

i

0

14

1

04

11,,

Page 15: A COMPARISON OF SOME SHALLOW WATER TEST CASES IN HOMME USING NUMERICALLY AND ANALYTICALLY COMPUTED TRANSFORMATIONS Numerical Approximations of Coordinate

My Work

We numerically compute all the coordinate transformation terms and compare results with original HOMME runs to see the effects.

Utilizing 3D-Cartesian space also allows us to run HOMME with any number of elements, eliminating the problem of having a point on the pole.

Page 16: A COMPARISON OF SOME SHALLOW WATER TEST CASES IN HOMME USING NUMERICALLY AND ANALYTICALLY COMPUTED TRANSFORMATIONS Numerical Approximations of Coordinate

Not Finished Yet