190 likes | 446 Views
Number of grid points per wavelength. u_t + u_x = 0 u(x, 0) = sin (Lπx) 0<x<1. Method1: Upwind(1st order) Method2: Lax-Wendroff(2nd order) Method3: Traditional 4th order Method4: Compact schemes (4th order). Upwind L=2. h error grid points per wavelength
E N D
u_t + u_x = 0 • u(x, 0) = sin (Lπx) • 0<x<1
Method1: Upwind(1st order) • Method2: Lax-Wendroff(2nd order) • Method3: Traditional 4th order • Method4: Compact schemes (4th order)
Upwind L=2 • h error grid points per wavelength • 1/40 0.9484 40 • 1/80 0.7725 80 • 1/160 0.5230 160 • 1/320 0.3093 320 • 1/640 0.1689 640 • 1/1280 0.0884 1280 • 1/2560 0.0452 2560
Upwind L=4 • h error grid points per wavelength • 1/80 0.9973 40 • 1/160 0.9483 80 • 1/320 0.7725 160 • 1/640 0.5230 320 • 1/1280 0.3093 640 • 1/2560 0.1689 1280 • 1/3000 0.1461 1500
Lax-Wendroff • L h error grid points per wavelength • 2 1/120 0.0241 120 • 4 1/340 0.0240 170 • 8 1/960 0.0241 240 • 16 1/2720 0.0240 340
Traditional 4th order • L h error grid points per wavelength • 2 1/30 0.0050 30 • 4 1/70 0.0054 35 • 8 1/170 0.0050 42.5 • 16 1/400 0.0052 50
Compact schemes • L h error grid points per wavelength • 2 1/30 0.0017 30 • 4 1/70 0.0018 35 • 8 1/170 0.0017 42.5 • 16 1/400 0.0017 50
High Order Schemes for Resolving Waves: Number of Points per Wavelength
First derivative • f(x)=sin(kx) • TEk=c*(Δx)^(p-1)*k^p • p is the order of numerical scheme • TEk= c*(1/N)^(p-1)*k^p , Δx=1/N • If k changes to m, and we want TE to be unchanged . • TEk=TEm • (1/N)^(p-1)*k^p= (1/a*N)^(p-1)*m^p, • a=(m/k)^(p/(p-1)).
a=(m/k)^(p/(p-1)). • If p>>0, then a~m/k. So, if m=2k, then the number of grid points is also doubled since a~2. But if p is small, say p=2,then when m=2k, the number of grid points should be multiplied by 4 to insure that TE is unchanged.
Higher derivative • (1/N)^(p-q)*k^p=(1/a*N)^(p-q)*m^p, • a=(m/k)^(p/(p-q)).
1 st order scheme • Scheme N error IC • UW 32 0.19 sin(x) • UW 128 0.19 sin(2x) • L-F 32 0.43 sin(x) • L-F 128 0.43 sin(2x) • a=2^2=4
2 nd order scheme • Scheme N error IC • FD2 32 0.028 sin(x) • FD2 91 0.028 sin(2x) • L-W 32 0.021 sin(x) • L-W 91 0.021 sin(2x) • a=2^(3/2)=2.83
4 th order scheme • Scheme N error IC • FD4 32 0.000223 sin(x) • FD4 75 0.000236 sin(2x) • FDC4 32 0.0000404 sin(x) • FDC4 75 0.0000427 sin(2x) • a=2^(5/4)=2.34
6 th order, a=2^(7/6)=2.24 • 8 th order, a=2^(9/8)=2.18
Upwind: L changes from 2 to 4, under the same error, • 1/h multiplied by 4. • grid points per wavelength multiplied by 2. • L-W: L=2, 4, 8, 16, under the same error. • 1/h multiplied by 2.83 • grid points per wavelength multiplied by 1.42
Traditional 4th order • L=2, 4, 8, 16, under the same error. • 1/h multiplied by 2.37 • grid points per wavelength multiplied by 1.19 • Compact schemes • L=2, 4, 8, 16, under the same error. • 1/h multiplied by 2.37 • grid points per wavelength multiplied by 1.19