desc.external.paraview.export_volume_to_paraview

desc.external.paraview.export_volume_to_paraview(eq, filename, res=(20, 100, 100), keys=[], return_mesh=False)Source

Export equilibrium volume data for Paraview as VTK file.

Parameters:
  • eq (Equilibrium) – Equilibrium to be exported.

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

  • res (tuple of ints, (Nr, Np, Nt)) – The resolutions to use. Defaults to (20, 100, 100) points in radial, poloidal and toroidal directions, respectively.

  • keys (list of str) – Additional data to store in the file. Defaults to empty list.

  • 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=Nr, 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).