Module traceon_pro.solver
Functions
def solve_direct(excitation)
-
Solve for the charges on the surface of the geometry by using a direct method and taking into account the specified excitation.
Parameters
excitation
:Excitation
- The excitation that produces the resulting field.
Returns
def solve_direct_superposition(excitation)
-
When using superposition multiple fields are computed at once. Each field corresponds with a unity excitation (1V or 1A) of an electrode that was assigned a non-zero fixed voltage (or current) value. This is useful when a geometry needs to be analyzed for many different voltage (or current) settings. In this case taking a linear superposition of the returned fields allows to select a different voltage 'setting' without inducing any computational cost. There is no computational cost involved in using
superposition=True
since a direct solver is used which easily allows for multiple right hand sides (the matrix does not have to be inverted multiple times). However, position dependent voltages are invalid in the superposition process.Parameters
excitation
:Excitation
- The excitation that produces the resulting field.
Returns
Dictionary of str to
Field
. Each key is the name of an electrode on which a voltage (or current) was applied, the corresponding values are the fields. def solve_fmm(excitation, N_max=256, l_max=12)
-
Solve for the charges on the surface of the geometry by using a fast multipole method (FMM) and taking into account the specified excitation. The FMM works by diving the geometry up into boxes, and using approximation formulas to compute the potential interaction of elements that are 'far apart'.
Parameters
excitation
:Excitation
- The excitation that produces the resulting field.
N_max
:int
- The maximum number of triangles to put into every box when dividing up the geometry. A larger number usually improves accuracy (and sometimes performance) but increases memory usage.
l_max
:int
- The order of the multipole expansions used to compute the far-away interactions. A larger number improves accuracy but increases the solve time.
Returns
def solve_fmm_superposition(excitation, N_max=256, l_max=12)
-
When using superposition multiple fields are computed. Each field corresponds with a unity excitation (1V or 1A) of an electrode that was assigned a non-zero fixed voltage (or current) value. This is useful when a geometry needs to be analyzed for many different voltage (or current) settings. In this case taking a linear superposition of the returned fields allows to select a different voltage 'setting' without inducing any computational cost. Note that unlike the direct method the fast multipole method (FMM) uses an iterative solver and therefore needs to redo the entire solve step for every unity excitation.
Parameters
excitation
:Excitation
- The excitation that produces the resulting field.
N_max
:int
- The maximum number of triangles to put into every box when dividing up the geometry. A larger number usually improves accuracy (and sometimes performance) but increases memory usage.
l_max
:int
- The order of the multipole expansions used to compute the far-away interactions. A larger number improves accuracy but increases the solve time.
Returns
Dictionary of str to
Field
. Each key is the name of an electrode on which a voltage (or current) was applied, the corresponding values are the fields.