Skip to content

Outside boundary calculation #42

@totork

Description

@totork

I tried to set up TCV X21 grids and I observed some weir behavior for the forward_backward_xt_prime. Zoidberg is designating some cells to leave the system that actually stay inside the volume. It is also designating these cells to have a forward/backward_xt_prime of -1, which means it is counted towards bndry_xin. See the attached pictures.

Image Image

I also attached some plots of the cross section and also the scipt to generate the grids.

tcv_x21.txt

For this you need the repo from

https://github.com/SPCData/TCV-X21

You also have to change the hardcoded paths, to match your directories.

I know that it is originating in

 if pol_slice is None:
              # No slice grid, so hit a boundary
              xind = -1
              zind = -1
          else:
              # Find the indices for these new locations on the slice poloidal grid
              xcoord = coord[:, :, 0]
              zcoord = coord[:, :, 1]
              xind, zind = pol_slice.findIndex(xcoord, zcoord)

              # Check boundary defined by the field
              outside = magnetic_field.boundary.outside(xcoord, y_slice, zcoord)
              xind[outside] = -1
              zind[outside] = -1

@dschwoerer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions