Vector Potential¶
cfsem.vector_potential_circular_filament ¶
vector_potential_circular_filament(
ifil: NDArray[float64],
rfil: NDArray[float64],
zfil: NDArray[float64],
rprime: NDArray[float64],
zprime: NDArray[float64],
par: bool = True,
) -> NDArray[float64]
Vector potential contributions from some circular filaments to some observation points. Off-axis A_phi component for a circular current filament in vacuum.
The vector potential of a loop has zero r- and z- components due to symmetry, and does not vary in the phi-direction.
Note that to recover the B-field as the curl of A, the curl operator for cylindrical coordinates must be used with the output of this function incorporated into a full 3D A-field like [A_r, A_phi, A_z].
References
[1] J. C. Simpson, J. E. Lane, C. D. Immer, R. C. Youngquist, and T. Steinrock, “Simple Analytic Expressions for the Magnetic Field of a Circular Current Loop,” Jan. 01, 2001. Accessed: Sep. 06, 2022. [Online]. Available: https://ntrs.nasa.gov/citations/20010038494
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ifil
|
NDArray[float64]
|
[A] filament current |
required |
rfil
|
NDArray[float64]
|
[m] filament R-coord |
required |
zfil
|
NDArray[float64]
|
[m] filament Z-coord |
required |
rprime
|
NDArray[float64]
|
[m] Observation point R-coord |
required |
zprime
|
NDArray[float64]
|
[m] Observation point Z-coord |
required |
par
|
bool
|
Whether to use CPU parallelism |
True
|
Returns:
| Type | Description |
|---|---|
NDArray[float64]
|
[Wb/m] or [V-s/m] a_phi, vector potential in the toroidal direction |
Source code in cfsem/bindings.py
cfsem.vector_potential_linear_filament ¶
vector_potential_linear_filament(
xyzp: Array3xN,
xyzfil: Array3xN,
dlxyzfil: Array3xN,
ifil: NDArray[float64],
wire_radius: float | NDArray[float64] = 0.0,
par: bool = True,
output: Literal["vector", "matrix"] = "vector",
) -> tuple[
NDArray[float64], NDArray[float64], NDArray[float64]
]
Vector potential calculation for A-field contribution from many current filament segments to many observation points.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
xyzp
|
Array3xN
|
[m] x,y,z coords of observation points |
required |
xyzfil
|
Array3xN
|
[m] x,y,z coords of filament segment start points |
required |
dlxyzfil
|
Array3xN
|
[m] x,y,z deltas from segment start to segment end |
required |
ifil
|
NDArray[float64]
|
[A] current in each filament segment |
required |
wire_radius
|
float | NDArray[float64]
|
[m] filament radius, scalar or array of length |
0.0
|
par
|
bool
|
Whether to use CPU parallelism |
True
|
output
|
Literal['vector', 'matrix']
|
|
'vector'
|
Returns:
| Type | Description |
|---|---|
NDArray[float64]
|
[Wb/m] or [V-s/m] (Ax, Ay, Az) magnetic vector potential at observation points, |
NDArray[float64]
|
or explicit |
Source code in cfsem/bindings.py
cfsem.vector_potential_triangle_mesh ¶
vector_potential_triangle_mesh(
obs: NDArray[float64],
nodes: NDArray[float64],
triangles: NDArray[int64],
s: NDArray[float64],
par: bool = True,
quad: str = "dunavant3",
) -> Array3xN
Vector potential calculation for A-field contribution from a triangle mesh with one stream-function value per node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
obs
|
NDArray[float64]
|
[m] observation points with shape |
required |
nodes
|
NDArray[float64]
|
[m] mesh node coordinates with shape |
required |
triangles
|
NDArray[int64]
|
node indices with shape |
required |
s
|
NDArray[float64]
|
[A] nodal stream-function values with shape |
required |
par
|
bool
|
Whether to use CPU parallelism |
True
|
quad
|
str
|
Triangle quadrature rule, one of |
'dunavant3'
|
Returns:
| Type | Description |
|---|---|
Array3xN
|
[Wb/m] or [V-s/m] (Ax, Ay, Az) magnetic vector potential at observation points |
Source code in cfsem/bindings.py
cfsem.vector_potential_point_segment ¶
vector_potential_point_segment(
xyzp: Array3xN,
xyzfil: Array3xN,
dlxyzfil: Array3xN,
ifil: NDArray[float64],
par: bool = True,
) -> Array3xN
Vector potential calculation for A-field contribution from many filament segments to many observation points, treating each segment as a point source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
xyzp
|
Array3xN
|
[m] x,y,z coords of observation points |
required |
xyzfil
|
Array3xN
|
[m] x,y,z coords of filament segment start points |
required |
dlxyzfil
|
Array3xN
|
[m] x,y,z deltas from segment start to segment end |
required |
ifil
|
NDArray[float64]
|
[A] current in each filament segment |
required |
par
|
bool
|
Whether to use CPU parallelism |
True
|
Returns:
| Type | Description |
|---|---|
Array3xN
|
[Wb/m] or [V-s/m] (Ax, Ay, Az) magnetic vector potential at observation points |