3.1     Batch operation with user tasker files

Let us come back to the BHM\Heat\heat.pro example as shown in Fig. 2-1, but now starting the QW-Simulator with  button. QW-Simulator opens the heat.ta3 file but does not start the FDTD iterations. The Configure-Breakpoints command is active and allows formulating a sequence of tasks to be performed by the software.

Fig. 3.1-1 Breakpoints dialogue of QW-Simulator and its Add Breakpoint extension.

We invoke Configure-Breakpoints ( button in Run tab) and then press Add in the Breakpoints dialogue of Fig. 3.1-1. The list of available tasks pops up. In Fig. 3.1-1 we have expanded the Modify Media Commands, specific for QW-BHM operation:

Modify Media Parameters. It invokes a single construction of average dissipated power pattern starting. This will be followed by updating the enthalpy and temperature patterns and re-calculating the lcsm matrices. The duration of the pattern construction can be specified in the Iterations field, and the heating time step in Heat T [sec] field (Fig. 3.1-2), both in Modify Media Settings dialogue available after pressing Modify Parameters button. A sequence of Modify Media Parameters tasks may be added. The software will automatically supplement those with QW-Simulator standard RunIter and Continue tasks.

Fig. 3.1-2 Additional parameters for the Modify Media Parameters task and Modify Media Parameters Multiple.

Modify Media Parameters Multiple. This tasks, added only once, automatically expands into a sequence of many Modify Media Parameters tasks inside the tasker (*.ta3) file. It therefore requires more parameters to be set by the user. In the Use From To frame (Fig. 3.1-1), the Every field becomes active, and specifies how often the average power construction is to be repeated. The To field determines the starting iteration for the last average power pattern construction. The duration of each consecutive average power construction should be specified in the Iterations field of Fig. 3.1-2.

Modify Media Parameters Multiple T. This is an extended version of Modify Media Parameters Multiple, in which after each heating step a snapshot of the selected quantity (e.g. a field component or temperature pattern) will be saved in a text file. The basic name of the file can be set through the now available Set filename button or directly in Basic Filename line; consecutive file names will be appended with consecutive numbers. By leaving the Path field empty, we instruct the software to save the files in the same directory where the *.ta3 file is located.

Fig. 3.1-3 shows example settings for the Modify Media Parameters Multiple T task and its compact display in Breakpoints window. Clicking on View ta3 we may check how our Breakpoint1 will be expanded into a tasker file, to be executed byQW-Simulator. This file has been saved through Save ta3 button under a default heat_br.ta3 name and is listed below.

     

 

Fig. 3.1-3 Example settings for the Modify Media Parameters Multiple T task, its compact presentation in Breakpoints window.

Before discussing its syntax, let us note that we have two ways of leaving the Breakpoints dialogue: with  or  button. The difference is that  additionally saves the current breakpoints in the QW-Simulator breakpoint file for the current project. Since the last  command has been on heat.ta3, and the name of the project heat is shown in the title bar of QW-Simulator, this breakpoint file will be named heat.br3. Executing heat.ta3 with the breakpoints saved in named heat.br3 is equivalent to executing the previously saved heat_br.ta3.

One more way for saving the breakpoints for future use is via  button, which then asks for a breakpoint file name with the *.br3 extension. We may later  such *.br3 files into the same or other projects.

The listing of our heat_br.ta3 is:

TemplateDV * Dynamic template.

   templ1_heat

   automatic

   5000 *iterations limit for sinus

   2.46 *frequency matching

   0.1 *within +-

RunIter * Simulation is performed for a specified number of iterations.

   C:/Users/Public/QWED/v2023x64/qw_examp/QW_3D/BHM/Heat/heat.pa3

   5000

Modify_Media_Parameters * Modify Media Parameters from *.pmo file.

   heat

   500

   10

Save_Full_Volume_Instantaneous * Instantaneous field of the chosen field component in chosen subcircuit and in full volume will be saved in a text file.

   heat

   <PROJECTPATH>heat_temp1.vi3

   TEMPERATURE

Continue * Continue Simulation.

   7000

Modify_Media_Parameters * Modify Media Parameters from *.pmo file.

   heat

   500

   10

Save_Full_Volume_Instantaneous * Instantaneous field of the chosen field component in chosen subcircuit and in full volume will be saved in a text file.

   heat

   <PROJECTPATH>heat_temp2.vi3

   TEMPERATURE

Continue * Continue Simulation.

   9000

Modify_Media_Parameters * Modify Media Parameters from *.pmo file.

   heat

   500

   10

Save_Full_Volume_Instantaneous * Instantaneous field of the chosen field component in chosen subcircuit and in full volume will be saved in a text file.

   heat

   <PROJECTPATH>heat_temp3.vi3

   TEMPERATURE

Continue * Continue Simulation.

   11000

Modify_Media_Parameters * Modify Media Parameters from *.pmo file.

   heat

   500

   10

Save_Full_Volume_Instantaneous * Instantaneous field of the chosen field component in chosen subcircuit and in full volume will be saved in a text file.

   heat

   <PROJECTPATH>heat_temp4.vi3

   TEMPERATURE

