• 沒有找到結果。

Mapped grid methods

N/A
N/A
Protected

Academic year: 2022

Share "Mapped grid methods"

Copied!
49
0
0

加載中.... (立即查看全文)

全文

(1)

Wave propagation methods for hyperbolic problems on mapped

grids

Keh-Ming Shyue

Department of Mathematics National Taiwan University

Taiwan

(2)

Outline

Review a high-resolution wave propagation method for solving hyperbolic problems on mapped grids (which is basic integration scheme implemented in CLAWPACK) Describe an interpolation-type adaptive moving mesh approach that is an easy generalization of the above method for improving numerical resolution

Show sample results

(3)

Mapped grid methods

To begin with, we consider system of conservation laws

tq + ∇ · f (q) = 0 (1) with suitable initial condition for q in Nd ≥ 1 spatial domain Here q ∈ lRm denotes vector of m conserved quantities, f = (f1, f2, . . . , fNd) ∈ lRm×Nd denotes flux matrix; fj ∈ lRm It is known integral form of (1) over any control volume C is

d dt

Z

C

q dx = − Z

∂C

f(q) · n ds,

where n is outward-pointing normal vector at boundary ∂C

(4)

Mapped grid methods

Using above integral conservation law, a finite volume method on a control volume C can be written as

Qn+1 = Qn − ∆t M(C)

Ns

X

j=1

hjj,

where M(C) is measure (area in 2D or volume in 3D) of C, Ns is number of sides,

hj is length of j-th side (in 2D) or area of cell edge (in 3D) measured in physical space,

j is numerical approximation to normal flux in average across j-th side of grid cell

(5)

Mapped grid methods

In the following we assume that our mapped grids are logically rectangular, & will restrict our consideration to two-dimensional case Nd = 2 as illustrated below

i − 1 i − 1

i

i j

j

j + 1 j + 1

Cˆij Cij

ξ1 ξ2

mapping

∆ξ1

∆ξ2

computational grid physical grid

←−

x1 = x11, ξ2) x2 = x21, ξ2) x1

x2

Then on a curvilinear grid, a finite volume method takes

∆t   ∆t  

(6)

Mapped grid methods

On a curvilinear grid, a finite volume method takes Qn+1ij = Qnij− ∆t

κij∆ξ1

Fi+1 1

2,j − Fi−1 1 2,j

− ∆t κij∆ξ2

Fi,j+2 1 2

− Fi,j−2 1 2



where ∆ξ1, ∆ξ2 denote equidistant discretization of computational domain,

κij = M(Cij)/∆ξ1∆ξ2 is area ratio between area of grid cell in physical space & area of a computational grid,

Fi−1 1

2,j = γi−1

2,ji−1

2,j, Fi,j−2 1

2

= γi,j−1

2

i,j−1

2 are fluxes per unit length in computational space with γi−1

2,j = hi−1

2,j/∆ξ1 &

γi,j−1

2 = hi,j−1

2 /∆ξ2 representing length ratios

(7)

Mapped grid methods

In this setup, first order wave propagation method is a Godunov-type finite volume method that takes form

Qn+1ij = Qnij ∆t κij∆ξ1

A+1 ∆Qi−1

2,j + A1 ∆Qi+1

2,j



∆t κij∆ξ2

A+2 ∆Qi,j−1

2 + A2 ∆Qi,j+1

2



with right-, left-, up-, and down-moving fluctuations

A+1 ∆Qi−1

2,j, A1 ∆Qi+1

2,j, A+2 ∆Qi,j−1

2, & A2 ∆Qi,j+1

2 that are entering into grid cell

To determine these fluctuations, we need to solve

one-dimensional Riemann problems normal to cell edges

(8)

Computing fluctuations

Let ni−1

2,j = (n1, n2) & ti−1

2,j = (t1, t2) be normalized normal and tangential vectors to cell edge (i − 12, j) between cells (i − 1, j) & (i, j). Then rotation matrix which rotates velocity components (e.g., for shallow water or acoustic equations) has form

Ri−1

2,j =

1 0 0

0 n1 n2 0 t1 t2

Fluctuations A±1 ∆Qi−1

2,j can be calculated by steps:

1. Determine Q˘L & Q˘R by rotating velocity components,

Q˘L = Ri−1

2,jQi−1,j, Q˘R = Ri−1

2,jQi,j

(9)

Computing fluctuations

2. Solve Riemann problem for 1D conservation law

tq + ∇ · f1 = 0

