desc.external.paraview.export_surface_to_paraview

desc.external.paraview.export_surface_to_paraview(obj, filename, res=(100, 100), keys=[], rho=1.0, return_mesh=False)Source

Export a constant rho surface data for Paraview as VTK file.

Parameters:
  • obj (Equilibrium or FourierRZToroidalSurface) – Object to be exported. Different flux surfaces of the Equilibrium can be exported by supplying rho.

  • filename (str) – Name for the saved file. The file extension will be .vtk.

  • res (tuple, list) – The resolution used to create the mesh. Must be in the form (Np, Nt), number of points in poloidal and toroidal direction, respectively. Default is (100, 100).

  • keys (list, optional) – The names of the quantities to be computed on the grid points. Defaults to empty list.

  • rho (float) – The flux surface to be exported if obj is an Equilibrium. Defaults to 1.

  • return_mesh (bool) – If True, return the created pyvista StructuredGrid object. Defaults to False.

Returns:

mesh (pyvista.StructuredGrid) – Created structured grid object. With this object one can compute more quantities on LinearGrid(rho=rho, theta=Np, zeta=Nt, NFP=1, endpoint=True) and add it to the mesh by mesh[‘name’] = value. Once the mesh is changed, the user has to save it again mesh.save(filename).