CSPropExcitation

class CSXCAD.CSProperties.CSPropExcitation

Bases: CSProperties

Excitation property

An excitation property is defined to define the (field) sources.

Depending on the EM modeling tool there exist different excitation types with different meanings.

Parameters:
  • exc_type – int – excitation type (see SetExcitation)

  • exc_val – (3,) array like – set the excitation vector

  • delay – float – excitation delay in seconds

GetDelay()
GetEnabled()

Get enable/disable state of the excitation

GetExcitType()

Get the excitation type.

Returns:

int – excitation type (see above)

GetExcitation()
Returns:

(3,) array – excitation vector

GetFrequency()
GetPropagationDir()

Get the propagation direction, e.g. of a plane wave excitation

Returns:

(3,) array – propagation vector

GetWeightFile() str
GetWeightFunction()

Get the weigthing function for the excitation.

Returns:

3 element list of strings

GetWeightOrigin() [float, float, float]
GetWeightedExcitation(ny, coords)

Evaluate the weighted excitation amplitude for component ny at the given coordinates, combining excitation vector, weight function, and mode file (if set).

Parameters:
  • ny – int – field component (0=x, 1=y, 2=z)

  • coords – (3,) array – Cartesian coordinates [x, y, z]

Returns:

float

SetDelay(val)

Set signal delay for this property.

Parameters:

val – float – Signal delay

SetEnabled(val)

Enable/Disable the excitation

SetExcitType(val)
Parameters:

val – int – excitation type (see above)

SetExcitation(val)

openEMS excitation types:

  • 0 : E-field soft excitation

  • 1 : E-field hard excitation

  • 2 : H-field soft excitation

  • 3 : H-field hard excitation

  • 10 : plane wave excitation

Parameters:

val – (3,) array – excitation vector

SetFrequency(val)

Frequency for numerical phase velocity compensation (optional)

Parameters:

val – float – Frequency

SetPropagationDir(val)

Set the propagation direction, e.g. for a plane wave excitation

Parameters:

val – (3,) array – propagation vector

SetWeightFile(fileName)

Set an HDF5 file as the spatial weight profile for this excitation (alternative to SetWeightFunction). The file must contain datasets /x, /y (axis vectors) and /Vx, /Vy (transverse field components, shape nx x ny).

Parameters:

fileName – str – path to the HDF5 weight file

SetWeightFunction(func)

Set the weigthing function for the excitation.

SetWeightOrigin(origin)

Set the coordinate origin used when evaluating the weight function or weight file. Coordinates are shifted by this offset before evaluation, so the weight can be defined relative to a port corner (0,0,0) rather than the global simulation origin.

Parameters:

origin – (3,) array – [x, y, z] in drawing units