The present work is the result of a team work involving
\[ \partial_t u + \partial_x \left ( f(u) \right ) = 0, \quad t \geq 0, \quad x \in \mathbb{R}, \qquad f(u) = \dfrac{u^2}{2}, \]
Consider the Cauchy problem with initial cond.
\[ u^0(x)=\left\{% \begin{array}{cc} \hfill 0, & x \in ]- \infty,-1]\cup [1, + \infty[,\\ x+1, & x \in ]-1,0], \hfill \\ 1-x, & x \in[0,1[. \hfill \\ \end{array} \right. \]
\[ \partial_t u + \partial_x \left ( f(u) \right ) = 0, \quad t \geq 0, \quad x \in \mathbb{R}, \qquad f(u) = \dfrac{u^2}{2}, \]
Consider the Cauchy problem with initial cond.
\[ u^0(x)=\left\{% \begin{array}{cc} \hfill 0, & x \in ]- \infty,-1]\cup [1, + \infty[,\\ x+1, & x \in ]-1,0], \hfill \\ 1-x, & x \in[0,1[. \hfill \\ \end{array} \right. \]
\[ \partial_t u + \partial_x \left ( f(u) \right ) = 0, \quad t \geq 0, \quad x \in \mathbb{R}, \qquad f(u) = \dfrac{u^2}{2}, \]
Consider the Cauchy problem with initial cond.
\[ u^0(x)=\left\{% \begin{array}{cc} \hfill 0, & x \in ]- \infty,-1]\cup [1, + \infty[,\\ x+1, & x \in ]-1,0], \hfill \\ 1-x, & x \in[0,1[. \hfill \\ \end{array} \right. \]
Decomposition of the solution on a wavelet basis [Daubechies, ’88], [Mallat, ’89] to measure its local regularity. “Practical” approach by [Harten, ’95], [Cohen et al., ’03].
Projection operator
Prediction operator at order \(2 \gamma+1\)
\[ {\hat f}_{\ell+1,2 k}={f}_{\ell, k}+\sum_{\sigma=1}^\gamma \psi_\sigma\left({f}_{\ell, k+\sigma}-{f}_{\ell, k-\sigma}\right) \]
Details are regularity indicator \[ {\mathrm{d}}_{\ell, {k}}:={f}_{\ell, {k}}-{\hat{f}}_{\ell, {k}} \]
Let \(f \in W^{\nu, \infty}\) (neigh. of \(C_{\ell, k}\) ), then \[ \left|{\mathrm{d}}_{\ell, k}\right| \lesssim 2^{-\ell \min (\nu, 2 \gamma+1)}|f|_{W^{\min (\nu, 2 \gamma+1), \infty}} \]
Fast wavelet transform:
means at the finest level can be recast as means at the coarsest level + details \[ \begin{array}{rlr} {f}_{\overline{\ell}} & \Longleftrightarrow & \left({f}_{\underline{\ell}}, {{d}}_{\underline{\ell} +1}, \ldots, {d}_{\bar{\ell}}\right)\\ \end{array} \]
Local regularity of the solution allows to select areas to coarsen
\[ {{f}}_{\bar{\ell}} \rightarrow \left({f}_{\underline{\ell}}, {\mathbf{d}}_{\underline{\ell}+1}, \ldots, {\mathbf{d}}_{\bar{\ell}}\right) \rightarrow \left({f}_{\underline{\ell}}, {\tilde{\mathbf{d}}}_{\underline{\ell}+1}, \ldots, \tilde{{\mathbf{d}}}_{\bar{\ell}}\right) \rightarrow {\tilde{{f}}}_{\bar{\ell}} \] \[ \tilde{{\mathrm{d}}}_{\ell, k}= \begin{cases}0, & \text { if } \left|{\mathbf{d}}_{\ell, k}\right| \leq \epsilon_{\ell}=2^{-d \Delta \ell} \epsilon, \quad \rightarrow \quad\left\|{\mathbf{f}}_{\bar{\ell}}-\tilde{{\mathbf{f}}}_{\bar{\ell}}\right\|_{\ell^p} \lesssim \epsilon \\ {\mathrm{d}}_{\ell, k}, & \text { otherwise} \end{cases} \]
Set a small (below \(\epsilon_{\ell}\)) detail to zero \(\equiv\) erase the cell \(C_{\ell, k}\) from the structure
Equation
\[ f(x) = exp(-50x^2) \; \text{for} \; x\in[-1, 1] \]
min level | 1 |
max level | 12 |
ε | 10-3 |
compression rate | 96.29% |
error | 0.00078 |
Equation
\[ f(x) = \left\{ \begin{array}{l} 1 - |2x| \; \text{if} \; -0.5 < x < 0.5,\\ 0 \; \text{elsewhere} \end{array} \right. \]
min level | 1 |
max level | 12 |
ε | 10-3 |
compression rate | 98.49% |
error | 0 |
Equation
\[ f(x) = 1 - \sqrt{\left| sin \left( \frac{\pi}{2} x \right) \right|} \; \text{for} \; x\in[-1, 1] \]
min level | 1 |
max level | 12 |
ε | 10-3 |
compression rate | 96.29% |
error | 0.00053 |
Equation
\[ f(x) = \tanh(50 |x|) - 1 \; \text{for} \; x\in[-1, 1] \]
min level | 1 |
max level | 12 |
ε | 10-3 |
compression rate | 97.46% |
error | 0.002 |
Mesh updated using “old” information at time \(t\) to accommodate the one at time \(t + \Delta t\)
Flux evaluation at interfaces between levels
Using the prediction operator allows to evaluate fluxes at the same level
Finite volume method
We use a Godunov flux for the small hat problem
\(\epsilon = 1e-2\), \(\underline{\ell} = 2\), \(\bar{\ell} = 12\)
Name | Data structure | Adaptation criteria | Time scheme | Load balancing |
---|---|---|---|---|
AMReX | block | heuristic | global/local | SFC |
Dendro | tree | wavelet | global | SFC |
Dyablo | tree | heuristic | global | SFC |
Peano | tree | - | - | SFC |
P4est | tree | - | - | SFC |
samurai | interval | heuristic/wavelet | RK/splitting/IMEX time-space/code coupling |
SFC/diffusion algorithm |
samurai: create a unified framework for testing a whole range
of mesh adaptation methods with the latest generation of numerical schemes.
[ start , end [ @ offset
⋃
=
\
=
The search of an admissible set is recursive. The algorithm starts from the last dimension (y in 2d, z in 3d,…).
The available operators in samurai are for now
initial mesh
initial mesh
ghost cells used by the numerical scheme
cells needed to compute the details (all tree)
cells needed to compute the details (iterative way)
cells needed to compute the details (iterative way)
cells needed to compute the details (iterative way)
cells needed to compute the details (iterative way)
cells needed to compute the details (iterative way)
cells needed to compute the details (iterative way)
Given a mesh with all the leaves called cells
Given a mesh with all the leaves called cells
for(std::size_t level = min_level + 1; level <= max_level; ++level)
{
auto subset = difference(mesh[cells_and_ghosts][level], union()[level]);
subset([&](std::size_t level, auto& i)
{
auto i_above = i >> 1;
mesh[pred][level - 1].add_interval({i_above.start - prediction_size, i_above.end + prediction_size});
})
}
Given a mesh with all the leaves called cells
Level | Num. of cells | p4est | samurai (leaves) | samurai (all) | ratio |
---|---|---|---|---|---|
\(9\) | 66379 | 2.57 Mb | 33.68 Kb | 121 Kb | 21.24 |
\(10\) | 263767 | 10.25 Mb | 66.64 Kb | 236.8 Kb | 43.28 |
\(11\) | 1051747 | 40.96 Mb | 132.36 Kb | 467.24 Kb | 87.66 |
\(12\) | 4200559 | 163.75 Mb | 263.6 Kb | 927 Kb | 176.64 |
\(13\) | 16789627 | 654.86 Mb | 525.9 Kb | 1.85 Mb | 353.98 |
\(14\) | 67133575 | 2.61 Gb | 1.05 Mb | 3.68 Mb | 709.24 |
In this work, we are concerned with the numerical solution of the Cauchy problem associated with the linear scalar conservation law
\[ \partial_t u(t, x)+V \partial_x u(t, x)=0, \quad(t, x) \in \mathbb{R}^{+} \times \mathbb{R} \]
where \(V\) is the transport velocity, taken \(V>0\) without loss of generality. we consider 1 d problems. The extension to \(2\mathrm{~d}\) / \(3\mathrm{~d}\) problems is straightforward and usually done by tensorization [Bellotti2022] and yields analogous conclusions.
The discrete volumes are \[ C_{\ell, k}:=\left[2^{-\ell} k, 2^{-\ell}(k+1)\right], \quad k \in \{ 0,2^{\ell}-1 \}, \] for any \(\ell \in \{ \underline{\ell}, \bar{\ell} \}\). The measure of each cell at level \(\ell\) is \(\Delta x_{\ell}:=2^{-\ell}\) and we shall indicate \(\Delta x:=\Delta x_{\bar{\ell}}\). The cell centers are \(x_{\ell, k}:=\) \(2^{-\ell}(k+1 / 2)\). Finally, we shall indicate \(\Delta \ell:=\bar{\ell}-\ell\), hence \(\Delta x_{\ell}=2^{\Delta \ell} \Delta x\).
Finite Volume scheme at the finest level of resolution \(\bar{\ell}\) for any cell of indices \(\bar{k} \in \{ 0,2^{\bar{\ell}}-1 \}\). Explicit schemes read:
\[ \mathrm{v}_{\bar{\ell}, \bar{k}}^{n+1}=\mathrm{v}_{\bar{\ell}, \bar{k}}^n-\frac{\Delta t}{\Delta x}\left(\Phi\left(\mathrm{v}_{\bar{\ell}, \bar{k}+1 / 2}^n\right)-\Phi\left(\mathrm{v}_{\bar{\ell}, \bar{k}-1 / 2}^n\right)\right) \]
where we utilize the same linear numerical flux for the left and the right flux (conservativity) \[ \Phi\left(\mathbf{v}_{\bar{\ell}, \bar{k}-1 / 2}\right):=V \sum_{\alpha=\underline{\alpha}}^{\bar{\alpha}} \phi_\alpha \mathbf{v}_{\bar{\ell}, \bar{k}+\alpha}, \quad \Phi\left(\mathbf{v}_{\bar{\ell}, \bar{k}+1 / 2}\right):=V \sum_{\alpha=\underline{\alpha}}^{\bar{\alpha}} \phi_\alpha v_{\bar{\ell}, \bar{k}+1+\alpha} \]
[Carpentier et al 97] or Cauchy-Kowalewski procedure [Harten et al 87]
\[ \partial_t u\left(t^n, x_{\bar{\ell}, \bar{k}}\right)+V \partial_x u\left(t^n, x_{\bar{\ell}, \bar{k}}\right)=\sum_{h=2}^{+\infty} \Delta x^{h-1} \sigma_h \partial_x^h u\left(t^n, x_{\bar{\ell}, \bar{k}}\right) \]
We introduce the reconstruction operator \(\hat{s}\) instead of \(s\) on the cells \(\left(\bar{\ell}, 2^{\Delta \ell} k+\delta\right)\) for any \(\delta \in \mathbb{Z}\) at the finest level
\[ \mathbf{w}_{\bar{\ell}, \bar{k}}^{n+1}=\mathbf{w}_{\bar{\ell}, \bar{k}}^n-\frac{\Delta t}{\Delta x}\left(\Phi\left(\hat{\hat{\mathbf{w}}}_{\bar{\ell}, \bar{k}+1 / 2}^n\right)-\Phi\left(\hat{\hat{\mathbf{w}}}_{\bar{\ell}, \bar{k}-1 / 2}^n\right)\right) \] \[ \Phi\left(\hat{\hat{\mathbf{w}}}_{\bar{\ell}, \bar{k}-1 / 2}\right):=V \sum_{\alpha=\underline{\alpha}}^{\bar{\alpha}} \phi_\alpha \hat{\hat{\mathbf{w}}}_{\bar{\ell}, \bar{k}+\alpha} \]
Let now \((\ell, k) \in S\left(\tilde{\Lambda}^{n+1}\right)\), taking the projection yields the multiresolution scheme
\[ \mathbf{w}_{\ell, k}^{n+1}=\mathbf{w}_{\ell, k}^n-\frac{\Delta t}{\Delta x_{\ell}}\left(\Phi\left(\hat{\hat{\mathbf{w}}}_{\bar{\ell}, 2^{\Delta \ell}(k+1)+1 / 2}^n\right)-\Phi\left(\hat{\hat{\mathbf{w}}}_{\bar{\ell}, 2^{\Delta \ell} k-1 / 2}^n\right)\right) \]
\[ \Phi\left(\hat{\hat{\mathbf{w}}}_{\bar{\ell}, 2^{\Delta \ell} k-1 / 2}\right):=V \sum_{\alpha=\underline{\alpha}}^{\bar{\alpha}} \phi_\alpha \hat{\hat{\mathbf{w}}}_{\bar{\ell}, 2^{\Delta \ell} k+\alpha} \]
Some information is loss because of the averaging procedure: two different schemes we can consider for the computation of the modified equations.
Theorem
The local truncation error of the reference Finite Volume scheme and the one of the adaptive Finite Volume scheme are the same up to order \(2\hat{s}+1\) included.
This result establishes at which order the modified equations of the reference scheme are perturbed by the introduction of the adaptive scheme. However, it does not characterize the terms in the modified equations above order \(2\hat{s}+1\) in \(\Delta x\) (symbolic computations).
Theorem 2
Assume that
Then, for smooth solution, in the limit \(\Delta x \rightarrow 0\) (i.e. \(\bar{\ell} \rightarrow+\infty\) ) and for \(\Delta \underline{\ell}=\bar{\ell}-\underline{\ell}\) kept fixed, we have the error estimate
\[ \left\|\mathbf{v}_{\bar{\ell}}^n-\mathbf{w}_{\bar{\ell}}^n\right\| \leq C_{t r} t^n \Delta x^{2 \hat{s}+1}+C_{m r} \frac{t^n}{\lambda \Delta x} \epsilon \]
where \(C_{t r}=C_{t r}\left(\bar{\ell}-\underline{\ell},\left(\phi_\alpha\right)_\alpha, \lambda, \hat{s}, V\right)\) and \(C_{m r}=C_{m r}\left(\bar{\ell}-\underline{\ell},\left(\phi_\alpha\right)_\alpha, \lambda, \hat{s}, s, V\right)\). \[ \left\|\mathbf{u}_{\bar{\ell}}^n-\mathbf{w}_{\bar{\ell}}^n\right\| \leq C_{r e f} t^n \Delta x^\theta+C_{t r} t^n \Delta x^{2 \hat{s}+1}+C_{m r} \frac{t^n}{\lambda \Delta x} \epsilon \]
Courses
Theses
Publications
Ignition and Combustion (Verwer & Hundsdorfer)
Specific for RKC methods and ROCK
\[ u_t = d \Delta u + \frac{R}{\alpha \delta} (1 + \alpha - u) e^{\delta( 1 - 1/u )} \quad \text{in } [0,1]\times[0,1] \]
Ignition and Combustion (Verwer & Hundsdorfer)
Specific for RKC methods and ROCK
\[ u_t = d \Delta u + \frac{R}{\alpha \delta} (1 + \alpha - u) e^{\delta( 1 - 1/u )} \quad \text{in } [0,1]\times[0,1] \]
PIROCK | ROCK2 | ROCK4 | |
---|---|---|---|
Tolerance used | 1e-5 | 1e-6 | 1e-5 |
L2 norm of error | 1.84e-4 | 2.27e-4 | 2.69e-4 |
Elapsed time (s) | 7.97 | 1.90 | 0.42 |
Nb. time steps | 889 | 157 | 57 |
Nb. time steps rejected | 0 | 0 | 0 |
Nb. function evaluation | - | 6367 | 1734 |
Nb. function evaluation (diffusion) | 8304 | - | - |
Nb. function evaluation (reaction) | 360067655 | - | - |
between \(t=0.29\) and \(t=0.32\).
IMEX reasonable overhead compared to fully explicit methods (ROCK2 - ROCK4) even in this very difficult configuration
Belousov-Zhabotinsky (very stiff source - 3 eq) \[ \left\{ \begin{aligned} \partial_t a - D_a \, \Delta a &= \frac{1}{\mu} ( -qa - ab + fc) \\ \partial_t b - D_b \, \Delta b &= \frac{1}{\varepsilon} ( qa - ab + b\,(1-b)) \\ \partial_t c - D_c \, \Delta c &= b - c \end{aligned} \right. \]
Belousov-Zhabotinsky (very stiff source - 3 eq) \[ \left\{ \begin{aligned} \partial_t a - D_a \, \Delta a &= \frac{1}{\mu} ( -qa - ab + fc) \\ \partial_t b - D_b \, \Delta b &= \frac{1}{\varepsilon} ( qa - ab + b\,(1-b)) \\ \partial_t c - D_c \, \Delta c &= b - c \end{aligned} \right. \]
PIROCK (tol=5e-3) | STRANG (dt=2/128) | |
---|---|---|
L2 norm of error (variable b) | 3.31e-2 | 1.14e-1 |
L2 norm of error (variable c) | 2.92e-3 | 1.37e-2 |
Elapsed time (s) | 6.91 | 6.70 |
Nb. time steps. | 624 | 128 |
ImEx (tol=1e-3) | STRANG (dt=2/512) | |
---|---|---|
L2 norm of error (variable b) | 4.94e-3 | 1.55e-3 |
L2 norm of error (variable c) | 4.31e-4 | 1.41e-4 |
Elapsed time (s) | 13.33 | 17.20 |
Nb. time steps. | 1528 | 512 |
ImEx (tol=1e-4) | STRANG (dt=2/16384) | |
---|---|---|
L2 norm of error (variable b) | 7.72e-6 | 1.81e-5 |
L2 norm of error (variable c) | 6.97e-7 | 1.57e-6 |
Elapsed time (s) | 165.12 | 427.81 |
Nb. time steps. | 31728 | 16384 |
Belousov-Zhabotinsky (very stiff source - 3 eq) \[ \left\{ \begin{aligned} \partial_t a - D_a \, \Delta a &= \frac{1}{\mu} ( -qa - ab + fc) \\ \partial_t b - D_b \, \Delta b &= \frac{1}{\varepsilon} ( qa - ab + b\,(1-b)) \\ \partial_t c - D_c \, \Delta c &= b - c \end{aligned} \right. \]
Simulation with ponio / samurai
\(\epsilon = 1e-3\), \(\underline{\ell} = 2\), \(\bar{\ell} = 10\)
Ignition of a diffusion flame at 4 instants (cold fuel, hot oxydizer - [Candel & Thevenin 1995])
\[ \left\{ \begin{array}{l} \partial _{t_\star} Z + v_{x_\star} \partial _{x_\star} Z + v_{y_\star} \partial _{y_\star} Z - \left(\partial ^2_{x_\star} Z + \partial ^2_{y_\star} Z \right)= 0, \\[2.5ex] \partial _{t_\star} \theta + v_{x_\star} \partial _{x_\star} \theta + v_{y_\star} \partial _{y_\star} \theta - \left(\partial ^2_{x_\star} \theta + \partial ^2_{y_\star} \theta \right) = F(Z,\theta), \end{array} \right. \]
with
\[ F(Z,\theta)= D_a \, \phi \chi Y_{O,0} \left[ \frac{1-Z}{\phi \tau} + \frac{1}{\chi}(Z-\theta) \right] \left[ Z + \frac{\tau}{\chi}(Z-\theta) \right] \mathrm{e}^{\left(- \tau_a/(1+\tau \theta)\right)} \]
Quasi-exact solution calculated with Strang’s method using :
Evolution of the variable \(T = \theta (T_{F,0}-T_{O,0}) + T_{O,0}\) at \(t=0\), \(5\times10^{-5}\), \(1\times10^{-5}\), \(1.5\times10^{-4}\)
Strang (with RADAUIIA and ROCK4 tolerance at \(10^{-12}\)) :
\(dt=1 \times 10^{-5}\) | \(dt=1 \times 10^{-6}\) | \(dt=1 \times 10^{-7}\) | |
---|---|---|---|
\(|E_z|\) | \(1.55513306\times 10^{-4}\) | \(2.81342860\times10^{-6}\) | \(2.88674760\times10^{-8}\) |
\(|E_{\theta}|\) | \(2.69304858\times 10^{-3}\) | \(3.74837111\times10^{-5}\) | \(3.82828537\times10^{-7}\) |
Temps RD (s) | \(25+213\) | \(207+287\) | \(2060+520\) |
Temps C (s) | \(13316\) | \(13471\) | \(14921\) |
Dual Splitting/ImEx (ImEx tolerance set at \(10^{-4}\) - should be decreased) :
\(dt=1 \times 10^{-5}\) | \(dt=1 \times 10^{-6}\) | \(dt=1 \times 10^{-7}\) | |
---|---|---|---|
\(|E_z|\) | \(1.57299998\times 10^{-5}\) | \(2.71930151\times10^{-6}\) | \(2.87698144\times10^{-8}\) |
\(|E_{\theta}|\) | \(1.93940574\times 10^{-3}\) | \(4.15846000\times10^{-6}\) | \(5.35535514\times10^{-6}\) |
Temps RD (s) | \(28\) | \(123\) | \(1202\) |
Temps C (s) | \(11221\) | \(11361\) | \(12575\) |
OSMP scheme leads to roughly an order of magnitude acceleration compared to WENO5/RK3
Basis for the CEA collaboration - hydrogen risk (Full compressible Fourier-Navier-Stokes)
Theses
Publications
Software
Maison de la Simulation - - 21 January 2025
Comments on theorem