To enable this option in the context menu, click the Show More Options button (
) and select
Batch or
Batch and Cluster (if your license includes cluster computing) in the
Show More Options dialog box.
Use the Batch Sweep (
) study to find the solution to a sequence of stationary or time-dependent simulations that arise when you vary some parameters of interest. See
Batch and Batch Sweep for information about situations where a batch sweep is useful. If you want to make a full multiparameter sweep (solving first for the first value of the first parameter combined with all values of the second parameter, then for the second value of the first parameter combined with all values of the second parameter, and so on), you can add several
Parametric Sweep nodes, one for each additional parameter except the outermost parameter. COMSOL Multiphysics then treats the parametric sweeps as a “nested for-loop” and indicates the nested structure using indentations of the
Parametric Sweep node names. See also
Batch Sweeps vs. Cluster Sweeps.
The Batch Sweep is always the outermost sweep. It starts multiple COMSOL Multiphysics batch processes — one for each parameter set in the Batch Sweep node — that solve the current study on your computer given the parameter set.
Once the filename and directory are set, right-click the parent Study node and choose
Compute to start the COMSOL Multiphysics batch processes that compute the current study.
When the batch sweep process starts, the COMSOL Desktop follows the progress in The External Process Window. When the process finishes (or you click the
Detach Job button to no longer follow the process), an
External Process node, one for each parameter, is added under a
Batch Data node as in
Figure 20-5. The External Process node represents the current running process.
|
If you click Detach Job, the Batch Sweep then no longer synchronizes the solutions and accumulated probe table. To reenable the synchronization, use the Show All Progress button in the Batch Data node.
|
Use the Probes list to select probes to update during the batch sweep. The default is
All, which selects all probes for plotting and tabulation of probe data. Select
Manual to open a list with all available probes. Use the
Move Up (
),
Move Down (
),
Delete (
), and
Add (
) buttons to make the list contain the probes that you want to see results from while solving. Select
None to disable probe updating for batch sweep.
Select the Accumulated probe table check box to activate the accumulation of probe updates for both the variation on the solver level (time, frequency, and so on) and on the batch sweep level. Use the
Output table to select where to put the data. Select the
Use all probes check box if all the model probes should be accumulated in the table. If not selected, the probes selected from the
Probes list are used.
Specify the file in which to store the model in the Filename field. The directory in which to store the model is the one in the
Batch directory field on the
Multicore and Cluster Computing page in the
Preferences dialog box.
Select the Generate solver sequence in external process check box to delay the generation of the solver sequence (for example, to avoid expensive mesh generation on the desktop before submitting the batch job).
From the Add parameters to filename list, choose
Parameter name and value (the default), or choose
Index, which instead of parameter names and parameter values uses an index scheme
iX,
iY, …, where same indices relate to the same parameter value. This option gives much shorter filenames.
Select the Specify server directory path check box if you have a floating network license and want to perform this computation using an installation at a remote location. Then specify the directory path in the
Directory field by typing it directly or clicking the
Browse button to choose a directory.
Select the Clear meshes check box to clear the meshes before running the batch sweep. The default is to clear the meshes. Select the
Clear solutions check box to clear the solutions before running the batch sweep. The default is to clear the solutions. These settings are only important if you run a remote computation on a cluster or cloud and want to minimize the size of the file transferred over the network (only available with a floating network license).
Select the Synchronize solutions check box to synchronize the solutions computed by the batch processes with the model by taking the results from all the stored files and collecting it in a “master MPH-file” from which we are starting the simulation. This allows additional postprocessing to be performed after the sweep has finished. The setting is similar to the
All and
Last settings in the
Memory settings for jobs for
Parametric Sweep. The default is to disable solution synchronization. Select the
Synchronize accumulated probe table check box to synchronize the accumulated probes computed by the batch processes with the model. The accumulated probe synchronization is enabled by default (collecting this information requires much less memory and time compared to the full solution information).
|
When the Synchronize solutions check box is selected for some models, the batch sweep stores a large amount of files in the directory specified under Cluster computer settings. Those files are needed for the synchronization of the solutions.
|
Select the Output model to file check box to enable that all batch processes save the models to file. Selecting this check box ensures that the MPH-files that are automatically saved contain the solution (for each parameter). In most cases, the solution synchronization and probe synchronization functionality should be used instead because otherwise the data ends up in one file for each process and cannot be postprocessed efficiently.
Select the Use graphics check box when the batch process should run results nodes that create graphical contents such as exporting to file. Enter the
Number of simultaneous jobs. The default is 1. This is the maximum number of batch processes that are allowed to run simultaneously. Enter the
Number of job restarts. The default is 0. This is the maximum number of times the job can be restarted if it fails to complete. Enter a value for the
Alive time (seconds). The default is 300 seconds. This is the longest time the process is allowed to run before it must inform that it is still running. Failure to do so means that the process is considered dead, and a new process is started if the maximum number of job restarts is not reached.