essos.surfaces

Attributes

mesh

sharding

Classes

SurfaceRZFourier

SurfaceClassifier

Takes in a toroidal surface and constructs an interpolant of the signed distance function

Functions

B_on_surface(surface, field)

BdotN(surface, field)

BdotN_over_B(surface, field)

nested_lists_to_array(ll)

Convert a ragged list of lists to a 2D jnp array. Any entries

signed_distance_from_surface_jax(xyz, surface)

Compute the signed distances from points xyz to a surface. The sign is

signed_distance_from_surface_extras(xyz, surface)

Compute the signed distances from points xyz to a surface. The sign is

Module Contents

essos.surfaces.mesh
essos.surfaces.sharding
essos.surfaces.B_on_surface(surface, field)
essos.surfaces.BdotN(surface, field)
essos.surfaces.BdotN_over_B(surface, field)
essos.surfaces.nested_lists_to_array(ll)

Convert a ragged list of lists to a 2D jnp array. Any entries that are None are replaced by 0. This routine is useful for parsing fortran namelists that include 2D arrays using f90nml.

Parameters:

ll – A list of lists to convert.

class essos.surfaces.SurfaceRZFourier(vmec=None, s=1, ntheta=30, nphi=30, close=True, range_torus='full torus', rc=None, zs=None, nfp=None)
ntheta = 30
nphi = 30
range_torus = 'full torus'
quadpoints_theta = None
quadpoints_phi = None
num_dofs_rc
num_dofs_zs
_dofs
angles
property dofs
_set_gamma(rmnc_interp, zmns_interp)
_set_AbsB()
property gamma
property gammadash_theta
property gammadash_phi
property normal
property unitnormal
property AbsB
property x
plot(ax=None, show=True, close=False, axis_equal=True, **kwargs)
to_vtk(filename, extra_data=None, field=None)
to_vmec(filename)

Generates a fortran namelist file containing the RBC/RBS/ZBC/ZBS coefficients, in the form used in VMEC and SPEC input files. The result will be returned as a string. For saving a file, see the write_nml() function.

mean_cross_sectional_area()
class essos.surfaces.SurfaceClassifier(surface, h=0.05)

Takes in a toroidal surface and constructs an interpolant of the signed distance function \(f:R^3 o R\) that is positive inside the volume contained by the surface, (approximately) zero on the surface, and negative outisde the volume contained by the surface.

zrange
rrange
dist
evaluate_xyz(xyz)
evaluate_rphiz(rphiz)
essos.surfaces.signed_distance_from_surface_jax(xyz, surface)

Compute the signed distances from points xyz to a surface. The sign is positive for points inside the volume surrounded by the surface.

essos.surfaces.signed_distance_from_surface_extras(xyz, surface)

Compute the signed distances from points xyz to a surface. The sign is positive for points inside the volume surrounded by the surface.