Parameter Sweeps, Parallel Computing
Sweeping a Geometric Parameter
Often you are interested in more than a single instance of your design. Rather, you need to design it to meet certain constraints. For the busbar a design goal could be to lower the operating temperature. Decreasing the current density would achieve this. Since the current density depends on the geometry of the busbar, varying the width, wbb, should change the current density and, in turn, have some impact on the operating temperature. Study this by running a parametric sweep on wbb.
Load the file busbar.mph and add a parametric sweep to Study 1.
Adding a Parametric Sweep
In the Model Builder, right-click the Study 1 node and select Parametric Sweep.
In the parametric sweep settings, click the Add button
and select the Parameter name, wbb.
Try range(5e-2,1e-2,1e-1) as Parameter values. This will sweep the
width of the busbar from 5 cm to 10 cm with 1 cm increments.
Create an Average Model Coupling, which you can later use to calculate the average temperature in the busbar.
Right-click Definitions
and select Model Couplings>Average.
In the Settings window, select All domains in the Selection list. This creates an
operator called aveop1.
The aveop1 is now available to calculate the average of any quantity defined on those domains. A little later you will use it to calculate the average temperature, but it could just as simply be used to calculate average electric potential, current density, etc.
Run the sweep by right-clicking the Study
1 node in the Model Builder
and selecting Compute
.
Save the model as busbar_III.mph.
The results show the temperature in the busbar for the last parameter value, wbb=10 cm. Compare this to the temperature for wbb= 5 cm.
Click 3D Plot Group 1 in the Model Builder.
In the Settings window, select Solution 2 in the Data set list. This data set contains the results from the parametric sweep.
In the Parameters value list,
select 0.05. Click the Plot button
.
The maximum temperature decreases from 331 K to 318 K as the width of
the busbar increases from 5 cm to 10 cm.
To further analyze these results, you can plot the average temperature for each width.
Viewing the Results
Right-click Results and select 1D Plot Group. In the Model Builder, right-click 1D Plot Group 3 and select Global.
In the Settings window,
select Solution 2 in the Data set list.
Click the first row in the Expressions
list and type aveop1(T). You use a similar
syntax to calculate the average of other quantities.
Click the Plot button
.
Save the model.
Note that the average temperature also decreases as the width
increases. This indicates that the goal of a lower operating temperature
would be fulfilled by using a wider busbar. Of course, this may also
increase the total mass (and therefore the cost) of the busbar. This
suggests an optimization problem for you to consider.
The subject of parameter sweeps naturally raises the question of parallel processing; it would be efficient if all parameters were solved simultaneously.
Parallel Computing
COMSOL supports most forms of parallel computing including shared memory parallelism (for example, multicore processors) and high performance computing (HPC) clusters.
You can use clusters to solve a series of parameter steps for a model, one parameter per node, or you can solve a single large model using distributed memory. For maximum performance, the COMSOL cluster implementation can utilize shared-memory multicore processing on each node in combination with the MPI-based distributed memory model. This brings a major performance boost by making the most out of the computational power installed.
Adding a Cluster Computing Job
To run cluster simulations, select Show more options in the
View menu.
In the Model Builder,
right-click Study 1>Job
Configurations and select Cluster
Computing.
The settings window helps to manage the simulation either for running
several instances of an identical parameterized model – one parameter
value per host – or for running one parameter step in distributed mode.
You choose which type of cluster job you want to do in the Cluster type list. 
COMSOL supports Windows Compute Cluster Server 2003, Windows HPC Server 2008, and Linux. To learn more about running COMSOL in parallel, see the Installation and Operations Guide.
Next Page
