Numerical Modelling in Geosciencesgeo.geoscienze.unipd.it/sites/default/files/Lecture9.pdf ·...

18
Numerical Modelling in Geosciences Lecture 9 Discretization of momentum and continuity equations

Transcript of Numerical Modelling in Geosciencesgeo.geoscienze.unipd.it/sites/default/files/Lecture9.pdf ·...

Page 1: Numerical Modelling in Geosciencesgeo.geoscienze.unipd.it/sites/default/files/Lecture9.pdf · Numerical Modelling in Geosciences Lecture 9 Discretization of momentum and continuity

Numerical Modelling in Geosciences

Lecture 9 Discretization of momentum

and continuity equations

Page 2: Numerical Modelling in Geosciencesgeo.geoscienze.unipd.it/sites/default/files/Lecture9.pdf · Numerical Modelling in Geosciences Lecture 9 Discretization of momentum and continuity

Discretization of momentum + continuity equations in 2D

Continuity : ∂vx∂x

+∂vy∂y

= 0

X − Stokes : ∂σ xx

∂x+∂σ xy

∂y−∂P∂x

= −ρgx

Y − Stokes : ∂σ yx

∂x+∂σ yy

∂y−∂P∂y

= −ρgy

Page 3: Numerical Modelling in Geosciencesgeo.geoscienze.unipd.it/sites/default/files/Lecture9.pdf · Numerical Modelling in Geosciences Lecture 9 Discretization of momentum and continuity

1)  Define an Eulerian grid of nodal points

2)  Assign input field variables to the nodes

3)  Apply PDEs and boundary conditions to each nodal point

4)  Solve the system of equations to get output field variables

How to apply finite differences

Page 4: Numerical Modelling in Geosciencesgeo.geoscienze.unipd.it/sites/default/files/Lecture9.pdf · Numerical Modelling in Geosciences Lecture 9 Discretization of momentum and continuity

Non-staggered grid ρ,ηeff,P,Vx,Vy

x

y

1) Define an Eulerian grid of nodal point

Page 5: Numerical Modelling in Geosciencesgeo.geoscienze.unipd.it/sites/default/files/Lecture9.pdf · Numerical Modelling in Geosciences Lecture 9 Discretization of momentum and continuity

Staggered grid P

ρ,ηeff

Vy

Vx

x

y

ghost nodes

basic nodes

additional nodes

Page 6: Numerical Modelling in Geosciencesgeo.geoscienze.unipd.it/sites/default/files/Lecture9.pdf · Numerical Modelling in Geosciences Lecture 9 Discretization of momentum and continuity

# equations = # grid points * # of unknown field variables = 90 2D global indexing:

gi = i + Ni *(j-1) gip = gi*3 - 2 gix = gi*3 - 1 giy = gi*3

Indexing

Page 7: Numerical Modelling in Geosciencesgeo.geoscienze.unipd.it/sites/default/files/Lecture9.pdf · Numerical Modelling in Geosciences Lecture 9 Discretization of momentum and continuity

In the case of Stokes equation: we need to define as initial input density at each node. We assume gravity components and viscosity as constant values for all nodes.

2) Assign input field variables to the nodes

∂vx∂x

+∂vy∂y

= 0

∂σ xx

∂x+∂σ xy

∂y−∂P∂x

= −ρgx

∂σ yx

∂x+∂σ yy

∂y−∂P∂y

= −ρgyρ1=2000 kg/m3

η1=1020 ρ1=3000 kg/m3 η2=1020

Initial setup (21x31) nodes

W = 1000 km

H =

150

0 km

Page 8: Numerical Modelling in Geosciencesgeo.geoscienze.unipd.it/sites/default/files/Lecture9.pdf · Numerical Modelling in Geosciences Lecture 9 Discretization of momentum and continuity

The continuity equation is formulated in the additional nodes at the centre of the cell where Pressure is obtained. Coefficients in L matrix must be scaled by 2*η/(Δx+Δy)

3) Apply PDEs to internal nodes: continuity equation

∂vx∂x

+∂vy∂y

= 0

Page 9: Numerical Modelling in Geosciencesgeo.geoscienze.unipd.it/sites/default/files/Lecture9.pdf · Numerical Modelling in Geosciences Lecture 9 Discretization of momentum and continuity

The X-Stokes equation is formulated in the additional nodes halfway two basic nodes along the y direction where Vx is obtained. Pressure coefficients in L matrix must be scaled by 2*η/(Δx+Δy)

3) Apply PDEs to internal nodes: X-Stokes

