LFSolver Object

This object is used to define the LF Frequency Domain (MQS or Fullwave) solver settings.

Methods

Reset

Resets all internal settings to their default values.

 

Accuracy (double accuracy)

Specifies the  accuracy of the solver.

 

AddFrequency (double frequency)

Defines a calculation frequency for the LF frequency domain solver.

 

EquationType (enum equationtype)

Specifies the used equation type.

equationtype(enum )

meaning

"Electroquasistatic"

The change of magnetic flux is neglected in Faraday's law of induction. This option is currently only available for the Tetrahedal mesh type.

"Magnetoquasistatic"

The electric displacement current will be neglected in ampere's law.

"Fullwave"

No time dependencies are neglected, but this option is usually the most time consuming one.

 

LSESolverType (enum solvertype)

Specifies which solver is used to solve linear systems of equations.

solvertype (enum )

meaning

"Auto"

choose direct or iterative solver automatically depending on the problem size

"Iterative"

use the iterative solver

"Direct"

use the direct solver

 

The default setting is "Auto". Since the problem is usually singular for the magnetoquasistatic equation type, the solvertype setting will be ignored in this case and the iterative solver will be used instead.

 

MaxLinIter (int  value)

The number of iterations performed by the linear solver is automatically limited by a number depending on the desired solver accuracy. This is equivalent to setting the value to "0". If you would like to prescribe a fixed upper limit for number of linear iterations, then specify the corresponding value here.

 

MeshAdaption (bool  enableAdaption)

Enables or disables the adaptive mesh refinement for the hexahedral mesh method.

 

Method (enum solvermethod)

Specifies the method used by the LF frequency domain solver for discretization and solution.

solvermethod (enum )

meaning

"Hexahedral Mesh"

structured grid consisting of hexahedral elements.

"Tetrahedral Mesh"

unstructured grid consisting of tetrahedral elements.

 

PECDefault (enum pectype)

Specifies how pec domains without source definition and electric boundary behave:

pectype (enum )

meaning

"Grounded"

treat all PEC domains as fixed potentials (default)

"Floating"

treat all PEC domains as floating potentialsr

(Supported only by electroquasistatic solver.)

 

ResetFrequencySettings

Resets all frequency settings.

 

SetLFPreconditionerAcceleration (enum precondtype)

Specifies the preconditioner used to solve linear systems of equations. Available options are:

precondtype (enum )

meaning

"Auto"

The preconditioner type is chosen automatically. Currently the Low Memory type will be used by default, but this might change with future versions.

"Accelerated"

A preconditioner which is suited well for structures with high mesh- and material-ratios. This method is more memory consuming, but might converge in situations where the Low Memory type does not converge.

"Low Memory"

This preconditioner type is very memory efficient and converges if mesh- and material- ratios are not very high.

 

StoreResultsInCache (bool  storeResults)

Activate to store calculation results in the result data cache.

 

TetAdaption(bool  enableAdaption)

Enables or diables the adaptive mesh refinement for the tetrahedral mesh method.

 

TetAdaptionAccuracy(double  accuracy)

If the relative deviation of the energy between two passes is smaller than this error limit the mesh adaptation will terminate.

 

TetAdaptionMaxCycles(int maxcycles)

Specifies the maximum number of passes to be performed for the mesh adaption, even if the results have not sufficiently converged so far. This setting is useful to limit the total calculation time to reasonable amounts.

This setting is considered only for the tetrahedral mesh method and ignored otherwise. For specification of hexahedral mesh adaption properties see MeshAdaption3D.

 

TetAdaptionMinCycles(int mincycles)

Sets the minimum number of passes which will be performed during the mesh adaption, even if the results do not change significantly. Sometimes the adaptive mesh refinement needs a couple of passes to figure out the location of the most important regions. Thus it might happen that the results change only marginally during the first few passes but afterwards change in order to converge to the final solution.

This setting is considered only for the tetrahedral mesh method and ignored otherwise. For specification of hexahedral mesh adaption properties see MeshAdaption3D.

 

TetAdaptionRefinementPercentage (double percent)

Sets the maximum percentage of mesh elements to be refined during a tetrahedral adaptation pass. The higher the specified percentage is, the stronger will the number of elements and therefore the numerical effort increase.

 

SnapToGeometry(bool  snapping)

When snapping is True, new nodes that are generated on the surface mesh during the mesh adaption will be projected to the original geometry, so that the approximation of curved surfaces is improved after each adaptation step.

If this option is disabled, the geometry will be approximated by the initial mesh. The geometric discretization error produced by this approximation will therefore not decrease, but the adaptation process might be faster.

 

TetSolverOrder (int tetorder)

This option allows to specify whether the tetrahedral solver uses first- or second-order accuracy. Second-order (tetorder = "2") is the default due to its higher accuracy. However, if the structure is geometrically complex and therefore comes along with huge memory requirements, first-order (tetorder = "1") is an adequate alternative.

This setting is considered only for the tetrahedral mesh method and ignored otherwise. For specification of hexahedral mesh adaption properties see MeshAdaption3D.

 

SetTreeCotreeGauging (bool  lfstabilization)

This settings is relevant for the EquationType "Magnetoquasistatic" only. If activated a special reduction scheme is used, which reduces the number of unknowns and leads to a better convergence of the solving process. Since the linear solver is very memory consuming in conjunction with this option, it is advisable to use it only for small- and medium-sized problems (in terms of degrees of freedom).

 

UseDistributedComputing (bool  useDC)

Enables or disables distributed computing.

 

