FDTD, MODE
farfieldsettings - Script command
Sets the parameters available in the Far field settings window for far field calculations. To get the available parameters for far field settings, as is shown below, right click on a frequency-domain field monitor and visualize the far field. then select the Far field settings.
|
Syntax |
Description |
---|---|
farfieldsettings("property", value); |
Set the far field filter settings for far field calculations. These settings are applied to all far field projections. Value can be a number or string. This function does not return any data. |
Example
farfieldsettings("far field filter",0.2);farfieldsettings("override near field mesh",1); farfieldsettings("near field samples per wavelength",5);
farfieldfilter - Script command
Sets or gets the filter width for far field filter which is used to remove ripples in the far field projection due to clipping of the near fields. It should be used when the near fields at the edge of the monitor are small but not precisely zero.
The bumpy blue line of the figure shows the near field electric field that will be used for a far field projection. In this case, the field does not go to zero at the edge of the monitor, which will lead to ripples in the far field projection. The green line shows the spatial filter that will be applied to the fields, ensuring they go to zero. The filter parameter defines the width of the filter by the following formula: α=(a)/(a+b).
Syntax |
Description |
---|---|
out = farfieldfilter; |
Get the current far field filter setting. |
farfieldfilter(α); |
Set the current far field filter setting. α=(a)/(a+b). The far field filter has a single input parameter, which is a number between 0 and 1. By default, it is 0, which turns the filter off. This filter is applied to all far field projections. |
Note: Periodic structures The far field filter option should not be used for periodic structures. Set it to zero when using the 'assume periodic' option. |
Example
Far field projection - spatial filtering
farfield2d - Script command
Projects a given power or field profile monitor or a rectilinear dataset to the far field to a 1 meter radius semi-circle. The electric field intensity |E| 2 is returned. Farfield2d does not use a set of linearly spaced angles for the projection, use farfieldangle - Script command to get the appropriate angle vector.
Syntax |
Description |
---|---|
out = farfield2d("mname", f, n, illumination, periods, index, direction); |
Projects a given power or field profile monitor to the far field at the specified frequency points. The result is an NxM matrix where the first dimension is the resolution of the far field projection, and the second dimension is the number of frequency points projected. |
out = farfield2d(dataset, f, n, illumination, periods, index, direction); | Projects a given rectilinear dataset to the far field at the specified frequency points. The result is an NxM matrix where the first dimension is the resolution of the far field projection, and the second dimension is the number of frequency points projected. |
Parameter |
Default value |
Type |
Description |
|
---|---|---|---|---|
mname |
required |
string |
Name of the monitor |
|
dataset |
required |
dataset |
Rectilinear dataset containing both E and H |
|
f |
optional |
1 |
vector |
Index of the desired frequency point. f can be a single value, or a vector of frequency points. Multithreaded projection was introduced since R2016b. |
n |
optional |
2000 |
number |
The number of points in the far field. |
illumination |
optional |
1 |
number |
For periodic structures Gaussian illumination: 1 Plane wave illumination: 2 |
periods |
optional |
1 |
number |
number of periods to be used |
index |
optional |
value at monitor center |
number |
The index of the material to use for the projection. |
direction |
optional |
direction of max power flow |
number |
Direction: this can be +1 or -1. |
Example
This example plots the far field projection of a 1D monitor called monitor. In this example the second frequency point is projected. If the monitor only contains data at one frequency, the second argument is not required.
E2=farfield2d("monitor",2,501); theta=farfieldangle("monitor",2,501); plot(theta,E2,"angle (deg)","|E|^2 far field");
The following example plots the far field projection of a rectilinear dataset. Here, the dataset is from a 1D monitor.
dataset=getresult("monitor", "E"); dataset.addattribute("H",getattribute(getresult("monitor","H"),"H")); E2=farfield2d(dataset,2,501); theta=farfieldangle(dataset,2,501); plot(theta,E2,"angle (deg)","|E|^2 far field");
For additional examples see Far field projection .
farfieldvector2d - Script command
Projects a given power or field profile monitor or a rectilinear dataset to the far field to a 1 meter radius semi-circle. This is similar to the farfield2d script command except the complex electric fields are returned, rather than field intensity. The data is returned as matrix of NxP if one frequency point is projected, or NxPx3 when multiple frequency points are projected where N is the resolution of the far field projection, P is the number frequency points projected, and the last index refers to Ex, Ey and Ez which are the complex components of the electric field vector in Cartesian coordinates.
Syntax |
Description |
---|---|
out = farfieldvector2d( "mname",...); |
Returns the Cartesian complex electric fields. Same arguments as farfield2d. |
out = farfieldvector2d( dataset,...); |
Returns the Cartesian complex electric fields. Same arguments as farfield2d. |
Example
This example plots the amplitude of the Ex component of the far field projection of a 1D monitor called "monitor". In this example the second frequency point is projected. If the monitor only contains data at one frequency, the second argument is not required. For the example of far field projection of a rectilinear dataset see farfield2d.
E=farfieldvector2d("monitor",2,501); Ex = abs(pinch(E,2,1)); # amplitude of Ex theta=farfieldangle("monitor",2,501); plot(theta,Ex,"angle (deg)","Ex far field");
For additional examples see Far field projection .
farfieldpolar2d - Script command
Projects a given power or field profile monitor or a rectilinear dataset to the far field to a 1 meter radius semi-circle. This is similar to the farfield2d script command except the complex electric fields are returned, rather than field intensity. The data is returned as matrix of NxP if one frequency point is projected, or NxPx3 when multiple frequency points are projected where N is the resolution of the far field projection, P is the number frequency points projected, and the last index refers to E r , E θ and E z , in cylindrical coordinates. For TM simulations, this function gives precisely the result of farfieldvector2d because the only non-zero field component is Ez.
Syntax |
Description |
---|---|
out = farfieldpolar2d( "mname",...); |
Returns the polar complex electric fields. Same arguments as farfield2d. |
out = farfieldpolar2d( dataset,...); |
Returns the polar complex electric fields. Same arguments as farfield2d. |
Example
This example plots the amplitude of the Er component of the far field projection of a 1D monitor called "monitor". In this example the second frequency point is projected. If the monitor only contains data at one frequency, the second argument is not required. For the example of far field projection of a rectilinear dataset see farfield2d.
E=farfieldpolar2d("monitor",2,501); Er = abs(pinch(E,2,1)); # amplitude of Er theta=farfieldangle("monitor",2,501); plot(theta,Er,"angle (deg)","Er far field");
For additional examples see Far field projection.