essos.coils

Classes

Curves

Class to store the curves

Curves_from_simsopt

Class to store the curves

Coils

Class to store the curves

Coils_from_json

Class to store the curves

Coils_from_simsopt

Class to store the curves

Functions

compute_curvature(gammadash, gammadashdash)

CreateEquallySpacedCurves(→ jax.numpy.ndarray)

RotatedCurve(curve, phi, flip)

apply_symmetries_to_curves(base_curves, nfp, stellsym)

apply_symmetries_to_currents(base_currents, nfp, stellsym)

Module Contents

essos.coils.compute_curvature(gammadash, gammadashdash)
class essos.coils.Curves(dofs: jax.numpy.ndarray, n_segments: int = 100, nfp: int = 1, stellsym: bool = True)

Class to store the curves

Fourier Coefficients of the independent curves

type:

jnp.ndarray - shape (n_indcurves, 3, 2*order+1)

n_segments

Number of segments to discretize the curves

Type:

int

nfp

Number of field periods

Type:

int

stellsym

Stellarator symmetry

Type:

bool

order

Order of the Fourier series

Type:

int

curves jnp.ndarray - shape

Curves obtained by applying rotations and flipping corresponding to nfp fold rotational symmetry and optionally stellarator symmetry

Type:

n_indcurves*nfp*(1+stellsym), 3, 2*order+1)

gamma

Discretized curves

Type:

jnp.array - shape (n_coils, n_segments, 3)

gamma_dash

Discretized curves derivatives

Type:

jnp.array - shape (n_coils, n_segments, 3)

_dofs
_n_segments = 100
_nfp = 1
_stellsym = True
_order
_curves
quadpoints = None
__str__()
__repr__()
_tree_flatten()
classmethod _tree_unflatten(aux_data, children)
_set_gamma()
property dofs
property curves
property order
property n_segments
property nfp
property stellsym
property gamma
property gamma_dash
property gamma_dashdash
property length
property curvature
__len__()
__getitem__(key)
__add__(other)
__contains__(other)
__eq__(other)
__ne__(other)
__iter__()
__next__()
save_curves(filename: str)

Save the curves to a file

to_simsopt()
plot(ax=None, show=True, plot_derivative=False, close=False, axis_equal=True, **kwargs)
to_vtk(filename: str, close: bool = True, extra_data=None)
class essos.coils.Curves_from_simsopt(simsopt_curves, nfp=1, stellsym=True)

Bases: Curves

Class to store the curves

Fourier Coefficients of the independent curves

type:

jnp.ndarray - shape (n_indcurves, 3, 2*order+1)

n_segments

Number of segments to discretize the curves

Type:

int

nfp

Number of field periods

Type:

int

stellsym

Stellarator symmetry

Type:

bool

order

Order of the Fourier series

Type:

int

curves jnp.ndarray - shape

Curves obtained by applying rotations and flipping corresponding to nfp fold rotational symmetry and optionally stellarator symmetry

Type:

n_indcurves*nfp*(1+stellsym), 3, 2*order+1)

gamma

Discretized curves

Type:

jnp.array - shape (n_coils, n_segments, 3)

gamma_dash

Discretized curves derivatives

Type:

jnp.array - shape (n_coils, n_segments, 3)

class essos.coils.Coils(curves: Curves, currents: jax.numpy.ndarray)

Bases: Curves

Class to store the curves

Fourier Coefficients of the independent curves

type:

jnp.ndarray - shape (n_indcurves, 3, 2*order+1)

n_segments

Number of segments to discretize the curves

Type:

int

nfp

Number of field periods

Type:

int

stellsym

Stellarator symmetry

Type:

bool

order

Order of the Fourier series

Type:

int

curves jnp.ndarray - shape

Curves obtained by applying rotations and flipping corresponding to nfp fold rotational symmetry and optionally stellarator symmetry

Type:

n_indcurves*nfp*(1+stellsym), 3, 2*order+1)

gamma

Discretized curves

Type:

jnp.array - shape (n_coils, n_segments, 3)

gamma_dash

Discretized curves derivatives

Type:

jnp.array - shape (n_coils, n_segments, 3)

_currents_scale
_dofs_currents
_currents
__str__()
__repr__()
property dofs_curves
property dofs_currents
property currents_scale
property x
property currents
__getitem__(key)
__add__(other)
__contains__(other)
__eq__(other)
__ne__(other)
_tree_flatten()
save_coils(filename: str, text='')

Save the coils to a file

to_simsopt()
to_json(filename: str)
class essos.coils.Coils_from_json(filename: str)

Bases: Coils

Class to store the curves

Fourier Coefficients of the independent curves

type:

jnp.ndarray - shape (n_indcurves, 3, 2*order+1)

n_segments

Number of segments to discretize the curves

Type:

int

nfp

Number of field periods

Type:

int

stellsym

Stellarator symmetry

Type:

bool

order

Order of the Fourier series

Type:

int

curves jnp.ndarray - shape

Curves obtained by applying rotations and flipping corresponding to nfp fold rotational symmetry and optionally stellarator symmetry

Type:

n_indcurves*nfp*(1+stellsym), 3, 2*order+1)

gamma

Discretized curves

Type:

jnp.array - shape (n_coils, n_segments, 3)

gamma_dash

Discretized curves derivatives

Type:

jnp.array - shape (n_coils, n_segments, 3)

class essos.coils.Coils_from_simsopt(simsopt_coils, nfp=1, stellsym=True)

Bases: Coils

Class to store the curves

Fourier Coefficients of the independent curves

type:

jnp.ndarray - shape (n_indcurves, 3, 2*order+1)

n_segments

Number of segments to discretize the curves

Type:

int

nfp

Number of field periods

Type:

int

stellsym

Stellarator symmetry

Type:

bool

order

Order of the Fourier series

Type:

int

curves jnp.ndarray - shape

Curves obtained by applying rotations and flipping corresponding to nfp fold rotational symmetry and optionally stellarator symmetry

Type:

n_indcurves*nfp*(1+stellsym), 3, 2*order+1)

gamma

Discretized curves

Type:

jnp.array - shape (n_coils, n_segments, 3)

gamma_dash

Discretized curves derivatives

Type:

jnp.array - shape (n_coils, n_segments, 3)

essos.coils.CreateEquallySpacedCurves(n_curves: int, order: int, R: float, r: float, n_segments: int = 100, nfp: int = 1, stellsym: bool = False) jax.numpy.ndarray
essos.coils.RotatedCurve(curve, phi, flip)
essos.coils.apply_symmetries_to_curves(base_curves, nfp, stellsym)
essos.coils.apply_symmetries_to_currents(base_currents, nfp, stellsym)