Skip to content

Commit 9a813fd

Browse files
committed
minor
1 parent a18729e commit 9a813fd

File tree

1 file changed

+85
-0
lines changed

1 file changed

+85
-0
lines changed

source/3_numerical.rst

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,95 @@ The continuous velocity field is reconstructed by trilinear interpolation of the
174174
175175
**Tricubic**
176176

177+
178+
177179
**Hermite**
178180

179181
The ``hermite``
180182

183+
**WENO**
184+
185+
The weighted essentially non-oscillatory ``WENO`` used here is a fifth-order WENO reconstruction (WENO-5). It is suggested to be used in research with intermittent capture need, e.g., high-speed flows and shock capture.
186+
It shows relatively poor performance in general cases, and comsuming more wall time. The process is given as follows.
187+
188+
**Fifth-Order WENO Reconstruction (WENO-5)**
189+
190+
The WENO-5 method reconstructs a non-oscillatory, fifth-order-accurate approximation of a function value at an arbitrary location :math:`x = x_{i+1/2} + t\,\Delta x`, where :math:`t \in [0,1)` and :math:`x_{i+1/2} = x_i + \tfrac{1}{2}\,\Delta x` on a uniform grid with :math:`\Delta x = 1`. A five-point stencil ``{f_{i-2}, f_{i-1}, f_i, f_{i+1}, f_{i+2}}`` is used.
191+
192+
.. math::
193+
194+
\{\,f_{i-2}, f_{i-1}, f_{i}, f_{i+1}, f_{i+2}\}.
195+
196+
Define three overlapping three-point stencils:
197+
198+
.. math::
199+
200+
S_{0} = \{f_{i-2}, f_{i-1}, f_{i}\}, \quad
201+
S_{1} = \{f_{i-1}, f_{i}, f_{i+1}\}, \quad
202+
S_{2} = \{f_{i}, f_{i+1}, f_{i+2}\}.
203+
204+
On each stencil :math:`S_{\ell}` (:math:`\ell = 0,1,2`), construct a quadratic polynomial
205+
206+
.. math::
207+
208+
p_{\ell}(t) = C_{\ell,0} + C_{\ell,1}\,t + C_{\ell,2}\,t^{2}, \quad \ell = 0,1,2,
209+
210+
that interpolates the three values in that stencil at :math:`x = x_{i+1/2} + t\,\Delta x`.
211+
212+
The coefficients are chosen so that each :math:`p_{\ell}(t)` matches :math:`f` at the three stencil points. For
213+
:math:`S_{0} = \{f_{i-2}, f_{i-1}, f_{i}\}`:
214+
215+
.. math::
216+
217+
C_{0,0} = \frac{2\,f_{i-2} - 7\,f_{i-1} + 11\,f_{i}}{6},\\
218+
C_{0,1} = \frac{-f_{i-2} + 5\,f_{i-1} - 4\,f_{i} + f_{i+1}}{2},\\
219+
C_{0,2} = \frac{f_{i-2} - 2\,f_{i-1} + f_{i}}{2}.
220+
221+
For :math:`S_{1} = \{f_{i-1}, f_{i}, f_{i+1}\}`:
222+
223+
.. math::
224+
225+
C_{1,0} = \frac{-f_{i-1} + 5\,f_{i} + 2\,f_{i+1}}{6},\\
226+
C_{1,1} = \frac{f_{i-1} - f_{i+1}}{2},\\
227+
C_{1,2} = \frac{f_{i-1} - 2\,f_{i} + f_{i+1}}{2}.
228+
229+
For :math:`S_{2} = \{f_{i}, f_{i+1}, f_{i+2}\}`:
230+
231+
.. math::
232+
233+
C_{2,0} = \frac{2\,f_{i} + 5\,f_{i+1} - f_{i+2}}{6},\\
234+
C_{2,1} = \frac{-f_{i} + 4\,f_{i+1} - 3\,f_{i+2}}{2},\\
235+
C_{2,2} = \frac{f_{i} - 2\,f_{i+1} + f_{i+2}}{2}.
236+
237+
Once :math:`p_{0}(t)`, :math:`p_{1}(t)`, and :math:`p_{2}(t)` are defined, compute the Jiang–Shu smoothness indicators :math:`\beta_{\ell}` for each stencil:
238+
239+
.. math::
240+
241+
\beta_{0} = 13\,\bigl(f_{i-2} - 2\,f_{i-1} + f_{i}\bigr)^{2} + 3\,\bigl(f_{i-2} - 4\,f_{i-1} + 3\,f_{i}\bigr)^{2},\\
242+
\beta_{1} = 13\,\bigl(f_{i-1} - 2\,f_{i} + f_{i+1}\bigr)^{2} + 3\,\bigl(f_{i-1} - f_{i+1}\bigr)^{2},\\
243+
\beta_{2} = 13\,\bigl(f_{i} - 2\,f_{i+1} + f_{i+2}\bigr)^{2} + 3\,\bigl(3\,f_{i} - 4\,f_{i+1} + f_{i+2}\bigr)^{2}.
244+
245+
Fixed linear weights are :math:`(d_{0}, d_{1}, d_{2}) = (0.1,\,0.6,\,0.3)`. Introduce :math:`\varepsilon = 10^{-6}` and define unnormalized weights:
246+
247+
.. math::
248+
249+
\tilde{\alpha}_{\ell} = \frac{d_{\ell}}{(\varepsilon + \beta_{\ell})^{2}}, \quad \ell = 0,1,2.
250+
251+
Normalize to obtain nonlinear weights :math:`\omega_{\ell}`:
252+
253+
.. math::
254+
255+
\omega_{\ell} = \frac{\tilde{\alpha}_{\ell}}{\tilde{\alpha}_{0} + \tilde{\alpha}_{1} + \tilde{\alpha}_{2}}, \quad \sum_{\ell=0}^{2} \omega_{\ell} = 1.
256+
257+
Finally, reconstruct at :math:`x = x_{i+1/2} + t\,\Delta x` by combining:
258+
259+
.. math::
260+
261+
f_{\mathrm{WENO5}}(x_{i+1/2} + t\,\Delta x) = \omega_{0}\,p_{0}(t) + \omega_{1}\,p_{1}(t) + \omega_{2}\,p_{2}(t).
262+
263+
The code computes :math:`t^{2}`, forms coefficients :math:`C_{\ell,k}`, evaluates :math:`p_{\ell}(t)`, computes :math:`\beta_{\ell}`, then :math:`\tilde{\alpha}_{\ell}`, :math:`\omega_{\ell}`, and returns :math:`\omega_{0}\,p_{0} + \omega_{1}\,p_{1} + \omega_{2}\,p_{2}` exactly as above.
264+
265+
181266

182267
.. _wall:
183268

0 commit comments

Comments
 (0)