Lax-Wendroff Method | Lax-Wendroff方法


  • CORE 网格教授 OpenFOAM教授 管理员

    Lax-Wendroff方法为一个求解对流方程的数值方法,具有二阶精度。Lax-Wendroff方法相比迎风格式求解的结果耗散性要小得多,但可能会引起数值震荡以及相偏移。考虑1D传输方程
    \begin{equation}\label{phi}
    \frac{\p \phi(x,t)}{\p t}+u\frac{\p \phi(x,t)}{\p x}=0
    \end{equation}
    其中$\phi$表示待求的变量。Lax-Wendroff方法定义下一个时间步骤的$\phi$值计算如下
    \begin{equation}
    \phi_i^{n+1}=\phi_i^{n}+\frac{\Delta t}{2\Delta x}u\left(\phi_{i+1}^n-\phi_{i-1}^n\right)+\frac{1}{2}\left(\frac{\Delta t}{\Delta x}\right)^2u^2\left(\phi_{i-1}^n-2\phi_i^n+\phi_{i+a}^n\right)
    \end{equation}
    Lax-Wendroff方法可这样证明:对$\phi(x,t)$进行泰勒展开:
    \begin{equation}\label{phiT}
    \phi(x,t^{n+1})=\phi(x,t^{n})+\Delta t\frac{\p \phi(x,t^{n})}{\p t}+\frac{1}{2}\Delta t^2\frac{\p^2 \phi(x,t^{n})}{\p t^2}
    \end{equation}
    对方程\eqref{phi}对$t$做导数有:
    \begin{equation}\label{phi2}
    \frac{\p^2 \phi(x,t)}{\p t^2}=-u\frac{\p^2 \phi(x,t)}{\p x\p t}
    \end{equation}
    对$x$做导数有:
    \begin{equation}\label{phi3}
    \frac{\p^2 \phi(x,t)}{\p t\p x}=-u\frac{\p^2 \phi(x,t)}{\p x^2}
    \end{equation}
    将方程\eqref{phi3}和\eqref{phi2}代入到\eqref{phiT}有
    \begin{equation}\label{phiT2}
    \phi(x,t^{n+1})=\phi(x,t^{n})-\Delta t u\frac{\p \phi(x,t^{n})}{\p x}+\frac{1}{2}\Delta t^2u^2\frac{\p^2 \phi(x,t^{n})}{\p x^2}
    \end{equation}
    将方程\eqref{phiT2}在$i$网格点进行离散有:
    \begin{equation}
    \phi_i^{n+1}=\phi_i^{n}+\frac{\Delta t}{2\Delta x}u\left(\phi_{i+1}^n-\phi_{i-1}^n\right)+\frac{1}{2}\left(\frac{\Delta t}{\Delta x}\right)^2u^2\left(\phi_{i-1}^n-2\phi_i^n+\phi_{i+a}^n\right)
    \end{equation}
    即为Lax-Wendroff方法