Continue * Continue Simulation.

   13000

Modify_Media_Parameters * Modify Media Parameters from *.pmo file.

   heat

   500

   10

Save_Full_Volume_Instantaneous * Instantaneous field of the chosen field component in chosen subcircuit and in full volume will be saved in a text file.

   heat

   <PROJECTPATH>heat_temp5.vi3

   TEMPERATURE

Continue * Continue Simulation.

   15000

Modify_Media_Parameters * Modify Media Parameters from *.pmo file.

   heat

   500

   10

Save_Full_Volume_Instantaneous * Instantaneous field of the chosen field component in chosen subcircuit and in full volume will be saved in a text file.

   heat

   <PROJECTPATH>heat_temp6.vi3

   TEMPERATURE

Continue * Continue Simulation.

   17000

Modify_Media_Parameters * Modify Media Parameters from *.pmo file.

   heat

   500

   10

Save_Full_Volume_Instantaneous * Instantaneous field of the chosen field component in chosen subcircuit and in full volume will be saved in a text file.

   heat

   <PROJECTPATH>heat_temp7.vi3

   TEMPERATURE

Continue * Continue Simulation.

   19000

Modify_Media_Parameters * Modify Media Parameters from *.pmo file.

   heat

   500

   10

Save_Full_Volume_Instantaneous * Instantaneous field of the chosen field component in chosen subcircuit and in full volume will be saved in a text file.

   heat

   <PROJECTPATH>heat_temp8.vi3

   TEMPERATURE

Continue * Continue Simulation.

   20000

Modify_Media_Parameters * Modify Media Parameters from *.pmo file.

   heat

   500

   10

Save_Full_Volume_Instantaneous * Instantaneous field of the chosen field component in chosen subcircuit and in full volume will be saved in a text file.

   heat

   <PROJECTPATH>heat_temp9.vi3

   TEMPERATURE

Continue * Continue Simulation.

   0

Because the Always generate template box has been checked in the Breakpoints dialogue of Fig. 3.1-3, the heat_br.ta3 file starts with the task for template generation in the feeding waveguide. It is followed by RunIter task, activating 5000 FDTD iterations of the heat example (5000 being the From field in the upper dialogue of Fig. 3.1-3). Then we have the first Modify Media Parameters task, constructing the average dissipated power pattern for 500 iterations (as in Iterations field of the upper right dialogue of Fig. 3.1-3) and applying the heating for 10 sec (as in Heat T [sec] field). The temperature pattern over the whole heat geometry is to be saved in heat_temp1.vi3. Continue task resumes the electromagnetic FDTD analysis until iteration 7000 (From+Every field of the upper left dialogue of Fig. 3.1-3). The sequence is repeated in 2000 iteration periods until iteration 5000+7*2000=19000, and then the last Modify Media Parameters task is performed at iteration 20000 (To field of the upper left dialogue of Fig. 3.1-3). The last Continue task with iteration number 0 means that the FDTD simulation is to be continued until manually stopped by the user, for example with .

Fig. 3.1-4 2D Thermal Continuous display of temperature across food, as saved in heat_temp1.vi3 (after the first heating step) and in heat_temp9.vi3 (after the last ninth heating step) during the execution of heat_br.ta3.

In QW-Simulator we perform File-Open ( button) on heat_br.ta3 and Run-Start ( button in Run tab). Also from here we may check the file contents via View-Edit Ta3 command. The above described sequence of tasks is performed automatically, and nine *.vi3 files with consecutive temperature patterns are saved in the project directory. To see these patterns, we use Fields-Saved 2D/3D Fields command, choose the file of interest, and navigate in the Saved Volume Instantaneous Fields window analogously as in the interactive 2D/3D Fields Distribution case. Fig. 3.1‑4 shows the first and last saved temperature patterns across food, both on the same manually set scale (-20÷0°C). The 2D Thermal Continuous display is applied ( in 2D Thermal tab) and the Shape () option is on. Let us explain that the magenta strips along the three edges are due to temperature averaging between food and surrounding +20°C air.

 

The saved temperature patterns allow verifying if temperature changes at consecutive thermal steps have not been too large. For faster inspection of the temperature evolution process, the user may follow Min temp and Max temp echoes in each BHM iteration, in Log Output tab of the Simulator Log. For our heat_br.ta3 example, these are collated in Fig. 3.1-5. The last temperature pattern of Fig. 3.1-4 is repeated for further convenient comparisons with the examples of Batch operation with exported tasker files and Running heat_tune example.

BHM iter.

Min temp

Max temp

1

-19.96

-13.26

2

-19.90

-7.82

3

-19.84

-3.99

4

-19.80

-2.41

5

-19.79

-1.54

6

-19.79

-1.26

7

-19.78

-1.08

8

-19.78

+4.91

9

-19.78

+14.38

Fig. 3.1-5 Temperature evolution in heat_br.ta3, and final temperature pattern across the load (in -20÷0°C scale).

One more file created by QW-Simulator is food.test. It reproduces the contents of food.pmo file, for the purpose of double-checking if the syntax of food.pmo has been correct, and media parameters have been correctly read.