Problems with handling of periodic domains

Issue #131 new
David Dickinson created an issue

There are a number of potential issues with our handling of periodic domains (including zonal modes in box runs) which could potentially cause problems:

  1. During the response calculation we generally ensure that duplicate grid points (e.g. at the linked boundaries) are set consistently and these duplicate points only appear once in the response matrices. This is true where duplicate points arise due to linked boundary conditions but is not true in the case where these arise from periodic boundaries.
  2. This means that when calculating the zonal response we include both of the duplicate points (-ntgrid and ntgrid) in the response matrix. This does not lead to a singular matrix currently because we don’t currently ensure that we set both points at the same time, but it can lead to rather large condition number.
  3. Because we don’t set both points I think the self_periodic method used to ensure periodicity in the dist fn solution for periodic modes (and in some modes the wfb) may not be correct during initialisation.
  4. When we use esv=.true. we attempt to force quantities taking single values at duplicate points. This may not work well during initialisation if we’re not ensuring the fields are already single valued at the duplicate points. Note this can lead to some small disagreement between local and implicit response matrices as the route taken by local does not allow esv to be enforced in this calculation.

To fix these issues there are two main steps:

  1. Ensure that we detect periodic domains during the response calculation and initialise duplicate points consistently.
  2. Remove the rows corresponding to one of the duplicate points from the response matrix.

In isolation we would expect 1 to lead to singular response matrices as we would now expect our duplicate rows to be identical. In small test cases it was found that this fix led to matrices with a condition number in the region 1e16-1e18. It is clear that we must implement both parts of this fix together. This is relatively straightforward for fields_local (see https://bitbucket.org/gyrokinetics/gs2/branch/experimental/explore_periodic_response_issue for a quick implementation), but may be more challenging for fields_implicit as it adds a new class/problem size.

Thanks to @Michael Hardman for flagging the duplicate point issue.

Comments (1)

  1. Log in to comment