BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
pancake.spiral.PlanarSpiral Class Reference
Inheritance diagram for pancake.spiral.PlanarSpiral:
[legend]
Collaboration diagram for pancake.spiral.PlanarSpiral:
[legend]

Public Member Functions

 __init__ (self, sp.Symbol theta, xexpr, yexpr, float pitch, float nturns, float theta0=0.0, int sense=+1, int nodes_per_turn=64)
np.ndarray derivs_theta (self, float theta)
np.ndarray base_point (self, float theta)
np.ndarray outward_normal (self, float theta)
np.ndarray point_theta (self, float theta)
float speed_theta (self, float theta)
float s_of_theta (self, float theta)
float theta_of_s (self, float s)
float theta (self, float s)
np.ndarray r (self, float s)
np.ndarray v (self, float s)
np.ndarray a (self, float s)
np.ndarray b (self, float s)
float speed (self, float s)
float segment_length (self, float ta, float tb, int nsub=1)
float length (self)
np.ndarray equidistant (self, int n)
 frame (self, float s)
 curvatures (self, float s)
float signed_curvature (self, float s)
float turn_gap (self, float theta)
Public Member Functions inherited from pancake.basecurve.Basecurve
 __init__ (self, float tmin=0.0, float tmax=1.0)
np.ndarray sample (self, int n)
 kappa_tau (self, float t)
 twisted_frame (self, float t, float theta_T=0.0)
np.ndarray transform (self, float t, float theta_T=0.0)
 strip_curvatures (self, float t, float theta_T=0.0, float dtheta_T_ds=0.0)
np.ndarray darboux (self, float t)

Public Attributes

 pitch = float(pitch)
 nturns = float(nturns)
 theta0 = float(theta0)
float theta1 = self.theta0 + 2.0 * math.pi * self.nturns
 sense = int(sense)
Public Attributes inherited from pancake.basecurve.Basecurve
 tmin = float(tmin)
 tmax = float(tmax)
np.ndarray t = None

Protected Member Functions

float _gl_length (self, float ta, float tb)
 _eval (self, float s)
Protected Member Functions inherited from pancake.basecurve.Basecurve
int _nsub_default (self)

Protected Attributes

float _theta_sym = theta
list _fun = [sp.lambdify(theta, [ex, ey], modules="numpy", cse=True) for ex, ey in exprs]
 _base_fun = sp.lambdify(theta, [xexpr, yexpr], modules="numpy")
 _normal_fun = sp.lambdify(theta, [dy / nrm, -dx / nrm], modules="numpy")
 _theta_nodes = np.linspace(self.theta0, self.theta1, m + 1)
 _s_nodes = np.zeros(m + 1)
 _cache_s = None
 _cache_val = None

Detailed Description

Offset spiral r = c + delta nu of a symbolic base curve c(theta) = (xexpr, yexpr).

Constructor & Destructor Documentation

◆ __init__()

pancake.spiral.PlanarSpiral.__init__ ( self,
sp.Symbol theta,
xexpr,
yexpr,
float pitch,
float nturns,
float theta0 = 0.0,
int sense = +1,
int nodes_per_turn = 64 )

Member Function Documentation

◆ _eval()

pancake.spiral.PlanarSpiral._eval ( self,
float s )
protected
(theta, r, T, dT/ds, d2T/ds2) at arc length s (cached for the last s).

◆ _gl_length()

float pancake.spiral.PlanarSpiral._gl_length ( self,
float ta,
float tb )
protected

◆ a()

np.ndarray pancake.spiral.PlanarSpiral.a ( self,
float s )

Reimplemented from pancake.basecurve.Basecurve.

◆ b()

np.ndarray pancake.spiral.PlanarSpiral.b ( self,
float s )

Reimplemented from pancake.basecurve.Basecurve.

◆ base_point()

np.ndarray pancake.spiral.PlanarSpiral.base_point ( self,
float theta )

◆ curvatures()

pancake.spiral.PlanarSpiral.curvatures ( self,
float t )
Curvature parameters (tau, kappa_g, kappa_n) of the frame returned by `frame`.

For the Frenet frame this is (tau, 0, kappa), Eq. (3.30).

Reimplemented from pancake.basecurve.Basecurve.

◆ derivs_theta()

