Meshfree methods for conservation laws using kinetic approach and - - PowerPoint PPT Presentation

meshfree methods for conservation laws using kinetic
SMART_READER_LITE
LIVE PREVIEW

Meshfree methods for conservation laws using kinetic approach and - - PowerPoint PPT Presentation

Meshfree methods for conservation laws using kinetic approach and alternate least squares procedures Praveen. C TIFR Center for Applicable Mathematics, Bangalore praveen@math.tifrbng.res.in Meshfree-2011 Conference Dept. of Aerospace Engg.


slide-1
SLIDE 1

Meshfree methods for conservation laws using kinetic approach and alternate least squares procedures

  • Praveen. C

TIFR Center for Applicable Mathematics, Bangalore praveen@math.tifrbng.res.in

Meshfree-2011 Conference

  • Dept. of Aerospace Engg.

Indian Institute of Science, Bangalore 10-11 January, 2011

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 1 / 62

slide-2
SLIDE 2

Outline

1 Kinetic meshless method for conservation laws 2 Comparison with other schemes 3 A positive meshless method 4 Alternate least squares 5 LS formula leading to positive method 6 Third order scheme for divergence operator

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 2 / 62

slide-3
SLIDE 3

Kinetic schemes

  • Exploit connection between Boltzmann and Euler/Navier-Stokes

equations ∂F ∂t + ⃗ v ⋅ ∇F = 0 ⇓ ∂U ∂t + div G = 0

  • Kinetic scheme

Upwind Moments Scheme Boltzmann Equation Discretized Boltzmann Equation Upwind Scheme for Conservation Law

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 3 / 62

slide-4
SLIDE 4

Kinetic Meshless Method

  • 2-D Boltzmann equation

∂F ∂t + vxFx + vyFy = 0

  • Point collocation approach
  • Least squares approximation at node ”0”

dF0 dt + vx∑

j

aj(Fj − F0) + vy∑

j

bj(Fj − F0) = 0 Leads to unstable scheme; no wave propagation effects

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 4 / 62

slide-5
SLIDE 5

Kinetic Meshless Method

  • Upwinding through introduction of a mid-point state (Morinishi,

Balakrishnan)

  • ✂✁
✁ ✄ ✄✂☎ ☎ ✆ ✆✂✝ ✝ ✞ ✞✂✟ ✟ ✠ ✠✂✡ ✡ ☛ ☛✂☞ ☞ ✌ ✌✂✍ ✍

P

  • Pj

s j nj

j/2

F

  • Kinetic upwind approximation

Fj/2 = { F0 if ⃗ v ⋅ ˆ nj ≥ 0 Fj if ⃗ v ⋅ ˆ nj < 0

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 5 / 62

slide-6
SLIDE 6

Kinetic Meshless Method

  • LS using mid-point states

dF0 dt + vx ∑

j

aj(Fj/2 − F0) + vy ∑

j

bj(Fj/2 − F0) = 0

  • Semi-discrete scheme

dU0 dt + ∑[aj(GXj/2 − GX0) + bj(GYj/2 − GY0)] = 0

  • No stencil splitting, smaller stencil
  • Rotationally invariant
  • Nearly positive scheme - good stability properties
  • On Cartesian points, KMM reduces to finite volume method
  • Edge-based updating possible - speed up of 2
  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 6 / 62

slide-7
SLIDE 7

Kinetic Meshless Method

  • LS using mid-point states

dF0 dt + vx ∑

j

aj(Fj/2 − F0) + vy ∑

j

bj(Fj/2 − F0) = 0

  • Semi-discrete scheme

dU0 dt + ∑[aj(GXj/2 − GX0) + bj(GYj/2 − GY0)] = 0

  • No stencil splitting, smaller stencil
  • Rotationally invariant
  • Nearly positive scheme - good stability properties
  • On Cartesian points, KMM reduces to finite volume method
  • Edge-based updating possible - speed up of 2
  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 6 / 62

slide-8
SLIDE 8

Higher order scheme

  • Define left and right states at each mid-point using linear

reconstruction along the ray V +

j/2 = V0 + 1

2∆⃗ rj ⋅ ∇V0 and V −

j/2 = Vj − 1

2∆⃗ rj ⋅ ∇Vj

  • ✂✁
✁ ✄ ✄✂☎ ☎

V P P mid−point

j

  • +

V−

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 7 / 62

slide-9
SLIDE 9

Numerical order of accuracy

∂u ∂t + y∂u ∂x − x∂u ∂y = 0

u=0 u=u x y (1,0) (0,1)

  • (0,0)
  • utflow boundary
  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 8 / 62

slide-10
SLIDE 10

Numerical order of accuracy

Uniform and random point distributions

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 9 / 62

slide-11
SLIDE 11

Numerical order of accuracy

  • 2.8
  • 2.6
  • 2.4
  • 2.2
  • 2
  • 1.8
  • 1.6
  • 1.4
  • 1.2
  • 1
  • 2.1
  • 2
  • 1.9
  • 1.8
  • 1.7
  • 1.6
  • 1.5

log(Error) log(h) L1 L2 Linf Curve fit

  • 2.6
  • 2.4
  • 2.2
  • 2
  • 1.8
  • 1.6
  • 1.4
  • 1.2
  • 1
  • 2
  • 1.9
  • 1.8
  • 1.7
  • 1.6
  • 1.5

log(Error) log(h) L1 L2 Linf Curve fit

Point distribution L1 L2 L∞ Uniform 2.27 2.21 1.97 Random 2.19 2.12 1.90

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 10 / 62

slide-12
SLIDE 12

Flow over Williams airfoil

Free-stream Mach number = 0.15 Angle of attack = 0 Number of points = 6415 Points on main airfoil = 234 Points on flap = 117 n KMM q-LSKUM 3 0.19

  • 4

4.86 0.02 5 6.84 0.12 6 80.45 71.36 7 6.50 27.79 8 0.16 0.69 9

  • 0.02
  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 11 / 62

slide-13
SLIDE 13

William’s airfoil

Pressure coefficient

  • 2

2 4 6 8 10 0.2 0.4 0.6 0.8 1

  • Cp

x MAIN AIRFOIL q-LSKUM KMM EXACT

  • 1

1 2 3 4 5 6 0.95 1 1.05 1.1 1.15 1.2 1.25 1.3 1.35

  • Cp

x FLAP q-LSKUM KMM EXACT

Scheme Cl Cd Smin Smax q-LSKUM 3.0927 0.0197 −1.535 × 10−3 1.031 × 10−2 KMM 3.7608 0.0069 −4.99 × 10−4 7.246 × 10−3 Potential 3.736

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 12 / 62

slide-14
SLIDE 14

Flow over cylinder

M∞ = 0.38 and α = 0 No of points = 4111 Points on cylinder = 250 n 4 5 6 7 8 9 KMM 6.67 5.50 83.12 4.72

  • LSKUM
  • 0.19

82.56 16.78 0.44 0.02

q-LSKUM KMM q-LSKUM KMM

Pressure Mach

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 13 / 62

slide-15
SLIDE 15

Subsonic flow over cylinder

q-LSKUM entropy, min = -0.00634187, max = 0.0222672 KMM entropy, min = -0.00138786, max = 0.000165191

q-LSKUM KMM Scheme Cl Cd Smin Smax q-LSKUM 0.0237 0.0324

  • 0.00634

0.022267 KMM 0.0006 0.0012

  • 0.00138

0.000165

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 14 / 62

slide-16
SLIDE 16

Suddhoo-Hall airfoil

  • Number of points = 14091
  • On airfoils = 229, 196, 217, 157
  • Mach = 0.2 and α = 0

1 2 3 4 KMM 0.5387 4.8095 2.0925 0.7065 Exact 0.5215 4.7157 2.0794 0.7216 % Error 3.3 1.9 0.6

  • 2.0

Circulation around different elements

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 15 / 62

slide-17
SLIDE 17

Suddhoo-Hall airfoil

  • 2
  • 1

1 2 3 4 5

  • 3
  • 2
  • 1

1 2 3 4

  • Cp

x KMM Exact

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 16 / 62

slide-18
SLIDE 18

NACA-0012 airfoil

M∞ = 0.85,α = 1o Adapted points, 3777 Mach contours

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 17 / 62

slide-19
SLIDE 19

Scramjet Intake - initial solution

Inlet Mach number = 5

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 18 / 62

slide-20
SLIDE 20

Scramjet Intake - adapted solution

Inlet Mach number = 5

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 19 / 62

slide-21
SLIDE 21

Cartesian Points

NACA-0012 - coarse M∞ = 1.2, α = 0o

  • 2
  • 1.5
  • 1
  • 0.5

0.5 1 1.5 2

  • 1.5
  • 1
  • 0.5

0.5 1 1.5 2 2.5

Points Mach number (Mohan Varma)

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 20 / 62

slide-22
SLIDE 22

Cartesian Points

NACA-0012 - adapted M∞ = 1.2, α = 0o

  • 2
  • 1.5
  • 1
  • 0.5

0.5 1 1.5 2

  • 1.5
  • 1
  • 0.5

0.5 1 1.5 2 2.5

Points Mach number (Mohan Varma)

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 21 / 62

slide-23
SLIDE 23

Finite Point Method

Morinishi, Lohner, etc.

Conservation law ∂u ∂t + ∂f ∂x + ∂g ∂y = 0 Meshless finite difference using mid-point fluxes dui dt + ∑

j

αij(fij − fi) + ∑

j

βij(gij − gi) = 0 Define vector ℓij = (αij,βij) dui dt + ∑

j

[(αijfij + βijgij) ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ

flux along ℓij

−(αijfi + βijgi)] = 0 Use your favourite numerical flux function (Roe, KFVS, etc.) H αijfij + βijgij = H(ui,uj;ℓij) What is the direction of ℓij ?

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 22 / 62

slide-24
SLIDE 24

A positive meshless method

FM Report 2004-FM-16

Semi-discrete scheme dui dt = ∑

j

cij(uj − ui) if cij ≥ 0 then maxima do not increase and minima do not decrease. Under a CFL-condition this leads to a positive update scheme un+1

i

= ∑

j

kijun

j ,

kij ≥ 0 (1) is stable in maximum norm min

j

un

j ≤ un+1 i

≤ max

j

un

j

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 23 / 62

slide-25
SLIDE 25

Conservation law

∂u ∂t + div ⃗ Q(u) = 0, ⃗ Q(u) = ⃗ au, ⃗ a = (ax,ay) Least squares approximation of derivatives ∂u ∂x∣

i

= ∑

j∈Ci

αij(uj − ui), ∂u ∂y ∣

i

= ∑

j∈Ci

βij(uj − ui) Central difference scheme div ⃗ Q(u)i = ax ∑

j

αij(uj − ui) + ay ∑

j

βij(uj − ui) is unstable since it does not account for wave propagation effects.

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 24 / 62

slide-26
SLIDE 26

Upwind scheme I

j u

  • uij

i u

div ⃗ Q(u)i = 2ax ∑

j

αij(uij − ui) + 2ay ∑

j

βij(uij − ui) Now let θij be the angle between

NiNj and the positive x-axis, ˆ nij = (cosθij, sinθij) be the unit vector along

NiNj and

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 25 / 62

slide-27
SLIDE 27

Upwind scheme II

ˆ sij = (−sinθij,cosθij) be the unit vector normal to ˆ nij so that (ˆ nij, ˆ sij) form a right-handed coordinate system. The wave vector ⃗ a can be written in terms of this coordinate system after a rotational transformation ax = (⃗ a ⋅ ˆ nij)cosθij − (⃗ a ⋅ ˆ sij)sinθij ay = (⃗ a ⋅ ˆ nij)sinθij + (⃗ a ⋅ ˆ sij)cosθij After some rearrangement we obtain div ⃗ Q(u)i = 2∑

j

{¯ αij(⃗ a ⋅ ˆ nij)(uij − ui) + ¯ βij(⃗ a ⋅ ˆ sij)(uij − ui)} (2) where we have defined [ ¯ αij ¯ βij ] = [ cosθij sinθij −sinθij cosθij ][ αij βij ] (3)

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 26 / 62

slide-28
SLIDE 28

Upwind scheme III

Flux along ˆ nij (⃗ a ⋅ ˆ nij)uij = ⃗ a ⋅ ˆ nij + ∣⃗ a ⋅ ˆ nij∣ 2 ui + ⃗ a ⋅ ˆ nij − ∣⃗ a ⋅ ˆ nij∣ 2 uj (4) The semi-discrete scheme can be written as dui dt = −2 ∑

j∈Ci

{¯ αij(⃗ a ⋅ ˆ nij)− + ¯ βij(⃗ a ⋅ ˆ sij)(uij − ui) (uj − ui) }(uj − ui) (5) We can show that ¯ αij > 0 Flux along ˆ sij (⃗ a ⋅ ˆ sij)uij = (⃗ a ⋅ ˆ sij)ui + uj 2 − λij(uj − ui) (6) where λij is a dissipation coefficient which has to be determined.

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 27 / 62

slide-29
SLIDE 29

Upwind scheme IV

If we take λij = sign(¯ βij)∣⃗ a ⋅ ˆ sij∣ 2 (7) then the second term becomes ¯ βij(⃗ a ⋅ ˆ sij)(uij − ui) (uj − ui) = ¯ βij(⃗ a ⋅ ˆ sij) − ∣¯ βij(⃗ a ⋅ ˆ sij)∣ 2 ≤ 0 With the choice (6), (7) the semi-discrete scheme can be written as dui dt = ∑

j∈Ci

cij(uj − ui) (8) where the coefficients are given by cij = −¯ αij(⃗ a ⋅ ˆ nij)− − ¯ βij (⃗ a ⋅ ˆ sij 2 − λij) ≥ 0 (9)

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 28 / 62

slide-30
SLIDE 30

Extension to non-linear equations and systems I

Let the flux function ⃗ Q(u) = (F(u),G(u)) be nonlinear. Then the semi-discrete scheme can be written as dui dt = − ∑

j∈Ci

{αij(Fij − Fi) + βij(Gij − Gi)} (10) where the mid-point fluxes (Fij,Gij) are given by [ Fij Gij ] = R−1(θij)[ F(ui,uj, ˆ nij) G(ui,uj, ˆ sij) ] (11) The flux along ˆ nij is obtained by an upwind formula F(ui,uj, ˆ nij) = ⃗ Q(ui) + ⃗ Q(uj) 2 ⋅ ˆ nij − 1 2∣⃗ aij ⋅ ˆ nij∣(uj − ui) (12)

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 29 / 62

slide-31
SLIDE 31

Extension to non-linear equations and systems II

and ⃗ aij = ⎧ ⎪ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎪ ⎩

⃗ Q(uj)− ⃗ Q(ui) uj−ui

if uj ≠ ui

d du ⃗

Q(ui) if uj = ui (13) while the flux along ˆ sij is given by G(ui,uj, ˆ sij) = ⃗ Q(ui) + ⃗ Q(uj) 2 ⋅ ˆ sij − sign(¯ βij)∣⃗ aij ⋅ ˆ sij∣ 2 (uj − ui) (14)

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 30 / 62

slide-32
SLIDE 32

On the coefficients α,β I

In some special situations the connectivity is such that ∑

j∈Ci

∆x2

ij = ∑ j∈Ci

∆y2

ij,

j∈Ci

∆xij∆yij = 0 (15) then αij = ∆xij ∑k ∆x2

ik

, βij = ∆yij ∑k ∆y2

ik

αij βij = ∆xij ∆yij and the vector (αij,βij) is parallel to (∆xij,∆yij) so that ¯ βij = 0.

−0.6 −0.4 −0.2 0.2 0.4 0.6 −0.4 −0.3 −0.2 −0.1 0.1 0.2 0.3 0.4 0.5 x y −6 −4 −2 2 4 x 10

−3

−3 −2 −1 1 2 3 4 5 x 10

−3

x y −0.25 −0.2 −0.15 −0.1 −0.05 0.05 0.1 0.15 0.2 0.25 −0.2 0.2 x y −1.2 −1 −0.8 −0.6 −0.4 −0.2 0.2 0.4 0.6 −0.6 −0.4 −0.2 0.2 0.4 0.6 x y

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 31 / 62

slide-33
SLIDE 33

Higher order scheme

u+

ij = ui + 1

2∆⃗ rij ⋅ ∇ui, u−

ij = uj − 1

2∆⃗ rij ⋅ ∇uj (16) and calculate the mid-point fluxes as [ Fij Gij ] = R−1(θij)[ F(u+

ij,u− ij, ˆ

nij) G(u+

ij,u− ij, ˆ

sij) ] (17) u+

ij

= ui + si

4 [(1 − ksi)∆− ij + (1 + ksi)(uj − ui)]

u−

ij

= uj − sj

4 [(1 − ksj)∆+ ij + (1 + ksj)(uj − ui)]

(18) where ∆−

ij = 2∆⃗

rij ⋅ ∇ui − (uj − ui), ∆+

ij = 2∆⃗

rij ⋅ ∇uj − (uj − ui) (19) and si = max ⎡ ⎢ ⎢ ⎢ ⎣ 0, 2∆−

ij(uj − ui) + ǫ

(∆−

ij)2 + (uj − ui)2 + ǫ

⎤ ⎥ ⎥ ⎥ ⎦ sj = max ⎡ ⎢ ⎢ ⎢ ⎣ 0, 2∆+

ij(uj − ui) + ǫ

(∆+

ij)2 + (uj − ui)2 + ǫ

⎤ ⎥ ⎥ ⎥ ⎦

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 32 / 62

slide-34
SLIDE 34

Higher order scheme

u+

ij = ui + 1

2∆⃗ rij ⋅ ∇ui, u−

ij = uj − 1

2∆⃗ rij ⋅ ∇uj (16) and calculate the mid-point fluxes as [ Fij Gij ] = R−1(θij)[ F(u+

ij,u− ij, ˆ

nij) G(u+

ij,u− ij, ˆ

sij) ] (17) u+

ij

= ui + si

4 [(1 − ksi)∆− ij + (1 + ksi)(uj − ui)]

u−

ij

= uj − sj

4 [(1 − ksj)∆+ ij + (1 + ksj)(uj − ui)]

(18) where ∆−

ij = 2∆⃗

rij ⋅ ∇ui − (uj − ui), ∆+

ij = 2∆⃗

rij ⋅ ∇uj − (uj − ui) (19) and si = max ⎡ ⎢ ⎢ ⎢ ⎣ 0, 2∆−

ij(uj − ui) + ǫ

(∆−

ij)2 + (uj − ui)2 + ǫ

⎤ ⎥ ⎥ ⎥ ⎦ sj = max ⎡ ⎢ ⎢ ⎢ ⎣ 0, 2∆+

ij(uj − ui) + ǫ

(∆+

ij)2 + (uj − ui)2 + ǫ

⎤ ⎥ ⎥ ⎥ ⎦

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 32 / 62

slide-35
SLIDE 35

NACA 0012 Test case

  • 1
  • 0.5

0.5 1

  • 0.5

0.5 1 1.5

  • 1
  • 0.5

0.5 1

  • 0.5

0.5 1 1.5

Figure: Point distributions for NACA-0012 with 4733 (G1) and 4385 (G2) points

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 33 / 62

slide-36
SLIDE 36

Subsonic case M∞ = 0.63, α = 2 deg.

  • 1.5
  • 1
  • 0.5

0.5 1 1.5 0.2 0.4 0.6 0.8 1

  • Cp

x/c G1 G2 1e-08 1e-07 1e-06 1e-05 0.0001 0.001 0.01 0.1 1 10 100 200 300 400 500 600 700 800 Residue No if iterations G1 G2

Figure: Pressure coefficient and convergence history for subsonic flow over NACA-0012

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 34 / 62

slide-37
SLIDE 37

Transonic case M∞ = 0.80, α = 1.25 deg.

Pressure - G1 and G2 Mach number - G1 and G2

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 35 / 62

slide-38
SLIDE 38

Transonic case M∞ = 0.80, α = 1.25 deg.

G1 G2

  • 1.5
  • 1
  • 0.5

0.5 1 1.5 0.2 0.4 0.6 0.8 1

  • Cp

x/c

  • 1.5
  • 1
  • 0.5

0.5 1 1.5 0.2 0.4 0.6 0.8 1

  • Cp

x/c 1e-08 1e-07 1e-06 1e-05 0.0001 0.001 0.01 0.1 1 10 100 200 300 400 500 600 700 800 Residue No if iterations G1 G2

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 36 / 62

slide-39
SLIDE 39

Mach 3 flow over semi-cylinder

Pressure Mach Mach number (po1 − po2)/po1

−2 −1.5 −1 −0.5 0.5 1 1.5 2 2.5 3 3.5 −2 −1.5 −1 −0.5 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 37 / 62

slide-40
SLIDE 40

Alternate least squares: 1-D case I

FM Report 2004-FM-16

We start by assuming a formula of the form ∂u ∂x∣

i

= ∑

j∈Ci

αij(uj − ui) (20) and this is consistent to first order if ∑

j∈Ci

αij(xj − xi) = 1 (21) Undertermined case, solve a minimization problem: min 1 2 ∑

j∈Ci

α2

ij

wij , wrt {αij} (22)

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 38 / 62

slide-41
SLIDE 41

Alternate least squares: 1-D case II

FM Report 2004-FM-16

Unconstrained minimization: min 1 2 ∑

j∈Ci

α2

ij

wij + λ ⎡ ⎢ ⎢ ⎢ ⎢ ⎣ ∑

j∈Ci

αij(xj − xi) − 1 ⎤ ⎥ ⎥ ⎥ ⎥ ⎦ , wrt {αij},λ (23) leads to λ = − 1 ∑j∈Ci wij(xj − xi)2 , αij = wij(xj − xi) ∑k∈Ci wik(xk − xi)2 which is precisely the standard least squares formula for the derivative.

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 39 / 62

slide-42
SLIDE 42

Alternate LS: 2-D case

∂u ∂x∣

i

= ∑

j∈Ci

αij(uj − ui), ∂u ∂y ∣

i

= ∑

j∈Ci

βij(uj − ui) First order consistency conditions: ∑

j∈Ci

αij(xj − xi) = 1, ∑

j∈Ci

βij(yj − yi) = 1 ∑

j∈Ci

αij(yj − yi) = 0, ∑

j∈Ci

βij(xj − xi) = 0 Constrained minimization: min 1 2 ∑

j∈Ci

α2

ij + β2 ij

wij wrt {αij},{βij} leads to the usual formulae for derivatives. In this case {αij} and {βij} are decoupled.

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 40 / 62

slide-43
SLIDE 43

LS formulae leading to positive scheme

Conservation law ∂u ∂t + ⃗ a ⋅ ∇u = 0 Assume ∇ui = ∑

j∈Ci

cij(uj − ui)ˆ nij, cij ≥ 0 and ⃗ a ⋅ ∇ui = 2 ∑

j∈Ci

cij(⃗ a ⋅ ˆ nij)(uij − ui) Upwind flux (⃗ a ⋅ ˆ nij)uij = ⃗ a ⋅ ˆ nij + ∣⃗ a ⋅ ˆ nij∣ 2 ui + ⃗ a ⋅ ˆ nij − ∣⃗ a ⋅ ˆ nij∣ 2 uj Semi-discrete scheme dui dt = −2 ∑

j∈Ci

cij(⃗ a ⋅ ˆ nij)−(uj − ui) satisfies LED condition.

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 41 / 62

slide-44
SLIDE 44

LS approximation

min 1 2 ∑

j∈Ci

c2

ij

wij , wrt {cij}j∈Ci subject to first order consistency conditions ∑

j∈Ci

cij ∆x2

ij

∆rij = 1 ∑

j∈Ci

cij ∆y2

ij

∆rij = 1 ∑

j∈Ci

cij ∆xij∆yij ∆rij = and positivity conditions cij ≥ 0

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 42 / 62

slide-45
SLIDE 45

A second approach I

If ∑

j

wj∆xj∆yj = 0, ∑

j

wj(∆x2

j − ∆y2 j ) = 0

(24) Let wj = ωjwg(∆rj), and define pj = wg(∆rj)∆xj∆yj, qj = wg(∆rj)(∆x2

j − ∆y2 j )

Find ωj from min 1 2 ∑

j

(ωj − 1)2 + λ1 ∑

j

ωjpj + λ2 ∑

j

ωjqj wrt {ωj},λ1,λ2 (25) Optimality condition: [ I M M⊺ 0 ][ {ω} {λ} ] = [ 1 0 ]

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 43 / 62

slide-46
SLIDE 46

A second approach II

where I is an N × N identity matrix and M = [ p1 p2 ... pN q1 q2 ... qN ]

Solution: [ ∑p2

j

∑pjqj ∑pjqj ∑q2

j

][ λ1 λ2 ] = [ ∑pj ∑qj ] and ωj = 1 − λ1pj − λ2qj Does not in general guarantee that ωj ≥ 0. This can be achieved by numerically solving the constrained minimization problem, and enforcing the constraint ωj ≥ 0.

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 44 / 62

slide-47
SLIDE 47

A second approach III

Behaviour on Cartesian stencil:

  • 6

7 8 4 5 1 2 3

∆x/∆y 1,3,5,7 4,8 2,6 1 1 1 1 2 0.73529 0.55882 1.4412 10 0.51000 0.50010 1.4999 100 0.50010 0.50000 1.5000 1000 0.50000 0.50000 1.5000

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 45 / 62

slide-48
SLIDE 48

Other works using alternate LS

  • Positive, minimal stencil, meshfree discretization for Laplace
  • perator

▸ Seibold, 2008

  • Conservative meshless discretization for conservation laws

▸ Wang, Chiu, Jameson, Hu (2010)

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 46 / 62

slide-49
SLIDE 49

Third order least squares scheme I

Steady solution to a conservation law r = fx + gy = 0 Finite difference approximation for the residual r ˜ r = δxf + δyg (26) Motivated by residual-based scheme of Lerat and Corre. Try to develop such a scheme for arbitrary grids. To approximate the derivatives at node “0”, we choose a stencil of neighbouring points Pj, j = 1,...,N and write the approximations as δxf = ∑

j

aj(fj − f0), δyg = ∑

j

bj(gj − g0)

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 47 / 62

slide-50
SLIDE 50

Third order least squares scheme II

where the coefficients (aj,bj) have to be determined to satisfy some accuracy requirements. Expanding in Taylor’s series we have

j

aj(fj − f0) = fx ∑

j

aj∆xj + fy ∑

j

aj∆yj + fxx 1

2 ∑ j

aj∆x2

j + fxy ∑ j

aj∆xj∆yj + fyy 1

2 ∑ j

aj∆y2

j

+ fxxx 1 6 ∑

j

aj∆x3

j + fxxy 1 2 ∑ j

aj∆x2

j∆yj + fxyy 1 2 ∑ j

aj∆xj∆y2

j + fyyy 1

6 ∑

j

aj∆y3

j

+ O(h3)

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 48 / 62

slide-51
SLIDE 51

Third order least squares scheme III

and

j

bj(gj − g0) = gx ∑

j

bj∆xj + gy ∑

j

bj∆yj + gxx 1

2 ∑ j

bj∆x2

j + gxy ∑ j

bj∆xj∆yj + gyy 1

2 ∑ j

bj∆y2

j

+ gxxx 1 6 ∑

j

bj∆x3

j + gxxy 1 2 ∑ j

bj∆x2

j∆yj + gxyy 1 2 ∑ j

bj∆xj∆y2

j + gyyy 1

6 ∑

j

bj∆y3

j

+ O(h3)

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 49 / 62

slide-52
SLIDE 52

Third order least squares scheme IV

For first order accuracy, we require ∑

j

aj∆xj = 1 (fx) (27) ∑

j

aj∆yj = (fy) (28) ∑

j

bj∆xj = (gx) (29) ∑

j

bj∆yj = 1 (gy) (30) In order to maximise the accuracy of ˜ r we will next choose conditions

  • n (aj,bj) so that we can write the remaining truncation terms in

terms of derivatives of r.

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 50 / 62

slide-53
SLIDE 53

Third order least squares scheme V

For the second order terms, we will choose

1 2 ∑ j

aj∆x2

j − ∑ j

bj∆xj∆yj = (fxx,gxy) (31) ∑

j

aj∆xj∆yj − 1

2 ∑ j

bj∆y2

j

= (fxy,gyy) (32) ∑

j

aj∆y2

j

= (fyy) (33) ∑

j

bj∆x2

j

= (gxx) (34) For convenience, let us define the following lengths h1 = 1

2 ∑ j

aj∆x2

j

h2 = 1

2 ∑ j

bj∆y2

j

(35)

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 51 / 62

slide-54
SLIDE 54

Third order least squares scheme VI

Under the conditions (27)-(34), we get ˜ r = fx + gy + h1(fx + gy)x + h2(fx + gy)y + O(h2) = r + h1rx + h2ry + O(h2) = O(h2) which is second order accurate in general.

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 52 / 62

slide-55
SLIDE 55

Third order least squares scheme VII

To obtain a third order accurate approximation, we require the following additional conditions 1 6 ∑

j

aj∆x3

j − 1 2 ∑ j

bj∆x2

j∆yj

= (fxxx,gxxy) (36)

1 2 ∑ j

aj∆x2

j∆yj − 1 2 ∑ j

bj∆xj∆y2

j

= (fxxy,gxyy) (37)

1 2 ∑ j

aj∆xj∆y2

j − 1

6 ∑

j

bj∆y3

j

= (fxyy,gyyy) (38) ∑

j

aj∆y3

j

= (fyyy) (39) ∑

j

bj∆x3

j

= (gxxx) (40) We define the following quantities h11 = 1 6 ∑

j

aj∆x3

j,

h12 = 1

2 ∑ j

aj∆x2

j∆yj,

h22 = 1 6 ∑

j

bj∆y3

j

(41)

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 53 / 62

slide-56
SLIDE 56

Third order least squares scheme VIII

Under the conditions (27)-(34), (36)-(40) the approximation becomes ˜ r = r + h1rx + h2ry + h11(fx + gy)xx + h12(fx + gy)xy + h22(fx + gy)yy +O(h3) = r + h1rx + h2ry + h11rxx + h12rxy + h22ryy + O(h3) = O(h3) There are 2N coefficients (aj,bj), j = 1,...,N to be determined. Let us set c = [a1,...,aN,b1,...,bN]⊺ (42) Then the constraints on the coefficients can be written in matrix form Ac = d (43) For the second order approximation, we have 8 constraints and hence we need N ≥ 4 while for the third order approximation we have 13

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 54 / 62

slide-57
SLIDE 57

Third order least squares scheme IX

constraints which requires N ≥ 7. When the number of coefficients is more than the number of constraints, then we determine the coefficients from the following minimization problem min

(aj,bj) 1 2 ∑ j

a2

j + b2 j

w2

j

such that Ac = b (44) where the weights wj are taken to be wj = 1 (∆x2

j + ∆y2 j )p/2 ,

p = 0 or 1 (45) The function to be minimised is convex and we have linear constraints; hence the problem is convex. If a solution exists, then it is unique. This problem has a solution if there is atleast one vector c which satisfies the constraints.

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 55 / 62

slide-58
SLIDE 58

Third order least squares scheme X

Under what geometrical conditions of the stencil, the above problem is solvable ? In the numerical examples, we choose a 9 point stencil (N = 8) on Cartesian-type grids for which we are able to solve the minimization problem to determine the coefficients (aj,bj) for both the second order and third order schemes.

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 56 / 62

slide-59
SLIDE 59

Third order least squares scheme XI

Numerical order of accuracy We apply the finite difference scheme to an analytical divergence-free field in the unit square [0,1] × [0,1] f(x,y) = −cos(2πx)sin(2πy), g(x,y) = sin(2πx)cos(2πy) which is divergence-free fx + gy = 0

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 57 / 62

slide-60
SLIDE 60

Third order least squares scheme XII

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Figure: Grid of size 41 × 41 perturbed randomly

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 58 / 62

slide-61
SLIDE 61

Third order least squares scheme XIII

−2.6 −2.5 −2.4 −2.3 −2.2 −2.1 −2 −1.9 −1.8 −1.7 −1.6 −6 −5.5 −5 −4.5 −4 −3.5 −3 −2.5 log(h) log(error) Slope=1.94 Slope=2.97 Second order Third order

Figure: Convergence of error in divergence

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 59 / 62

slide-62
SLIDE 62

Third order least squares scheme XIV

Application to conservation laws The approximation of the divergence derived here cannot be used to solve convection dominated problems like hyperbolic conservation laws. It is necessary to add some dissipation to stabilize the numerical

  • scheme. Lerat and Corre suggest using a dissipation that depends on

the residual; hence they solve wt + fx + gy = δx 2 (Φ1r)x + δy 2 (Φ2r)y (46) where Φ1,Φ2 = O(1). At steady state, the residual vanishes and the dissipation is of much lower order. The Φ1,Φ2 are chosen so that the above equation is dissipative. We have to construct an approximation to the above modified equation of the form dw dt + δxf + δyg = δx 2 ∆x(Φ1¯ r) + δy 2 ∆y(Φ2¯ r) (47)

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 60 / 62

slide-63
SLIDE 63

Third order least squares scheme XV

  • For second order accuracy, we require ¯

r = O(h)

  • For third order accuracy we need ¯

r = O(h2)

  • The operators ∆x,∆y can be first order accurate.
  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 61 / 62

slide-64
SLIDE 64

Thank You

  • Praveen. C

(TIFR-CAM) Meshfree methods Meshfree-2011 62 / 62