with initial data

q(ξ1, 0) =

Q˘L if x < xi−1

2

Q˘R if x > xi−1

2

This results in waves W˘i−1,k1

2,j that are moving with speeds

λ˘1,ki−1

2,j, k = 1, . . . , Nw, Nw is the number of waves. Here jumps are decomposed into waves as Q˘R − ˘QL = PNw

k=1 W˘i−1,k1

2,j

& solution at cell edge can be expressed

X

(10)

Computing fluctuations

3. Define scaled speeds

λ1,ki−1

2,j = γi−1

2,jλ˘1,ki−1

2,j

and rotate waves back to Cartesian coordinates by

Wi−1,k1

2,j = RTi−1

2,jW˘i−1,k1

2,j, k = 1, . . . , Nw

4. Determine left- and right-moving fluctuations in the form

A±1 ∆Qi−1

2,j =

Nw

X

k=1

λ1,ki−1

2,j

±

Wi−1,k1

2,j

5. In an analogous way up and down-moving fluctuations at cell edge (i, j − 12) can be calculated

(11)

High resolution corrections

The speeds and limited versions of waves are used to

calculate second order correction terms. These terms are added to the method in flux difference form as

Qn+1ij := Qn+1ij 1 κij

∆t

∆ξ1

Fei+1 1

2,j − eFi−1 1 2,j

 1 κij

∆t

∆ξ2

Fei,j+2 1

2 − eFi,j−2 1 2



For example, at cell edge (i − 12, j) correction flux takes

Fei−1 1

2,j = 1 2

Nw

X

k=1

λ1,ki−1

2,j

1 − ∆t κi−1

2,j∆ξ1

λ1,ki−1

2,j

!

Wfi−1,k1

2,j

where κi−1

2,j = (κi−1,j + κij)/2. To aviod oscillations near discontinuities, a wave limiter is applied leading to limited

f

(12)

High resolution corrections

To ensure second order accuracy & also improve stability, a transverse wave propagation is included in the algorithm

that left- & right-going fluctuations A±1 ∆Qi−1

2,j are each split into two transverse fluctuations: up- & down-going

A±2 A+1 ∆Qi−1

2,j & A±2 A1 ∆Qi−1

2,j

This wave propagation method can be shown to be conservative & stable under a variant of CFL

(Courant-Friedrichs-Lewy) condition of form

ν = ∆t max

i,j,k

λ1,ki−1

2,j

Jip,j∆ξ1 ,

λ2,ki,j−1

2

Ji,jp∆ξ2

 ≤ 1,

where ip = i if λ1i−,k1

2,j > 0 & i − 1 if λ1i−,k1

2,j < 0

(13)

Accuracy test in 2D

Consider 2D compressible Euler equations with ideal gas law as governing equations

Take smooth vortex flow with initial condition

ρ =



1 − 25(γ − 1)

8γπ2 exp (1 − r2)

1/(γ−1)

, p = ργ,

u1 = 1 − 5

exp ((1 − r2)/2) (x2 − 5) , u2 = 1 + 5

exp ((1 − r2)/2) (x1 − 5) ,

& periodic boundary conditions as an example, where r = p

(x1 − 5)2 + (x2 − 5)2

(14)

Accuracy test in 2D

Grids used for this smooth vortex flow test

0 5 10

0 2 4 6 8 10

0 5 10

0 2 4 6 8 10

0 5 10

0 2 4 6 8

Grid 1 Grid 2 10 Grid 3

kEzk1,∞ = kzcomput − zexactk1,∞ denotes discrete 1- or maximum-norm error for state variable z

Results shown below are at time t = 10 on N × N mesh

(15)

Accuracy results in 2D: Grid 1

N E1(ρ) Order E1(u1) Order E1(u2) Order E1(p) Order

40 0.6673 2.3443 1.7121 0.8143

80 0.1792 1.90 0.6194 1.92 0.4378 1.97 0.2128 1.94 160 0.0451 1.99 0.1537 2.01 0.1104 1.99 0.0536 1.99 320 0.0113 2.00 0.0384 2.00 0.0276 2.00 0.0134 2.00

N E(ρ) Order E(u1) Order E(u2) Order E(p) Order

40 0.1373 0.3929 0.1810 0.1742

80 0.0377 1.87 0.1014 1.95 0.0502 1.85 0.0482 1.85 160 0.0093 2.02 0.0248 2.03 0.0123 2.03 0.0119 2.02 320 0.0022 2.07 0.0062 2.00 0.0030 2.04 0.0029 2.04

