12.8 Controlling the mesh

So far it has been explained how to set a mesh snapping plane and how to enforce a particular meshing UP or/and DOWN from such a plane using PORTPAR command. The functions MESH and MESHINDEX are also very useful in generating biphased objects. Here we will supplement these commands with some other commands, which may be useful in controlling the meshing in all directions.

·       MESHPAR (<arg1>, ...,<arg10>) - Enforces meshing in the whole circuit or in its part.

<arg1> - maximum cell size in X direction,

<arg2> - maximum cell size in Y direction,

<arg3> - maximum cell size in Z direction,

<arg4> - lower limit of the meshed zone in X direction,

<arg5> - upper limit of the meshed zone in X direction,

<arg6> - lower limit of the meshed zone in Y direction,

<arg7> - upper limit of the meshed zone in Y direction,

<arg8> - lower limit of the meshed zone in Z direction,

<arg9> - upper limit of the meshed zone in Z direction,

<arg10> - 0 or 1; value 1 corresponds to checked Adjust to objects box in Mesh Parameters dialogue - it causes that the whole circuit will be meshed and the above parameters <arg4> .. <arg9> will be ignored; value 0 causes that the mesh will be restricted to the region defined by the above parameters <arg4> .. <arg9>.

·       GETMESHPAR (<n>) - A function returning the n-th mesh parameter. Argument n has to be in range 1-10 (see MESHPAR command description how mesh parameters are enumerated).

·       MESHXINDEX (<level>) - A function returning:

The ordinal number of the border between FDTD cells situated most closely at or below (in –X direction) from level (if there is an FDTD mesh at or below level),

-1    (if there is an FDTD mesh but situated above level),

-2    (if there is no FDTD mesh).

·       MESHX (<n>) - A function returning the x-coordinate of the n-th mesh line (border between FDTD cells). The mesh lines are counted up (in +X direction) with the leftmost one numbered 0.

·       MESHYINDEX (<level>) - The same as MESHXINDEX but in Y direction.

·       MESHY (<n>) - The same as MESHX but in Y direction.

·       CREATEMESH - Forces mesh creation inside UDO file.

 

·       AMIGOALLOW (<Allow>) – Enables or disables AMIGO mesh control. <Allow>: 1 – on, 0 – off (activates manual mesh control).

·       AMIGOAXES (<meshcontrolX>,<meshcontrolY>,<meshcontrolZ>) – sets AMIGO active axes. Parameters: 1 – check option (on), 0 – uncheck option (off), else ignore parameter (option not changed).

·       AMIGOCELLS (<cells_per_wavelength>,<avoid_cells below lmin>) – sets AMIGO parameters: number of cells per wavelength and and minimal cell size to avoid generating too small FDTD cells.

·       AMIGOFREQ (<f1>,<f2>,<resolution df>,<change ports & postprocessing data>) – Sets the frequency band of interest. The last parameter enables or disables copying frequency data to ports and postprocesings (1 – check option (on), 0 – uncheck option (off), else ignore parameter (option not changed).

·       AMIGOSETLMIN – activates the same action as pressing ‘<’ button in the AMIGO dialogue.

·       AMIGOSUSP (<Suspend>) – enables or disables option “suspend simulation after the above number of iteration” (1 – check option (on), 0 – uncheck option (off), else ignore parameter (option not changed).

 

 

Additional comments:

The MESHPAR command parameters corresponds to parameters in the Mesh Parameters dialogue, and allows a global mesh settings. The mesh can be locally modified with the PORTPAR command.

The AMIGO… set of commands corresponds to layout, fields and parameters in the AMIGO dialogue, and allows dynamic control of meshing with UDO script.

Important! CREATEMESH command is necessary before AMIGO commands (all AMIGO… commands should be placed at the end of UDO file when geometry, ports and mesh are establish already).

In the elib\actions subdirectory of UDO Library an example of parametrised UDO script is available to show possible usage of AMIGO… commands.

 

Go to next UDO commands for QW-BHM regime chapter.

Back to Syntax of the User Defined Object (UDO) language chapter.