jax_sbgeom.coils.coil_meshing module

mesh_coil_surface(coil: FiniteSizeCoil, n_s: int, width_radial: float, width_phi: float)[source]

Mesh the surface of a coil using a defined number of samples and coil width.

Parameters:
  • coil (FiniteSizeCoil) – Coil to mesh

  • n_s (int) – Number of samples along the coil

  • width_radial (float) – Radial width of the finite sized coil

  • width_phi (float) – Toroidal width of the finite sized coil

Returns:

  • jnp.ndarray – Vertices of the meshed coil surface

  • jnp.ndarray – Connectivity array of the meshed coil surface

mesh_coilset_surface(coils: FiniteSizeCoilSet, n_s: int, width_radial: float, width_phi: float)[source]

Mesh the surface of a coilset

The coils vertices are originally: [n_coils, n_s, 4, 3] (4 lines per coil)

The coils connectivity is originally: [n_coils, n_s, 4, 2, 3] (4 lines per coil, 2 triangles per quad) Both are reshaped to (-1,3) to facilate easier post processing.

Parameters:
  • coil (Coil) – Coil to mesh

  • n_s (int) – Number of samples along the coil

  • width_radial (float) – Radial width of the finite sized coil

  • width_phi (float) – Toroidal width of the finite sized coil

Returns:

  • jnp.ndarray – Vertices of the meshed coil surface

  • jnp.ndarray – Connectivity array of the meshed coil surface

mesh_coil_volumetric(coil: FiniteSizeCoil, n_s: int, n_grid: int, width_radial: float, width_phi: float)[source]

Mesh the volume of a coil using a defined number of samples and coil width.

Parameters:
  • coil (FiniteSizeCoil) – Coil to mesh

  • n_s (int) – Number of samples along the coil

  • n_grid (int) – Number of grid points in the radial and toroidal directions

  • width_radial (float) – Radial width of the finite sized coil

  • width_phi (float) – Toroidal width of the finite sized coil

Returns:

  • jnp.ndarray – Vertices of the meshed coil volume

  • jnp.ndarray – Connectivity array of the meshed coil volume (tetrahedra)