问题陈述
是否有可能实现Lax-Wendroff 方案的二阶收敛 (OOC),用于 求解具有不连续初始数据的非粘性 Burgers 方程?如果不是,那么如何在拟线性问题中实现二阶 OOC?
Wolfram Mathematica 代码
(*Initial data*)
u0[x_] := 1 - UnitStep[x - 0.1];
Flux[u_] := 0.5 u^2;
u = u0[xTbl];
dt = Abs[\[Sigma]] /Abs[Max[u]] dx;
un = 0*u;
F = Flux[u];
(*LW*)
t = 0;
While[t < tFin,
(*Main loop*)
un[[2 ;; nx - 1]] = u[[2 ;; nx - 1]] -
0.50 \[Sigma] (F[[3 ;; nx]] - F[[1 ;; nx - 2]]) +
0.25 \[Sigma]^2 ((u[[3 ;; nx]] + u[[2 ;; nx - 1]]) (F[[3 ;; nx]] -
F[[2 ;; nx - 1]]) - (u[[2 ;; nx - 1]] +
u[[1 ;; nx - 2]]) (F[[2 ;; nx - 1]] - F[[1 ;; nx - 2]]));
(*BC*)
un[[1]] = u[[1]];
un[[nx]] = u[[nx]];
(*Update*)
u = un;
F = Flux[u];
nstep = nstep + 1;
t = t + dt
];
输出
nx = {50, 100, 200, 400, 800};
L1err = {0.0217352, 0.0107321, 0.00533915, 0.00207726, 0.00132978};
p = {1.0181, 1.00725, 1.36192, 0.643502}
平均OOC等于
1.00769