UseFullWaveCalculation (bool  useFullWave)

Activates the fullwave matrix setup instead of the vectorpotential matrix setup. This setting is necessary in order to simulate problems where displacement currents are present.

 

UseMaxNumberOfThreads(bool  useMaxThreads)

By default (useMaxThreads = False), the solver is forced to employ a particular number of threads that is defined on the basis of the current processor’s architecture and the number of the available parallel licenses. If activated (useMaxThreads = True), the solver can be forced to use less than all available threads (see MaxNumberOfThreads).

 

MaxNumberOfThreads (int nThreads)

If the solver is to use less than all available threads (cf. UseMaxNumberOfThreads), the desired number can be specified here. The default value ”r;8” reflects the possibility of the modern processors architecture.

 

ValueScaling  (enum {"RMS", "Peak"})

This method allows to define the way in which low-frequency harmonic current or field sources are specified. If RMS is chosen, then all input values are considered to be the root-mean-square values. The Peak option can be used to specify the amplitude of sources directly.

 

Start long

Starts the LF frequency domain solver with the prescribed settings and the currently active mesh. If no mesh is available, a new mesh will be generated. Returns 0 if the solver run was successful, an error code >0 otherwise.

 

ContinueAdaption long

Starts the LF frequency domain solver with the prescribed settings and the currently active mesh. In case of the tetrahedral solver with adaptive mesh refinement, this command will continue the previous adaption run if the corresponding results are available. Otherwise this command is similar to the Start command. Returns 0 if the solver run was successful, an error code >0 otherwise.

Functions

GetCalculationFrequency  (int number)  double

Returns the calculation frequency at the given index number (0,1,2....NumberOfFrequencies-1).

 

GetCoilVoltageRe (double frequency, name coilname)  double

 Get the real part of the voltage value in Volt being measured at the frequency frequency on the coil with the name coilname .

 

GetCoilVoltageIm (double frequency, name coilname)  double

 Get the imaginary part of the voltage value in Volt being measured at the frequency frequency on the coil with the name coilname .

 

GetDatabaseResultDirName (double frequency)  filename

Get the result database directory for a certain run, which is accessed by its frequency (given as string or double value).

 

GetFirstFrequencyWithResult (string result_key)  string

Returns the first frequency from a list (sorted by double value) for which a result with the specified result_key exists. For example, result_key can be "Accuracy" or "Total Losses" or any other key which exists in the result data base. If result_key is empty, i.e. result_key="", this routine returns the first frequency for which any results are available.

If no such frequency is found, the return value will be "0.0".

The data type of the returned value is a string, because it may contain the name of a parameter. To get the corresponding double value of the returned frequency, use Eval(return_value).

 

GetNextFrequencyWithResult ( )  string

Requires an initialized list (sorted by double value) of frequencies for which certain results exist. This list is initialized by calling GetFirstFrequencyWithResult(...).

This function increases the "frequency counter" by one and returns the next frequency from this sorted list. The data type of the returned value is a string, because it may contain the name of a parameter. To get the corresponding double value of the returned frequency, use Eval(return_value).

If no further frequency with appropriate results is found, the return value will be "0.0".

 

GetNumberOfFrequenciesWithResult (string result_key)  int

Returns the number of frequencies for which a result with the specified result_key exists. For example, result_key can be "Accuracy" or "Total Losses" or any other key which exists in the result data base. If result_key is empty, i.e. result_key="", this routine returns the number of frequencies for which any results are available.

 

GetNumberOfFrequencies int

Returns the total number of defined frequencies in the LF Calculation Frequency dialog box.

 

GetEnergy (double frequency) double

Returns the total electromagnetic energy at the frequency frequency.

 

GetFrequencyIDFromString ( string frequency )

If the frequency passed as string to this routine has ever been used in this project, it has automatically been assigned to a unique number, a so-called id. This number will be returned and can be used as input for further functions. The frequency string can also be a parameter of the project. If the frequency string is unknown, the value -1 will be returned.

 

GetTotalLosses (double frequency)  double

Returns the total loss power in Watt at the frequency frequency.

 

GetTotalSurfaceLosses (double frequency)  double

Returns the total surface loss power in Watt at the frequency frequency. This value is calculated from all solids of type lossy metal.

 

GetVoltageSourceCurrentRe (double frequency, name voltagesourcename)  double

 Get the real part of the current on a voltage source named voltagesourcename in Ampere at the frequency frequency.

 

GetVoltageSourceCurrentIm (double frequency, name voltagesourcename)  double

 Get the imaginary part of the current on a voltage source named  voltagesourcename in Ampere at the frequency frequency.

 

GetVoltageSourceImpedanceRe (double frequency, name voltagesourcename)  double

 Get the real part of the impedance on a voltage source named voltagesourcename in Ohm at the frequency frequency.

 

GetVoltageSourceImpedanceIm (double frequency, name voltagesourcename)  double

 Get the imaginary part of the impedance on a voltage source named voltagesourcename in Ohm at the frequency frequency.

Default Values

Accuracy "1e-6"

Preconditioner "ILU"

UseFullWaveCalculation "False"

LSESolverType  "Auto"

MeshAdaption "False"

StoreResultsInCache "False"

ValueScaling "Peak"

UseMaxNumberOfThreads "False"

MaxNumberOfThreads "8"

Examples

With LFSolver

     .Reset

     .Accuracy "1e-6"

     .StoreResultsInCache "False"

     .Preconditioner "ILU"

     .MeshAdaption "False"

     .UseFullWaveCalculation "False"

     .LSESolverType "Auto"

End With