Add barotropic fluid
Implementent a variational solver for the barotropic compressible fluid model as a third step towards non-linear MHD.
The new model is VariationalBarotropicFluid
in models.toy
, it relies on two propagators : VariationalMomentumAdvection
and VariationalDensityEvolve
The first propagator implements a Crank-Nicolson step for self-advection term in euler equation,
\int_{\Omega} \partial_t \rho u \cdot v - \rho u \cdot [u,v] dx = 0
And was already implemented in the previous MR !442 (merged)
And the second one a Crank-Nicolson step for the density advection and corresponding term in the momentum equation
\int_{\Omega} \partial_t \rho u \cdot v + \big( \frac{|u|^2}{2} - \frac{\partial \rho e}{\partial \rho} \big) \nabla \cdot (\rho v) dx = 0
\partial_t \rho + \nabla \cdot (\rho u) = 0
where e is the internal enegy, here e=\rho/2
. I modify the already existing VariationalDensityEvolve
to allow choosing the model and avoid creating another very similar propagator.
Closes #234 (closed)