One-dimensional hyperbolic systems¶
Advection equation¶
First we are going to study the one-dimensional advection equation
We are going to compare the first order upwind scheme with a centered differences scheme. Since forward in time centered in space is unconditionally unstable we add artificial diffusion to the latter. We discretize space with a cell-centered grid of \(N_x\) points on the domain \([x_0,x_1]\).
In time we use the Bogacki-Shampine adaptive method of order 3 (adaption of order 2).
We use Neumann boundary conditions and as initial condition we use the classical problem of a step function
As an alternative initial condition we can choose a wave function
We also remark that the advection equation has a simple analytical solution
As a first example we solve the continuity equation with the step function initial condition with various schemes

We find the expected results:
the upwind scheme of first order does not produce oscillations and has inherent numerical diffusion
the upwind scheme of 2nd order produces oscillations downstream
the centered scheme without diffusion is unconditionally unstable and produces lots of oscillations
only the first order upwind and the 2nd order schemes with diffusion produce smooth solutions
adding the correct amount of numerical diffusion to the 2nd order schemes depends on the resolution

In the wave example we can see that
the upwind scheme of 1st order has a lot of numerical diffusion (even more than the artificial diffusion)
the schemes with diffusion are stable but they do not converge to the correct solution
the 2nd order schemes seem to be stable without diffusion (which is a wrong conclusion as we know that centered differences are unstable, we conclude that the sine wave is not a good test function to test stability)
Plasma two-fluid equations¶
As a next step we investigate the two-fluid equations (also known as two-fluid Euler-Poisson system)
which is closed by the one-dimensional Poisson equation
where we have Gyro-Bohm normalization and \(\mu_e = -m_e/m_i\), \(\mu_i = 1\), \(\tau_e = -1\) and \(\tau_i = T_i / T_e\). Further, we have \(\eta = 0.51 \nu_{ei,0}/ \Omega_{ce}\) and \(\nu_{u,e} = 0.73 \Omega_{ce} / \nu_{ei,0}\) and \(\nu_{u,i} = 0.96 \Omega_{ci} / \nu_{ii,0}\). Last, we have the Debye parameter \(\epsilon_D = \lambda_D^2 / \rho_s^2\) with the Debye length \(\lambda_D\) and the ion gyro-radius at electron temperature \(\rho_s\). Note that we choose the peculiar signs in \(\mu_e\) and \(\tau_e\) such that the electron and ion momentum equations have exactly the same form, which makes it easy to implement.
Also note that we choose Bohm normalization based on gyro-radius \(\rho_s\) and gyro-frequency \(\Omega_{ci}\) because this is how we normalize the three-dimensional model. However, there is no magnetic field in the model and so the gyration does not appear. The more natural normalisation uses plasma frequency and Debye length, which makes the \(\epsilon_D\) parameter disappear [SS87].
The spatial domain is given by \([-L_\parallel /2 ; L_\parallel/2]\), where \(L_\parallel = 2\pi q R_0\) with \(q=3\) and \(R_0=0.545\)m approximating the length of a fieldline from divertor to divertor in the Compass SOL. We use \(N_x\) points.
Neutral fluid limit¶
We reach the limit of Navier Stokes fluid equations by first setting \(\mu_e = 0\). Then we find from the electron momentum equation \(-\tau_e \partial_x n_e - n_e\partial_x \phi - \eta n_e j = 0\), which yields the force term \(-\tau_i \partial_x n_i + \tau_e \partial_x n_i + \tau_e \epsilon_D \partial_x^3 \phi + \epsilon_D \partial_x (\partial_x \phi)^2 / 2 \) in the ion momentum equation. In the limit \(\epsilon_D=0\) the ion continuity and ion momentum equations thus decouple from the system and yield the Navier Stokes equations.
Adiabatic electrons¶
In the limit of \(\mu_e=0\) and vanishing resistivity \(\eta =0\) the electron force balance reduces to \(\partial_x n_e = n_e \partial_x\phi\) which is solved by \(n_e = n_{e,0}\exp(\phi)\).
which is closed by the one-dimensional non-linear Poisson equation (choosing \(n_{e,0}=1\))
First, we simulate the full plasma two-fluid system.
Timesteps for staggered original is 725.0

We observe
steps in the potential
oscillations in the electron velocity and electric field indicating rapid plasma oscillations
Timesteps for staggered slope-limiter is 20552.0

staggered original 100 5.580296254580168e-05 0.023195936061266877 0.002575918155506441
staggered original 200 2.8282088300430025e-05 0.011705288819374821 0.0011112195383459545
staggered original 400 1.4233827548520823e-05 0.005877695490863391 0.0005277675970782922
staggered slope-limiter 100 1.090675926467633e-05 0.001976291856643779 0.001339650743226408
staggered slope-limiter 200 2.727761445330482e-06 0.0004996362259588693 0.00033494442001343896
staggered slope-limiter 400 6.808894613093873e-07 0.0001251456288766868 8.376258715632446e-05
staggered slope-limiter-explicit 100 1.0905408903246603e-05 0.001972221786447545 0.0013370735038095336
staggered slope-limiter-explicit 200 2.7259884698560088e-06 0.0004987128193436745 0.00033426421736756337
staggered slope-limiter-explicit 400 6.782599516324007e-07 0.00012512265402499096 8.355670477792765e-05
centered 100 2.8162603120836513e-06 0.002525936373990322 0.006341152712926746
centered 200 7.068546265656482e-07 0.0006277146840703361 0.0015818941194588863
centered 400 1.769526754020677e-07 0.00015676610885135612 0.00039538234986413485
%matplotlib inline