(16)

Accuracy results in 2D: Grid 2

N E1(ρ) Order E1(u1) Order E1(u2) Order E1(p) Order

40 0.9298 2.6248 2.1119 1.2104

80 0.2643 1.81 0.7258 1.85 0.5296 2.00 0.3277 1.89 160 0.0674 1.97 0.1833 1.99 0.1309 2.02 0.0845 1.96 320 0.0169 2.00 0.0458 2.00 0.0327 2.00 0.0212 1.99

N E(ρ) Order E(u1) Order E(u2) Order E(p) Order

40 0.1676 0.4112 0.2259 0.2111

80 0.0471 1.83 0.1242 1.73 0.0645 1.79 0.0586 1.85 160 0.0126 1.91 0.0333 1.90 0.0162 2.02 0.0149 1.97 320 0.0033 1.93 0.0085 1.97 0.0040 2.00 0.0038 1.98

(17)

Accuracy results in 2D: Grid 3

N E1(ρ) Order E1(u1) Order E1(u2) Order E1(p) Order

40 4.8272 4.7734 5.3367 5.4717

80 1.5740 1.62 1.5633 1.61 1.5660 1.77 1.5634 1.81 160 0.4536 1.79 0.4559 1.78 0.4537 1.79 0.4560 1.78 320 0.1215 1.90 0.1221 1.90 0.1222 1.89 0.1221 1.90

N E(ρ) Order E(u1) Order E(u2) Order E(p) Order

40 0.4481 0.4475 0.4765 0.4817

80 0.1170 1.94 0.1181 1.92 0.1196 1.99 0.1191 2.02 160 0.0434 1.43 0.0431 1.45 0.0442 1.43 0.0440 1.44 320 0.0117 1.89 0.0119 1.86 0.0119 1.89 0.0118 1.89

(18)

Accuracy test in 3D

Consider 3D compressible Euler equations with ideal gas law as governing equations

Take smooth radially-symmetric flow with the flow condition that is at rest initially with density

ρ(r) = 1 + exp(−30(r − 1)2)/10 & pressure p(r) = ργ Grids used for smooth radially-symmetric flow test

1 1 2

2 0 1 2

1 1 2

2 0 1 2

1 1 2

2 0 1 2

Grid 1 Grid 2 Grid 3

(19)

Accuracy results in 3D: Grid 1

N E1(ρ) Order E1(|~u|) Order E1(p) Order 20 7.227 · 103 8.920 · 103 1.019 · 102

40 2.418 · 103 1.58 2.558 · 103 1.80 3.415 · 103 1.58 80 6.356 · 104 1.93 6.754 · 104 1.92 8.980 · 104 1.93 160 1.616 · 104 1.98 1.718 · 104 1.97 2.282 · 104 1.98

N E(ρ) Order E(|~u|) Order E(p) Order 20 1.096 · 102 1.200 · 102 1.569 · 102

40 4.085 · 103 1.42 4.381 · 103 1.45 5.848 · 103 1.42 80 1.235 · 103 1.73 1.263 · 103 1.79 1.765 · 103 1.73 160 3.517 · 104 1.81 3.349 · 104 1.91 5.030 · 104 1.81

(20)

Accuracy results in 3D: Grid 2

N E1(ρ) Order E1(|~u|) Order E1(p) Order 20 7.227 · 103 8.920 · 103 1.019 · 102

40 2.418 · 103 1.58 2.558 · 103 1.80 3.415 · 103 1.58 80 6.356 · 104 1.93 6.754 · 104 1.92 8.980 · 104 1.93 160 1.616 · 104 1.98 1.718 · 104 1.97 2.282 · 104 1.98

N E(ρ) Order E(|~u|) Order E(p) Order 20 7.227 · 103 8.920 · 103 1.019 · 102

40 2.418 · 103 1.58 2.558 · 103 1.80 3.415 · 103 1.58 80 6.356 · 104 1.93 6.754 · 104 1.92 8.980 · 104 1.93 160 1.616 · 104 1.98 1.718 · 104 1.97 2.282 · 104 1.98

(21)

Accuracy results in 3D: Grid 3

N E1(ρ) Order E1(|~u|) Order E1(p) Order 20 1.290 · 102 1.641 · 102 1.816 · 102

