|
The Open FUSION Toolkit 1.0.0-beta6
Modeling tools for plasma and fusion research and engineering
|
Grad-Sharvanov domain definitions for TokaMaker with Triangle library meshing.
Public Member Functions | |
| __init__ (self, rextent=None, zextents=[None, None], rpad=1.2, zpad=[1.2, 1.2], json_filename=None) | |
| Create a new Grad-Shafranov domain. | |
| add_annulus (self, inner_countour, inner_name, outer_contour, annulus_name, parent_name=None, angle_tol=30.0, sliver_tol=120.0, small_thresh=None) | |
| Add annular geometry defining region boundaries to the mesh. | |
| add_enclosed (self, in_point, name) | |
| add_polygon (self, contour, name, parent_name=None, angle_tol=30.0, sliver_tol=120.0, small_thresh=None) | |
| Add polygon geometry defining region boundaries to the mesh. | |
| add_rectangle (self, rc, zc, w, h, name, parent_name=None, rot=None) | |
| Add rectangular geometry defining region boundaries to the mesh. | |
| build_mesh (self, debug=False, merge_thresh=1.E-4, require_boundary=True, setup_only=False) | |
| Build mesh for specified domains. | |
| define_region (self, name, dx, reg_type, eta=None, noncontinuous=None, nTurns=None, coil_set=None, allow_xpoints=False, inner_limiter=False) | |
| Define a new region and its properties (geometry is given in a separate call). | |
| get_coils (self) | |
| Get dictionary describing coil regions in domain. | |
| get_conductors (self) | |
| Get dictionary describing conducting regions in domain. | |
| plot_mesh (self, fig, ax, lw=0.5, show_legends=True, col_max=10, split_coil_sets=False) | |
| Plot machine geometry. | |
| plot_topology (self, fig, ax, linewidth=None) | |
| Plot mesh topology. | |
| save_json (self, filename) | |
| Create a JSON file containing a description of the mesh. | |
Public Attributes | |
| boundary_reg = input_dict['boundary_reg'] | |
| mesh = Mesh(self.regions,debug=debug,extra_reg_defs=self._extra_reg_defs,merge_thresh=merge_thresh) | |
| dict | reg_type_counts = input_dict['reg_type_counts'] |
| dict | region_info = input_dict['region_info'] |
| list | regions = [] |
| float | rextent = input_dict['rextent'] |
| float | rmax = input_dict['rmax'] |
| rpad = input_dict['rpad'] | |
| zextents = input_dict['zextents'] | |
| float | zmax = input_dict['zmax'] |
| float | zmin = input_dict['zmin'] |
| list | zpad = input_dict['zpad'] |
Protected Attributes | |
| list | _extra_reg_defs = [] |
| _lc = None | |
| _r = None | |
| int | _reg = None |
| __init__ | ( | self, | |
| rextent = None, | |||
| zextents = [None,None], | |||
| rpad = 1.2, | |||
| zpad = [1.2,1.2], | |||
| json_filename = None ) |
Create a new Grad-Shafranov domain.
| region_list | List of oftpy.Region objects that define mesh |
| merge_thresh | Distance threshold for merging nearby points |
| add_annulus | ( | self, | |
| inner_countour, | |||
| inner_name, | |||
| outer_contour, | |||
| annulus_name, | |||
| parent_name = None, | |||
| angle_tol = 30.0, | |||
| sliver_tol = 120.0, | |||
| small_thresh = None ) |
Add annular geometry defining region boundaries to the mesh.
| inner_contour | Curve defining inner boundary |
| inner_name | Name of region enclosed by the inner boundary |
| outer_contour | Curve defining outer boundary |
| annulus_name | Name of annular region between inner and outer boundaries |
| parent_name | Name of region beyond the outer boundary |
| angle_tol | Corner tolerance used when resampling curve at desired resolution |
| sliver_tol | Tolerance used for "sliver" region warnings |
| small_thresh | Tolerance used for "small" curve warnings (default: dx/2) |
| add_enclosed | ( | self, | |
| in_point, | |||
| name ) |
| add_polygon | ( | self, | |
| contour, | |||
| name, | |||
| parent_name = None, | |||
| angle_tol = 30.0, | |||
| sliver_tol = 120.0, | |||
| small_thresh = None ) |
Add polygon geometry defining region boundaries to the mesh.
| contour | Curve defining polygon |
| name | Name of region enclosed by the polygon |
| parent_name | Name of region outside the polygon |
| angle_tol | Corner tolerance used when resampling curve at desired resolution |
| sliver_tol | Tolerance used for "sliver" region warnings |
| small_thresh | Tolerance used for "small" curve warnings (default: dx/2) |
| add_rectangle | ( | self, | |
| rc, | |||
| zc, | |||
| w, | |||
| h, | |||
| name, | |||
| parent_name = None, | |||
| rot = None ) |
Add rectangular geometry defining region boundaries to the mesh.
| rc | Radial center of rectangle |
| zc | Vertical center of rectangle |
| w | Width of rectangle (radial direction) |
| h | Height of the rectangle (vertical direction) |
| name | Name of region enclosed by the polygon |
| parent_name | Name of region outside the polygon |
| rot | Rotation of rectangle (degrees) |
| build_mesh | ( | self, | |
| debug = False, | |||
| merge_thresh = 1.E-4, | |||
| require_boundary = True, | |||
| setup_only = False ) |
Build mesh for specified domains.
| define_region | ( | self, | |
| name, | |||
| dx, | |||
| reg_type, | |||
| eta = None, | |||
| noncontinuous = None, | |||
| nTurns = None, | |||
| coil_set = None, | |||
| allow_xpoints = False, | |||
| inner_limiter = False ) |
Define a new region and its properties (geometry is given in a separate call).
| name | Name of region |
| dx | Target mesh size for region |
| reg_type | Type of region ("plasma", "vacuum", "boundary", "conductor", or "coil") |
| eta | Resistivity for "conductor" regions (raises error if region is other type) |
| nTurns | Number of turns for "coil" regions (raises error if region is other type) |
| allow_xpoints | Allow X-points in this region (for non-plasma regions only) |
| inner_limiter | This region forms the inner limiter (valid for non-plasma regions in Dipole mode only) |
| get_coils | ( | self | ) |
Get dictionary describing coil regions in domain.
| get_conductors | ( | self | ) |
Get dictionary describing conducting regions in domain.
| plot_mesh | ( | self, | |
| fig, | |||
| ax, | |||
| lw = 0.5, | |||
| show_legends = True, | |||
| col_max = 10, | |||
| split_coil_sets = False ) |
Plot machine geometry.
| fig | Figure to add to (unused) |
| ax | Axes to add to (must be scalar, [2], or [2,2]) |
| lw | Width of lines in calls to "triplot()" |
| show_legends | Show legends for plots with more than one region? |
| col_max | Maximum number of entries per column in each legend |
| plot_topology | ( | self, | |
| fig, | |||
| ax, | |||
| linewidth = None ) |
Plot mesh topology.
| fig | Figure to add to (unused) |
| ax | Axes to add to (must be scalar) |
| linewidth | Line width for plots |
| save_json | ( | self, | |
| filename ) |
Create a JSON file containing a description of the mesh.
| filename | Path to create JSON file |
|
protected |
|
protected |
|
protected |
|
protected |
| boundary_reg = input_dict['boundary_reg'] |
| mesh = Mesh(self.regions,debug=debug,extra_reg_defs=self._extra_reg_defs,merge_thresh=merge_thresh) |
| dict reg_type_counts = input_dict['reg_type_counts'] |
| region_info = input_dict['region_info'] |
| list regions = [] |
| float rextent = input_dict['rextent'] |
| float rmax = input_dict['rmax'] |
| rpad = input_dict['rpad'] |
| zextents = input_dict['zextents'] |
| float zmax = input_dict['zmax'] |
| float zmin = input_dict['zmin'] |
| list zpad = input_dict['zpad'] |