2626 increases toward :math:`M+1`.
2727
28283. **Differentiated constraint** :math:`B\mathbf{u}' = q'(t)`: replaces the
29- algebraic constraint with its time derivative. Converts the DAE to an
30- equivalent index-0 ODE system, allowing RADAU to achieve the full
31- collocation order :math:`2M-1` for **both** velocity and pressure.
29+ algebraic constraint with its time derivative, raising the stage pressure
30+ accuracy by one order from :math:`\mathcal{O}(\Delta t^M)` to
31+ :math:`\mathcal{O}(\Delta t^{M+1})`. The endpoint error in the
32+ **U-formulation** then becomes
33+ :math:`\Delta t\,\sum_j Q_{Mj}\,\mathcal{O}(\Delta t^{M+1}) =
34+ \mathcal{O}(\Delta t^{M+2})`. For :math:`M = 3` this gives
35+ :math:`M+2 = 5 = 2M-1` (coincidence!). For :math:`M \geq 4` the order
36+ is :math:`M+2`, **not** :math:`2M-1`.
3237
3338Key findings (:math:`\nu = 0.1`, ``nvars = 1023``, ``restol = 1e-13``,
3439:math:`M = 3`)
3540------------------------------------------------------------------------
3641
3742* **Standard (algebraic)**: velocity :math:`\to M+1 = 4`, pressure
3843 :math:`\to M = 3`. The :math:`\mathcal{O}(\Delta t^M)` stage pressure
39- errors feed back into the velocity derivatives and break the :math:`2M-1`
40- superconvergence.
44+ errors feed back into the velocity derivatives and break superconvergence.
4145
4246* **Lifted (homogeneous)**: velocity :math:`\to M+1 = 4` (unchanged);
4347 pressure order increases monotonically toward :math:`M+1 = 4`.
4448
45- * **Differentiated constraint**: velocity :math:`\to 2M-1 = 5` ✓,
46- pressure :math:`\to 2M-1 = 5` ✓. By enforcing :math:`B\mathbf{U}_m =
47- q'(\tau_m)` at each stage instead of :math:`B\mathbf{u}_m = q(\tau_m)`,
48- the stage pressure errors are reduced to
49- :math:`e_{G_m} = -BAe_{\mathbf{u}_m}/s = \mathcal{O}(\Delta t^{M+1})`,
50- eliminating the feedback that breaks superconvergence. The index-reduced
51- system is essentially an ODE and RADAU achieves its full order :math:`2M-1`.
49+ * **Differentiated constraint**: velocity :math:`\to M+2 = 5`,
50+ pressure :math:`\to M+2 = 5`. For :math:`M = 3`, :math:`M+2 = 5 = 2M-1`
51+ coincidentally equals the full RADAU collocation order. For :math:`M = 4`,
52+ the observed order is :math:`M+2 = 6 \neq 2M-1 = 7`, confirming that the
53+ improvement is one order (+1) above the standard, not a jump to :math:`2M-1`.
5254
53- Why the differentiated constraint works
54- ----------------------------------------
55- For the original algebraic constraint at each node:
55+ Why the differentiated constraint improves order by +1
56+ -------------------------------------------------------
57+ For the original algebraic constraint at each SDC node:
5658
5759.. math::
5860
7476
7577since the stage velocity error :math:`e_{\mathbf{u}_m} = \mathcal{O}(\Delta
7678t^{M+1})` at collocation nodes. With :math:`G_m` at order :math:`M+1`, the
77- velocity endpoint recovers the full RADAU superconvergence :math:`2M-1`.
79+ stage velocity derivative errors :math:`e_{\mathbf{U}_m} = \mathcal{O}(\Delta
80+ t^{M+1})`, and the U-formulation quadrature gives endpoint order
81+ :math:`\Delta t \cdot \mathcal{O}(\Delta t^{M+1}) = \mathcal{O}(\Delta
82+ t^{M+2})`. Achieving the full collocation order :math:`2M-1 \geq M+2` for
83+ :math:`M \geq 4` would require the **y-formulation** (standard RADAU-IIA), not
84+ the U-formulation.
7885
7986Usage::
8087
@@ -212,18 +219,21 @@ def main():
212219 :math:`M = 3`.
213220 * **Lifted (homogeneous)**: velocity :math:`M+1 = 4`, pressure
214221 approaches :math:`M+1 = 4`.
215- * **Differentiated constraint**: both velocity and pressure
216- approach full collocation order :math:`2M-1 = 5`.
222+ * **Differentiated constraint**: both velocity and pressure at
223+ order :math:`M+2 = 5`. For :math:`M = 3`, :math:`M+2 = 5 = 2M-1`
224+ coincidentally equals the full RADAU collocation order; the improvement
225+ is one order (+1) above the standard, not a jump to :math:`2M-1`.
217226 * **Lifted + differentiated**: same as lifted (the differentiated
218227 homogeneous constraint is equivalent to the original).
219228 """
220- colloc_order = 2 * _NUM_NODES - 1 # 2M-1 = 5
229+ mplus2 = _NUM_NODES + 2 # M+2 = 5 for M=3 (coincides with 2M-1=5)
221230
222231 # 7 halvings from T_end/2 to T_end/128 → 0.5, 0.25, …, 0.0078125
223232 dts = [_TEND / (2 ** k ) for k in range (1 , 8 )]
224233
225234 print (f'\n Fully-converged SDC (restol={ _RESTOL :.0e} , ν={ _NU } , M={ _NUM_NODES } )' )
226- print (f'Full RADAU collocation order: 2M-1 = { colloc_order } ' )
235+ print (f'Standard vel order: M+1={ _NUM_NODES + 1 } ; diffconstr vel order: M+2={ mplus2 } ' )
236+ print (f' (For M=3: M+2=5=2M-1=5 — coincidence; for M=4: M+2=6≠2M-1=7)' )
227237 print (f'nvars = { _NVARS } , 4th-order FD (spatial floor ~ O(dx^4) ≈ 1e-12)' )
228238 print (f'ν = { _NU } : slow-mode |λΔt| ≤ { _NU * np .pi ** 2 * dts [0 ]:.2f} at Δt = { dts [0 ]:.4f} '
229239 f' → asymptotic regime accessible' )
@@ -235,7 +245,7 @@ def main():
235245 (stokes_poiseuille_1d_fd_lift ,
236246 'Lifted (B·ṽ = 0, homogeneous constraint)' ),
237247 (stokes_poiseuille_1d_fd_diffconstr ,
238- 'Diff.constr. (B·U = q\' (t), differentiated) ← remedy' ),
248+ f 'Diff.constr. (B·U = q\' (t)) order M+2= { mplus2 } ← remedy' ),
239249 (stokes_poiseuille_1d_fd_lift_diffconstr ,
240250 'Lifted+diff. (B·Ũ = 0, equiv. to lifted)' ),
241251 ]
@@ -254,7 +264,7 @@ def main():
254264 vel_errs .append (ve )
255265 pres_errs .append (pe )
256266
257- _print_table (dts , vel_errs , pres_errs , colloc_order )
267+ _print_table (dts , vel_errs , pres_errs , mplus2 )
258268 results [label ] = (vel_errs , pres_errs )
259269
260270 # ---- Summary ----
@@ -279,15 +289,15 @@ def main():
279289 f' • Lifted (B·ṽ=0): vel→M+1, pres increasing toward M+1 (pre-asymptotic).'
280290 )
281291 print (
282- f' • Differentiated constraint (B·U=q\' ): vel→2M-1= { colloc_order } , '
283- f'pres→2M-1= { colloc_order } .'
292+ f' • Differentiated constraint (B·U=q\' ): vel→M+2= { mplus2 } , '
293+ f'pres→M+2= { mplus2 } .'
284294 )
285295 print (
286296 ' Enforcing B·U_m = q\' (τ_m) at each stage reduces the stage pressure\n '
287- ' error from O(dt^M) to O(dt^( M+1)), restoring the full RADAU \n '
288- ' superconvergence order 2M-1 for both velocity and pressure. \n '
289- ' The differentiated constraint converts the semi-explicit index-1 \n '
290- ' DAE to an equivalent index-0 ODE system at each stage .'
297+ ' error from O(dt^M) to O(dt^{ M+1}), giving endpoint order O(dt^{M+2}) \n '
298+ ' in the U-formulation. For M=3: M+2=5=2M-1 (coincidence!). For M=4: \n '
299+ ' M+2=6, which is observed, confirming the improvement is +1 order \n '
300+ ' over the standard, not a jump to the full collocation order 2M-1 .'
291301 )
292302 print (
293303 f' • Lifted+differentiated: same as lifted (the differentiated\n '
0 commit comments