40 4.694 · 103 1.46 4.999 · 103 1.71 6.623 · 103 1.46 80 1.257 · 103 1.90 1.379 · 103 1.86 1.774 · 103 1.90 160 3.209 · 104 1.97 3.546 · 104 1.96 4.527 · 104 1.97

N E(ρ) Order E(|~u|) Order E(p) Order 20 1.632 · 102 1.984 · 102 2.316 · 102

40 5.819 · 103 1.49 6.745 · 103 1.56 8.307 · 103 1.48 80 1.823 · 103 1.67 4.290 · 103 0.65 2.710 · 103 1.67 160 5.053 · 104 1.85 3.271 · 103 0.39 7.237 · 104 1.85

(22)

Extension to moving mesh

One simple way to extend mapped grid method described above to solution adaptive moving grid method is to take approach proposed by

H. Tang & T. Tang, Adaptive mesh methods for one- and two-dimensional hyperbolic conservation laws, SIAM J.

Numer. Anal., 2003

In each time step, this moving mesh method consists of three basic steps:

1. Mesh redistribution

2. Conservative interpolation of solution state 3. Solution update on a fixed mapped grid

(23)

Mesh redistribution scheme

Winslow’s approach (1981)

Solve ∇ · (D∇ξj) = 0, j = 1, . . . , Nd

for ξ(x). Coefficient D is a positive definite matrix which may depend on solution gradient

Variational approach (Tang & many others)

Solve ∇ξ · (D∇ξxj) = 0, j = 1, . . . , Nd for x(ξ) that minimizes the “energy” functional

E(x(ξ)) = 1 2

Z

Nd

X

j=1

Tξ D∇xj

Lagrangian (ALE)-type approach ( , CAVEAT code)

(24)

Mesh redistribution

Dashed lines represent initial mesh & solid lines represent new mesh after a redistribution step

0 0.5 1 1.5 2 2.5 3 3.5 4

0 0.5 1 1.5 2 2.5 3 3.5 4

(25)

Conservative interpolation

Numerical solutions need to be updated conservatively, i.e.

XM Ck+1

Qk+1 = X

M Ck Qk

after each mesh redistribution iterate k. This can be done Finite-volume approach (Tang & Tang, SIAM 03)

M Ck+1

Qk+1 = M Ck

Qk

Ns

X

j=1

hjG˘j, G = ( ˙x · n)Q˘

Geometric approach (Shyue 2010 & others)

"

X

S

M Cpk+1 ∩ Spk#

Qk+1C = X

S

M Cpk+1 ∩ Spk QkS

(26)

Conservative interpolation

Geometric way to perform conservative interpolation

0 0.5 1 1.5 2 2.5 3 3.5 4

0 0.5 1 1.5 2 2.5 3 3.5 4

(27)

Interpolation-free moving mesh

One way to dervise an interpolation-free moving mesh

method is to consider coordinate change of equations via (x, t) 7→ (ξ, t). In this case, the transformed conservation law reads

tq˜ + ∇ξ · ˜f = G (2) with

˜

q = Jq, J = det (∂ξ/∂x)1 f˜j = J (q ∂tξj + ∇ξj · f )

G = q [∂tJ + ∇ξ · (J∂tξj)] +

XN j=1

fjξ · J∂xjξk

= 0 (if GCL & SCL are satisfied)

