Skip to content

Commit e65c013

Browse files
committed
Update 3_numerical.rst
1 parent 290b913 commit e65c013

File tree

1 file changed

+76
-1
lines changed

1 file changed

+76
-1
lines changed

source/3_numerical.rst

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,82 @@ The continuous velocity field is reconstructed by trilinear interpolation of the
172172
173173
174174
175-
**Tricubic**
175+
**Tricubic Catmull-Rom**
176+
177+
The Tricubic Catmull-Rom interpolation ``tricubic`` used here is a separable three-dimensional cubic spline based on the one-dimensional Catmul-Rom spline (parameter ``a=-0.5``) for velocity fields, which ensures :math:`C^{1}` continuity.
178+
The process is given as follows.
179+
180+
The one-dimensional Catmull-Rom interpolation reconstructs a :math:`C^{1}`-continuous approximation of velocity at an arbitrary location :math:`x = i + t`, where :math:`t \in [0,1)` and :math:`i = \lfloor x\rfloor` on a uniform grid with :math:`\Delta x = 1`.
181+
A four-point stencil is used:
182+
183+
.. math::
184+
185+
\{\,u_{i-1},\,u_{i},\,u_{i+1},\,u_{i+2}\}.
186+
187+
Define coefficients for :math:`t \in [0,1)`:
188+
189+
.. math::
190+
191+
a_{0} &= -\tfrac{1}{2}\,u_{i-1} + \tfrac{3}{2}\,u_{i} - \tfrac{3}{2}\,u_{i+1} + \tfrac{1}{2}\,u_{i+2}, \\[6pt]
192+
a_{1} &= u_{i-1} - 2.5\,u_{i} + 2.0\,u_{i+1} - 0.5\,u_{i+2}, \\[6pt]
193+
a_{2} &= -0.5\,u_{i-1} + 0.5\,u_{i+1}, \\[6pt]
194+
a_{3} &= u_{i}.
195+
196+
The one-dimensional interpolant is:
197+
198+
.. math::
199+
200+
u_{\mathrm{CR}}(i + t)
201+
= ((a_{0}\,t + a_{1})\,t + a_{2})\,t + a_{3}.
202+
203+
For three-dimensional interpolation, let the target velocity location be
204+
205+
.. math::
206+
207+
(f_{x},\,f_{y},\,f_{z}),
208+
\quad
209+
i = \lfloor f_{x}\rfloor,\;
210+
j = \lfloor f_{y}\rfloor,\;
211+
k = \lfloor f_{z}\rfloor,
212+
\quad
213+
t_{x} = f_{x} - i,\;
214+
t_{y} = f_{y} - j,\;
215+
t_{z} = f_{z} - k.
216+
217+
At each :math:`z = k + \Delta` (where :math:`\Delta \in \{-1,0,1,2\}`), perform bicubic interpolation (first in ``x``, then in ``y``). For each :math:`y = j + \ell` (where :math:`\ell \in \{-1,0,1,2\}`), compute:
218+
219+
.. math::
220+
221+
M_{\,j+\ell}(k+\Delta)
222+
= \mathrm{CR}_{1}\bigl(
223+
u_{\,i-1,\,j+\ell,\,k+\Delta},\,
224+
u_{\,i,\,j+\ell,\,k+\Delta},\,
225+
u_{\,i+1,\,j+\ell,\,k+\Delta},\,
226+
u_{\,i+2,\,j+\ell,\,k+\Delta}
227+
;\,t_{x}\bigr).
228+
229+
Then combine along ``y``:
230+
231+
.. math::
232+
233+
B(k+\Delta)
234+
= \mathrm{CR}_{1}\bigl(
235+
M_{\,j-1}(k+\Delta),\,
236+
M_{\,j}(k+\Delta),\,
237+
M_{\,j+1}(k+\Delta),\,
238+
M_{\,j+2}(k+\Delta)
239+
;\,t_{y}\bigr).
240+
241+
Finally, interpolate along the third direction ``z``:
242+
243+
.. math::
244+
245+
u(f_{x},\,f_{y},\,f_{z})
246+
= \mathrm{CR}_{1}\bigl(
247+
B(k-1),\,B(k),\,B(k+1),\,B(k+2)
248+
;\,t_{z}\bigr).
249+
250+
Here :math:`\mathrm{CR}_{1}(⋯; t)` denotes the one-dimensional Catmull-Rom spline defined above.
176251

177252

178253

0 commit comments

Comments
 (0)