np.ndarray pancake.spiral.PlanarSpiral.derivs_theta ( self,
float theta )
Array (4, 3): position and theta-derivatives 1..3 of the spiral at theta.

◆ equidistant()

np.ndarray pancake.spiral.PlanarSpiral.equidistant ( self,
int n )
Parameters t_0..t_{n-1} such that the arc length between neighbours is constant.

Reimplemented from pancake.basecurve.Basecurve.

◆ frame()

pancake.spiral.PlanarSpiral.frame ( self,
float t )
Strip frame (T, n, b).  Default: Frenet frame (T, N, B), Eq. (3.29).

Reimplemented from pancake.basecurve.Basecurve.

◆ length()

float pancake.spiral.PlanarSpiral.length ( self)

Reimplemented from pancake.basecurve.Basecurve.

◆ outward_normal()

np.ndarray pancake.spiral.PlanarSpiral.outward_normal ( self,
float theta )

◆ point_theta()

np.ndarray pancake.spiral.PlanarSpiral.point_theta ( self,
float theta )

◆ r()

np.ndarray pancake.spiral.PlanarSpiral.r ( self,
float s )

Reimplemented from pancake.basecurve.Basecurve.

◆ s_of_theta()

float pancake.spiral.PlanarSpiral.s_of_theta ( self,
float theta )
Arc length from the start of the spiral to the point at theta.

◆ segment_length()

float pancake.spiral.PlanarSpiral.segment_length ( self,
float ta,
float tb,
int nsub = 1 )
Arc length between ta and tb by composite 7-point Gauss-Legendre.

Reimplemented from pancake.basecurve.Basecurve.

◆ signed_curvature()

float pancake.spiral.PlanarSpiral.signed_curvature ( self,
float s )

◆ speed()

float pancake.spiral.PlanarSpiral.speed ( self,
float s )

Reimplemented from pancake.basecurve.Basecurve.

◆ speed_theta()

float pancake.spiral.PlanarSpiral.speed_theta ( self,
float theta )

◆ theta()

float pancake.spiral.PlanarSpiral.theta ( self,
float s )

◆ theta_of_s()

float pancake.spiral.PlanarSpiral.theta_of_s ( self,
float s )
Inverse of s_of_theta by Newton iteration on the arc-length table.

◆ turn_gap()

float pancake.spiral.PlanarSpiral.turn_gap ( self,
float theta )
Normal distance between the turn at theta and the next turn (theta + 2 pi).

Measured along the outward normal of the base curve; equals the pitch up to
second order in pitch / (2 pi R).

◆ v()

np.ndarray pancake.spiral.PlanarSpiral.v ( self,
float s )

Reimplemented from pancake.basecurve.Basecurve.

Member Data Documentation

◆ _base_fun

pancake.spiral.PlanarSpiral._base_fun = sp.lambdify(theta, [xexpr, yexpr], modules="numpy")
protected

◆ _cache_s

pancake.spiral.PlanarSpiral._cache_s = None
protected

◆ _cache_val

pancake.spiral.PlanarSpiral._cache_val = None
protected

◆ _fun

list pancake.spiral.PlanarSpiral._fun = [sp.lambdify(theta, [ex, ey], modules="numpy", cse=True) for ex, ey in exprs]
protected

◆ _normal_fun

pancake.spiral.PlanarSpiral._normal_fun = sp.lambdify(theta, [dy / nrm, -dx / nrm], modules="numpy")
protected

◆ _s_nodes

pancake.spiral.PlanarSpiral._s_nodes = np.zeros(m + 1)
protected

◆ _theta_nodes

pancake.spiral.PlanarSpiral._theta_nodes = np.linspace(self.theta0, self.theta1, m + 1)
protected

◆ _theta_sym

float pancake.spiral.PlanarSpiral._theta_sym = theta
protected

◆ nturns

pancake.spiral.PlanarSpiral.nturns = float(nturns)

◆ pitch

pancake.spiral.PlanarSpiral.pitch = float(pitch)

◆ sense

pancake.spiral.PlanarSpiral.sense = int(sense)

◆ theta0

pancake.spiral.PlanarSpiral.theta0 = float(theta0)

◆ theta1

pancake.spiral.PlanarSpiral.theta1 = self.theta0 + 2.0 * math.pi * self.nturns

The documentation for this class was generated from the following file: