Skip to content

Add Variational Burgers solver

Valentin Carlier requested to merge add_variational_Burgers into devel

A variational solver for the Burgers equation is implemented as first simple step toward Variational Non-Linear MHD

The new model is VariationalBurgers in models.toy, it relies on only one propagator : VariationalVelocityAdvection.

This propagator implements a Crank-Nicolson step for self-advection term in Burger equation,

\int_{\Omega} \partial_t u \cdot v - \frac{1}{3} u \cdot [u,v] dx = 0

This is rewritten on the logical domain as

\int_{\hat{\Omega}} \partial_t DF \hat{u} \cdot DF \hat{v} - \frac{1}{3} DF \hat{u} \cdot [DF \hat{u}, DF\hat{v}] \frac{1}{\sqrt{g}} dx = 0

Which is using the pull back of a bracket equal to

\int_{\hat{\Omega}} \partial_t DF \hat{u} \cdot DF \hat{v} - \frac{1}{3} DF \hat{u} \cdot DF [\hat{u}, \hat{v}] \frac{1}{\sqrt{g}}dx = 0

It is therefore discretized as

\int_{\hat{\Omega}} \partial_t DF \hat{u} \cdot DF \hat{v} - \frac{1}{3} DF \hat{u} \cdot DF \Pi^0( [\hat{u}, \hat{v}]) \frac{1}{\sqrt{g}}dx = 0

Or expliciting the bracket term :

\int_{\hat{\Omega}} \partial_t DF \hat{u} \cdot DF \hat{v} - \frac{1}{3} DF \hat{u} \cdot DF \sum_i ( (\Pi^0[\hat{u}] (\nabla \hat{v}_i) - \Pi^0[\nabla u_i] v) e_i \frac{1}{\sqrt{g}}dx = 0

Which is then in matrix notation with time discretization

M_v \frac{u^{n+1}-u^n}{\Delta t} - \frac{1}{3}(\sum_i (\Pi^{1\mapsto 0}[u^{n+1/2}] G P_i - \Pi^{X\mapsto 0}[\nabla u^{n+1/2}_i])^T P_i) M_v u^{n+1/2}

Where P_i denotes the CoordinateProjector on the i-th coordinate (see below) and $\Pi^{V->0}[f]$ the basis projection operator taking argument in V, returning an element of V_0 (H^1) defined by $\Pi^{V\mapsto 0}f = Pi^0(f \cdot v)$ and X=(V_0)^3

I also added the CoordinateProjector and CoordinateInclusion LinearOperator. CoordinateProjector correspond to the projection (H^1)^3 \mapsto (H^1) that maps u = (u_1, u_2, u_3) to u_i where i=1,2,3 is given when building the projector. CoordinateInclusion is the transpose of the former one, that is the operator (H^1) \mapsto (H^1)^3 that maps v to (v,0,0) if i=1, (0,v,0) if i=2 and (0,0,v) if i=3. Even if I only presented them is the case of (H^1)^3 they can be built and use for every space which is a Cartesian product $X=X_1 \times X_2 \times ... $ as projector X \mapsto X_i and the corresponding inclusion X_i \mapsto X.

Solve issue #226 (closed)

Edited by Valentin Carlier

Merge request reports