Initial conditions don't satisfy boundary conditions

Issue #160 new
David Dickinson created an issue

Consider a slab homogeneous case where we force vpar = 0 – this gives us dg /dt = 0 as the system we’re trying to solve. Upon discretisation we get

g(ig+1, it+1) = g(ig+1, it) + [g(ig, it) - g(ig, it+1)]*(1-bakdif)/(1+bakdif)

In the limit of large bakdif this reduces to g(ig+1, it+1) = g(ig+1, it) i.e. gnew == g everywhere except at the boundary (as we don’t use this expression at the boundary).

Consider ig = -ntgrid and it = 0 i.e. the first timestep. Suppose we’ve set g(:, 0) = 1. We’ll find

g(-ntgrid + 1, 1) = g(-ntgrid + 1, 0) + [g(-ntgrid, 0) - g(-ntgrid, 1)] *(1-bakdif)/(1+bakdif) = 1 + [1- g(-ntgrid, 1)] * (1-bakdif)/(1+bakdif)

Typically we enforce g(-ntgrid) to take a particular value (either 0 or related to the fields). Suppose we’ve chosen to enforce g(-ntgrid) = 0 . Also let us take bakdif = 0 for simplicity, we therefore find g(-ntgrid+1, 1) = 1 + 1 - 0 = 2. At the next point we get g(-ntgrid+ 2, 1) = 1 + 1 - 2 = 0 and this pattern continues with gnew = [0,2,0,2,0...] etc. In other words we end up with a grid scale instability. The source of this is the term [g(-ntgrid, 0) - g(-ntgrid, 1)] *(1-bakdif)/(1+bakdif) and ultimately the fact that the value in the boundary in our initial condition does not satisfy our imposed boundary condition, leading to a large effective dg/dt at the boundary.

We should try to automatically make sure that our initial conditions satisfy the parallel boundaries. This is likely to change results, so we may want a flag to disable it. This can also be slightly tricky with linked boundaries as we may need to communicate along the connected domain to determine how we wish to adjust the specified initial values to satisfy the boundary condition. A simpler alternative is to simply set gnew=0 at the ends of the connected domains. Whilst this avoids the issue detailed here it can introduce a large parallel gradient at the boundary which can then lead to instability when we reintroduce the parallel streaming term.

Comments (1)

  1. David Dickinson reporter

    See PR #556 for an example initial condition which will satisfy the parallel boundary conditions and is hopefully suitable for nonlinear simulations.

  2. Log in to comment