16.4  QuickWave Variables

The button_var button in Home tab and Configure->Variables... command from main menu invoke QuickWave Variables dialogue with QW-Simulator variables information.

The user can use these variables in tasker files prepared in text editors, Breakpoints dialogue or in Set Tools dialogue. When QW-Simulator meets the QuickWave variable in the tasker file or in searching for an external tool, the variable will be expanded into an appropriate value as exemplified by the QuickWave Variables dialogue:

Obraz zawierający tekst  Opis wygenerowany automatycznie

 

The predefined QW-Simulator variables are:

<PROJECTNAME> - contains the basic name of the current project (without path and extension),

<PROJECTPATH> - contains the path to the current project (without basic project name and extension),

<PROJECTFULLNAME> - contains the path and basic name of the current project (without extension),

<INSTALLDIR> - contains the main installation directory of the currently used version of QuickWave software,

<PUBLICDIR> - contains the path to the QuickWave public directory where the QW-Examples, *.ini files and media library are installed for the currently used version of QuickWave software,

<ITERATIONS> - contains the current iteration number of the running simulation (increasing as the simulation progresses, and being the same as displayed in the main window status),

<UDOFULLNAME> - contains the full name of the UDO file; the default is based on the the current project name but a different name may be chosen by the user via Simulator Log window, Model Files tab, UDO Files group,

<SH3FULLNAME> - contains the full name of the shape file used in the current simulation (typically the same as PROJECTFULLNAME; varies only in QW-BHM regime with rotation),

<QW_OPT_PLUS_PARAMS> - arguments for command line options of QW-Editor when called by QW-OptimiserPlus during optimisation.

<DATE> - contains the actual date in the form of YEAR_MONTH_DAY

<TIME> - contains the actual time in the form of HOURS_MINUTES_SECONDS

 

Example 1

Tasker file for running C:/Projects/wgtocx/wgtocx1.pa3 project and saving S-Parameters results after 1000 and 2000 iterations, in meaningfully named *.da3 files:

RunIter

C:/Projects/wgtocx/wgtocx1.pa3

1000

Save_S_Results

<PROJECTPATH><PROJECTNAME>_<ITERATIONS>.da3

QW_3D

Continue

2000

Save_S_Results

<PROJECTPATH><PROJECTNAME>_<ITERATIONS>.da3

QW_3D

Exit

 

After the execution of this tasker file, two result files: C:/Projects/wgtocx/wgtocx1_1000.da3 and C:/Projects/wgtocx/wgtocx1_2000.da3 will be saved, and then QW-Simulator application will exit.

Note: the underline between <PROJECTNAME> and <ITERATIONS> parts of *.da3 file names is not necessary and inserted for clarity of the name only.

 

Example 2

Tasker file generated through Breakpoints dialogues and causing execution of heat.pa3 project with saving envelops of dissipated power across food. Two envelopes are constructed: one, starting at iteration 3674 for 334 iterations, and the other starting at iteration 4588 for 273 iterations. We need to define two Save Plane Envelope Max breakpoints.

Press Configure-Breakpoints to open Breakpoints dialogue and press Add… button to open Add Breakpoint dialogue. Select Save Plane Envelope Max command from Breakpoint Commands list and set Iteration to 3674.

dialog_variables_addbreakpoint

Use QuickWave Variables to set the Path and Filename fields of the *.fe3 files to be generated.

Place the mouse pointer in the Path edit line and select all text. Press Insert Var button to open Insert Variable dialogue. Select <PROJECTPATH> from Variables list and press OK button. The selected text in the Path edit line has thus been replaced by the <PROJECTPATH> Variable.

Now place the mouse cursor in the Filename edit line between ‘t’ and ‘.’ in the heat.fe3 string and insert the underline (for clarity of the name only). Now press Insert Var button to open Insert Variable dialogue, select <ITERATIONS> from Variables list and press OK button. Note that <ITERATIONS> Variable is now included into *.fe3 filename. It will indicate the iteration number when the envelope construction has been started.

Open Plane Envelope Settings dialogue by pressing Envelope Settings button and set the following parameters:

dialog_variables_planeEnvSet

Click OK button in the Plane Envelope Settings dialogue and Add Breakpoint dialogue. Note that Save Plane Envelope Max breakpoint appears on the list in the Breakpoints dialogue.

Now we configure the second Breakpoint in the same way as the first Breakpoint, but the Iteration parameter in the Add Breakpoint dialogue should be 4588, and Iterations parameter in the Plane Envelope Settings dialogue should be 273. After that we can see two Save Plane Envelope Max breakpoints in the Breakpoints dialogue.

dialog_variables_BREAKPOINTS

The Breakpoints can be exported into the tasker file by pressing Save ta3 button. To see how Breakpoints will be expanded into a tasker file, press the View ta3 button.

There are two ways to use these Breakpoints in simulation.

·         The user can use the prepared tasker file (previously saved via Save Ta3 button) with the Breakpoint expanded into tasker commands by pressing File-Open from the menu and selecting this tasker file.

·         The user can just start simulation by pressing Run-Start from the menu. Breakpoints will be inserted into tasker and used automatically.

The results of execution of the Breakpoints we can see in the Log Output tab in the Simulator Log window. We can see that two breakpoints are defined and two breakpoints are used. At the end of the log are two lines with information how the Breakpoints finished. The <PROJECTPATH> and <ITERATIONS> Variables were expanded into an appropriate value. The <ITERATIONS> Variable was expanded into the current iteration number of the running simulation at the moment when the task started to execute.

 

Example 3

Another possible use of QuickWave Variables is in Set Tools dialogue.