java.lang.Object
simpa.core.api.CurrentLoop
Current loop. It can be used to create field maps if the distribution of the
currents are known, for example a solenoid coil without iron.
-
Constructor Summary
ConstructorsConstructorDescriptionCurrentLoop
(double radius, int nPoints, double current) Constructs a circular loop lying in the X Y plane centered (0,0,0).CurrentLoop
(ArrayList<org.apache.commons.math3.geometry.euclidean.threed.Vector3D> loopPoints, double current) Constructor for arbitrary shape 3D current loop given by the vertices of the loop. -
Method Summary
Modifier and TypeMethodDescriptiondouble
ArrayList
<org.apache.commons.math3.geometry.euclidean.threed.Vector3D> getPointSources
(Quadrature1D quadrature, int subdivisions) This method gives a list of CurrentPointSources approximating the wire segments in the current loop.void
setCurrent
(double current) static CurrentLoop
transform
(CurrentLoop loop, org.apache.commons.math3.geometry.euclidean.threed.Rotation rot, org.apache.commons.math3.geometry.euclidean.threed.Vector3D translation) Get a copy with the given transformations applied.void
writeToFile
(String file, Quadrature1D quadrature, int subdivisions) Write the the current point sources approximating this current loop.
-
Constructor Details
-
CurrentLoop
public CurrentLoop(ArrayList<org.apache.commons.math3.geometry.euclidean.threed.Vector3D> loopPoints, double current) Constructor for arbitrary shape 3D current loop given by the vertices of the loop.- Parameters:
loopPoints
- List of vertices of the loop.current
- Current of the loop.
-
CurrentLoop
public CurrentLoop(double radius, int nPoints, double current) Constructs a circular loop lying in the X Y plane centered (0,0,0).- Parameters:
radius
- Radius of the loop.nPoints
- Number of vertices in the loop.current
- Current of the loop.
-
-
Method Details
-
transform
public static CurrentLoop transform(CurrentLoop loop, org.apache.commons.math3.geometry.euclidean.threed.Rotation rot, org.apache.commons.math3.geometry.euclidean.threed.Vector3D translation) Get a copy with the given transformations applied.- Parameters:
loop
- The loop to be transformed.rot
- Rotation to be applied before the translationtranslation
- Translation applied after the rotation.- Returns:
- The transformed copy of the original loop.
-
getCurrent
public double getCurrent()- Returns:
- The current of the loop.
-
setCurrent
public void setCurrent(double current) - Parameters:
current
- The current of the loop.
-
getPointSources
This method gives a list of CurrentPointSources approximating the wire segments in the current loop. We use the approximation for the solid harmonic expansion instead of the exact formula, because it allows to use the FMM method for summation and we can treat all sources the same way, it is also much faster for a large number of evaluation points.- Parameters:
quadrature
- Quadrature to be used for the approximation of a subdivision of the wires segment of the loop.subdivisions
- If bigger than 1, each wire will be split into subdivisions. This increases the precision of the calculation.- Returns:
- List of current point sources.
-
getLoopPoints
- Returns:
- List of vertices of the loop.
-
writeToFile
Write the the current point sources approximating this current loop.- Parameters:
file
- The file to be written.quadrature
- Quadratura points for each wire segment of the loop. The current point sources are placed to these points.subdivisions
- To increase the precision of the approximation, the wire segments can be sub-divided. Usually 1..5 is enough.
-