|
1
|
Start with a model that does not contain any parametric sweep and define your outputs. Then add them to the Export node (by right-clicking and adding Data, Plot, and image nodes as desired) and assign each data or plot output to a file.
|
|
2
|
Create a parametric sweep study by right-clicking the study node and adding a Parametric Sweep. Add the parameters you want to sweep over in Parameters under Global Definitions. Now add the parameters in Parameter name in the parametric sweep node you created and set the Parameter values you want to sweep over. In some cases COMSOL Multiphysics chooses to use the more efficient parametric solver when sweeping. Set the Use parametric solver under Study Extensions to Off if you want to avoid this. Use the Keep solutions setting Only last to conserve memory. In that case, use the Accumulated Probe table to store the data you want to use for later processing. You can also choose to store the models on file by enabling the Save each solution as model file and then entering a filename in the Filename field, or clicking Browse to choose a name and location for the model files. The models created during the simulation can then be found in a Save model to File node under Job Configurations. The default settings are configurable in the Preferences window.
|
|
3
|
If you want to create output files with the parametric sweep for further analysis, right-click the main study node and select Show Default Solver. Select the parametric node under Job Configurations that corresponds to the parametric sweep from which you want to export data. You can see which parametric sweep the node corresponds to from the Defined by study step list. Note that if you run a stationary study, you need to switch off Use parametric solver in the Study Extensions section (see above) to get the node under Job Configurations.
|
|
-
|
Right-click the Parametric node and select Results > Plot Group if you want to run a Plot Group for each parameter value in the sweep. In most cases use the Plot settings under Results While Solving (in the study step’s Settings window) instead.
|
|
-
|
Right-click the Parametric node and select Results > Derived Value to run a Derived Values node for each parameter value in the sweep. This functionality is similar to probes but is useful if you have already set up a Derived Values node that you want to use during the sweep. The values are stored in a table (similar to probes) for further processing.
|
|
-
|
Right-click the Parametric node and select Results > Export to File if you want to export data to a file for each parameter value in the sweep, running an Export node under Results. Note that after the sweep, the files created are listed in the node and can be opened in a browser using the Open button.
|
|
•
|
Create a parametric job configuration that uses two solvers. The first solver is used as input to the second solver. One way to create such a sweep is to create two studies. Let the second study use the first as input from the Values of Dependent Variables. Create a Parametric Sweep in the first study and select to keep Only last solution. Run Show Default Solver in both studies and enter the Job Configurations node of the first study. Right-click the Parametric node and add a Solver. Select the new solver and set it to run the second solver from the second study. Also check the Keep all solutions settings. Right-click the Parametric node and select Run. You can add further functionality to the sequence such as Export to File to suit your needs.
|
|
•
|
Another possibility is to create a parametric sweep that runs a Cluster Computing node. This gives you similar functionality as the distributed parametric sweep, bu |