We may then devise numerical method to solve (2) (Shyue:

(28)

2 D Riemann Problem

4-shock wave pattern initially

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

1



 ρ u1 u2

p



 =



 1.1

0 0 1.1









0.507 0.893

0 0.35









1.1 0.893 0.893

1.1









0.507 0 0.893

0.35





(29)

2 D Riemann Problem

Mesh redistribution scheme: variational approach Grid system

time=0.25

(30)

2 D Riemann Problem

Mesh redistribution scheme: variational approach Density contours

t=0.25

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

(31)

Sedov problem

Mesh redistribution scheme: Lagrangian approach 30 × 30 mesh grid

0.2 0.4 0.6 0.8 1 1.2

y

Grid system

1 2 3 4 5 6

Density

Lagrangian Eulerian

(32)

Sedov problem

Mesh redistribution scheme: variational approach

“Monitor” function D based on density gradient

0 0.2 0.4 0.6 0.8 1

0 0.2 0.4 0.6 0.8 1 1.2

y

Grid system

0 0.2 0.4 0.6 0.8 1

0 1 2 3 4 5 6

Density

Variational Eulerian

(33)

Shock waves over circular array

A Mach 1.42 shock wave in water over a circular array

t=0

shock

(34)

Shock waves over circular array

Grid system

−3 −2 −1 0 1 2 3 4 5

−4

−3

−2

−1 0 1 2 3 4

time=0

(35)

Shock waves over circular array

Contours for density

t=0.0024

(36)

Moving cylindrical vessel

Impose uniform flow velocity (u1, u2) = (−1, 0) (i.e., in the frame of vessel moving with speed one in x1-direction)

air helium interface

(37)

Moving cylindrical vessel

Solution at time t = 0.25

(38)

Moving cylindrical vessel

Solution at time t = 0.5

(39)

Moving cylindrical vessel

Solution at time t = 0.75

(40)

Moving cylindrical vessel

Solution at time t = 1

(41)

Cavitation test: 2D steady state

Uniform gas-liquid mixture with speed 600m /s over a circular region

(42)

Cavitation test: 2D steady state

Pseudo colors of volume fraction

Formation of cavitation zone (Onset–shock induced, diffusion, . . . ?)

(43)

Cavitation test: 2D steady state

Pseudo colors of pressure

Smooth transition across liquid-gas phase boundary

(44)

Cavitation test: 2D steady state

Pseudo colors of volume fraction: 2 circular case

Convergence of solution as the mesh is refined ?

t=0.05

(45)

Thank You

(46)

Compressible Multiphase Flow

Homogeneous equilibrium pressure & velocity across material interfaces

Volume-fraction based model equations (Shyue JCP

’98, Allaire et al. JCP ’02)

∂t iρi) + 1 J

Nd

X

j=1

∂ξj iρiUj) = 0, i = 1, 2, . . . , mf

∂t (ρui) + 1 J

Nd

X

j=1

∂ξj (ρuiUj + pJji) = 0, i = 1, 2, . . . , Nd,

∂E

∂t + 1 J

Nd

X

j=1

∂ξj (EUj + pUj) = 0,

∂αi

∂t + 1 J

Nd

XUj ∂αi

∂ξj = 0, i = 1, 2, . . . , mf − 1

(47)

Barotropic two-fluid flow

Two-phase flow model

t1ρ1) + ∇ · (α1ρ1u) = 0,

t2ρ2) + ∇ · (α2ρ2u) = 0,

t (ρu) + ∇ · (ρu ⊗ u + pδ) = 0 α1ρ1

ρ1(p) + α2ρ2

ρ2(p) = 1 (Iterative solve for p)

(48)

Barotropic two-fluid flow

A relaxation model of Saurel et al. (JCP ’090

∂t 1ρ1) +

XN j=1

∂xj 1ρ1uj) = 0,

∂t 2ρ2) +

XN j=1

∂xj 2ρ2uj) = 0,

∂t (ρui) +

XN j=1

∂xj (ρuiuj + pδij) = 0, i = 1, . . . , N

∂α1

∂t +

XN j=1

uj ∂α1

∂xj = 1

µ (p1 1) − p2 2))

Each phasic pressure pι is a function of density only Mixture pressure p satisfies p = α1p1 + α2p2, µparameter

(49)

Mixture speed of sound

Wood formula (stiffness in c¯ vs. α)

1

ρ¯c2 = α ρwc2w

+ 1 − α ρgc2g

ρw = 103kg/m3, cw = 1449.4m/s, ρg = 1.0kg/m3, cg = 374.2m/s

500 1000 1500

¯c

參考文獻

相關文件

Describe finite-volume method for solving proposed model numerically on fixed mapped (body-fitted) grids Discuss adaptive moving mesh approach for efficient improvement of

The existence of transmission eigenvalues is closely related to the validity of some reconstruction methods for the inverse scattering problems in an inhomogeneous medium such as

 The TRG consists of two components: a basic component which is an annual recurrent cash grant provided to schools for the appointment of supply teachers to cover approved

where L is lower triangular and U is upper triangular, then the operation counts can be reduced to O(2n 2 )!.. The results are shown in the following table... 113) in

Abstract In this paper, we consider the smoothing Newton method for solving a type of absolute value equations associated with second order cone (SOCAVE for short), which.. 1

Since the subsequent steps of Gaussian elimination mimic the first, except for being applied to submatrices of smaller size, it suffices to conclude that Gaussian elimination

Since the subsequent steps of Gaussian elimination mimic the first, except for being applied to submatrices of smaller size, it suffices to conclude that Gaussian elimination

Methods involving finite differences for solving boundary-value problems replace each of the derivatives in the differential equation by an appropriate