∂σ xx

∂x+∂σ xy

∂y−∂P∂x

= −ρgx

Page 10: Numerical Modelling in Geosciencesgeo.geoscienze.unipd.it/sites/default/files/Lecture9.pdf · Numerical Modelling in Geosciences Lecture 9 Discretization of momentum and continuity

The Y-Stokes equation is formulated in the additional nodes halfway two basic nodes along the x direction where Vy is obtained. Pressure coefficients in L matrix must be scaled by 2*η/(Δx+Δy)

3) Apply PDEs to internal nodes: Y-Stokes

∂σ yx

∂x+∂σ yy

∂y−∂P∂y

= −ρgy

Page 11: Numerical Modelling in Geosciencesgeo.geoscienze.unipd.it/sites/default/files/Lecture9.pdf · Numerical Modelling in Geosciences Lecture 9 Discretization of momentum and continuity

3) Apply PDEs to internal nodes: geometric indexing

Page 12: Numerical Modelling in Geosciencesgeo.geoscienze.unipd.it/sites/default/files/Lecture9.pdf · Numerical Modelling in Geosciences Lecture 9 Discretization of momentum and continuity

Boundary conditions

Dirichlet BC: specify the value of the solution on the boundary nodes Example: Neumann BC: specify the value of the derivative of the solution on the boundary nodes Example:

Very important in finite difference method: For each output (unknown) field variable (e.g., P, T, vx, vy, etc.), we must assign a Dirichlet BC to at least 1 node. This is required in order to compute finite differences from an initial value.

∂Φ∂x

≈ΔΦΔx

= 4.2⇒Φ1 =Φ2 − 4.2 ⋅ Δx

Φ2

Δx

x

∂Φ∂x

#

$%

&

'(

x1 x2

Φ1

Φ1 = 0

Page 13: Numerical Modelling in Geosciencesgeo.geoscienze.unipd.it/sites/default/files/Lecture9.pdf · Numerical Modelling in Geosciences Lecture 9 Discretization of momentum and continuity

Boundary conditions

Left and right coefficients of all BC must be scaled by 4*η/(Δx+Δy)2

Set BC at ghost nodes (P = 0, Vx = 0, Vy = 0)

Page 14: Numerical Modelling in Geosciencesgeo.geoscienze.unipd.it/sites/default/files/Lecture9.pdf · Numerical Modelling in Geosciences Lecture 9 Discretization of momentum and continuity

Boundary conditions

Left and right coefficients of all BC must be scaled by 4*η/(Δx+Δy)2

Vx and Vy: 1)  free slip 2)  no slip 3)  moving boundary

Page 15: Numerical Modelling in Geosciencesgeo.geoscienze.unipd.it/sites/default/files/Lecture9.pdf · Numerical Modelling in Geosciences Lecture 9 Discretization of momentum and continuity

How Pressure is obtained from continuity eq.? Important: global index of pressure must be always bigger than those of surrounding vx and vy nodes

If the order is inverted (i.e., the global index of pressure is higher), we cannot solve for

pressure

Page 16: Numerical Modelling in Geosciencesgeo.geoscienze.unipd.it/sites/default/files/Lecture9.pdf · Numerical Modelling in Geosciences Lecture 9 Discretization of momentum and continuity

Boundary conditions

Left and right coefficients of all BC must be scaled by 4*η/(Δx+Δy)2

Pressure: continuity eq. for pressure in a given cell is processed after processing all Stokes eqs. for all surrounding vx and vy nodes. Hence, pressure in the 4 cornerns of the grid cannot be computed since these nodes are surrounded by vx and vy nodes were Stokes eq. (that contains pressure) has not been formulated, but only BC. horizontal symmetry condition at the 4 corners (dP/dx =0) + 1 additional node with Dirichlet BC

Page 17: Numerical Modelling in Geosciencesgeo.geoscienze.unipd.it/sites/default/files/Lecture9.pdf · Numerical Modelling in Geosciences Lecture 9 Discretization of momentum and continuity

Left matrix for 6 x 5 grid Continuity eqs. do not contain coefficient in the diagonal, because P is not defined

Page 18: Numerical Modelling in Geosciencesgeo.geoscienze.unipd.it/sites/default/files/Lecture9.pdf · Numerical Modelling in Geosciences Lecture 9 Discretization of momentum and continuity

Homework

Read chapter 7 of textbook: Gerya, T. Introduction to numerical geodynamic modelling. Cambridge University Press, 345 pp. (2010)