PLUTO
4.4-patch2
|
Advance equations using Corner Transport Upwind (CTU). More...
#include "pluto.h"
Functions | |
static void | CTU_CT_Source (const Sweep *, int, int, double *, Grid *) |
int | AdvanceStep (Data *data, timeStep *Dts, Grid *grid) |
Implement the dimensionally unsplit, Corner Transport Upwind method (CTU) of Colella:
where is the right hand side at the half time step corresponding to the hyperbolic (
H
) and parabolic (P
) part. The right hand side is constructed using the flux obtained from the solution of Riemann problems between corner coupled states. In absence of diffusion term we use:
The second equation form is preferred for computational efficiency since the are obtained during 1-D sweeps by solving Riemann problems between normal states:
In presence of explicit diffusion fluxes, the predictor step is modified by computing the RHS from 1st order states at t^n:
This allows to obtain space and time centered states in one row of boundary zones required during the corrector step.
The update is done through a normal (predictor) and corrector step:
1) Predictor step : Construct and also the full right hand side
and similarly for the
y
and z
directions. Note that are defined on a larger stencil than
and therefore we need to zero the rhs where it is not defined. Schematically, in a 2-D domain the total right hand side
is built by collecting contributions coming from 1D sweeps:
0| Lx |0 0| Lx |0 -+-------------+ -+-------------+- | | | | | | | | 0| Lx |0 --> Ly| Lx+Ly |Ly | | | | | | | | -+-------------+- -+-------------+- 0| Lx |0 0| Lx |0 (X sweep) (Y sweep)
Normal states (U^*=Ux,Uy) are instead computed on the following box:
Ux| Ux-Lx |Ux Uy| Uy |Uy -+-------------+- -+-------------+- | | | | | | | | Ux| Ux-Lx |Ux --> Uy-Ly| Uy-Ly |Uy-Ly | | | | | | | | -+-------------+- -+-------------+- Ux| Ux-Lx |Ux Uy| Uy |Uy (X sweep) (Y sweep)
Beware that with staggered MHD or explicit parabolic terms the schematic box is one zone larger than the actual computational domain.
2) Corrector step : Compute corner coupled states by adding the full right hand side
where the term in round bracket is available from the Predictor step. Thenand solve Riemann problems. Construct right hand side and update conserved variables.
This integrator performs an integration in the ghost boundary zones, in order to recover appropriate information to build the transverse predictors. If constrained transport is enabled then, in summary, normal and transverse indices are handled as follows
RK CTU +------------------------------------------- Transverse++ | YES YES | Normal++ | NO YES, at predictor step
Predictor step (g_intStage = 1) in CTU requires extra transverse loop to obtain transverse predictor in any case. Also, with CTU+CT, one needs to expand the grid of one zone in the normal direction as well. This allows to computed fully corner coupled sweeps in the boundary to get electric field components during the constrained transport algorithm.
References
Add source terms to conservative left and right states obtained from the primitive form of the equations. The source terms are:
These terms are NOT accounted for when the primitive form of the equations is used (see Gardiner & Stone JCP (2005), Crockett et al. JCP(2005)). This is true for both the Charactheristic Tracing AND the primitive Hancock scheme when the constrained transport is used, since the resulting system is 7x7. To better understand this, you can consider the stationary solution rho = p = 1, v = 0 and Bx = x, By = -y. If these terms were not included the code would generate spurious velocities.