FarfieldSource Object

Use this object to define a farfield as a source for the simulation. The field source can be used to excite a single simulation.

Methods

Reset

Resets the object.

 

Name ( string name )

Sets the name of the farfield source.

 

Id( int id )

Sets a unique identifier for the imported farfield source data. Therefore farfield sources pointing to the same imported data (e.g. created via transform and copy) share the same id. Please use GetNextId to retrieve a free id.

 

SetPosition ( double x, double y, double z )

Specifies the position for the point source.

 

SetPhi0XYZ (double x, double y, double z )

SetTheta0XYZ (double x, double y, double z )

Set new origin vectors in global cartesian coordinates for the x'-axis and z'axis. The x'axis defines the new start of the angle phi, the z'-axis defines the new start of the angle theta. Therefore SetPhi0 is used to set the new x'-axis, SetTheta0 to set the new z'-axis. The resulting vectors will be normalized to 1. The x'-axis will be orthogonalized to the z'-axis. Please make sure that the axes are not parallel and that the vectors do not have zero length. The y'-axis will be determined automatically.

Please note: x, y, and z must be double values here. Any expression is not allowed.

 

Import ( string name )

name specifies the source file and path.

Note: The import is currently only available for files containing version and frequency information. Please see below for an example import file. Files can be created by the FarfieldPlot Object-method ASCIIExportAsSource(...) from any MWS farfield calculation.

 

UseCopyOnly ( bool flag )

The farfield source file is copied once into the project folder. Hence changes of the originally imported file do not affect the defined farfield source.

 

UseMultipoleFFS ( bool flag )

This option enables the calculation of the multiple coefficients for the farfield source. For the simulation the farfield representation by the multipole coefficients will be used. It is recommended to use this option if the farfield source is positioned relatively close to the defined structure.

 

SetAlignmentType( enum type )

Specifies the alignment and positioning of the farfield source. The following types are available:

"user"

The farfield source position and orientation are defined via SetPosition, SetPhi0 and SetTheta0.

"currentwcs"

 

The farfield source is aligned with the current wcs at the time of the source definition.

"sourcefile"

The farfield source position and orientation are read from the specified source file.

 

SetMultipoleDegree ( integer degree )

Sets a user defined degree of the multipole expansion to guide the calculation. Its effect depends on the specified calculation mode.

 

SetMultipoleCalcMode( enum mode )

Defines the strategy used to determine the maximal degree of the multipole expansion. Three modes are available:

"automatic"

The maximal degree is automatically derived from the estimated discretization error of the farfield.

"user defined"

The value set by SetMultipoleDegree is used.

"autotruncation"

The value set by SetMultipoleDegree is used as a starting value to guide the automatic calculation.

 

Store

Activates the import, which has to be previously specified using the described methods.

 

Delete

Deletes the farfield source specified by Name

 

DeleteAll

Removes all farfield sources

 

GetNextId integer

Returns the next free unique ID to for a new farfield source.

Example

Example for using the VBA object:

' Define a FarfieldSource

With FARFIELDSOURCE

.Reset

.Name "ffs1"

.Id "1"

.UseCopyOnly "true"

.Setposition "1.",  "1.",  "1."

.SetTheta0 "0.",  "0.",  "1."

.SetPhi0 "1.",  "0.",  "0."

.Import "example.txt"

.UseMultipoleFFS "false"

.SetAlignmentType "user"

.SetMultipoleDegree "10"

.SetMultipoleCalcMode "automatic"

.Store

End With