PDF

Electrical Heating of a Busbar Solved with LiveLink™ for SOLIDWORKS® and LiveLink™ for MATLAB®
Introduction
This model analyzes the resistive heating of a busbar designed to conduct a direct current from a transformer to an electric device. Some geometry parameters are set with MATLAB® variables and automatically updated in SOLIDWORKS®.
The geometry for the simulation, displayed in Figure 1, includes the coupling components for one cell, and a section of the inter-cell busbar that is connected to the power source. It consists of the top of the anode with four central columns holding copper rods attached to copper bars.
Figure 1: The geometry of the anode to busbar coupling used in this example.
This version of this introductory tutorial demonstrates the use of LiveLink™ for MATLAB® together with LiveLink™ for SOLIDWORKS®.
Note: The instructions in this example assume that LiveLink™ for SOLIDWORKS® Application Libraries has been installed together with COMSOL.
Model Definition
Note: You can read a complet physics description in the LiveLink™ for SOLIDWORKS®Application Library, see the application Electrical Heating Of ABusbar Assembly.
The current model performs the same analysis as the one defined in the LiveLink™ for SOLIDWORKS®Application Library. Here the parameter sweep is performed in MATLAB®.
Results and Discussion
Figure 2 shows the average temperature of the busbar plotted against its width and length. The temperature distribution in the device for selected combinations of the studied parameters is shown in Figure 3.
According to the results increasing the surface area of the busbar by increasing its length and width leads to a lower temperature, as the surface area available for cooling increases.
Figure 2: Surface plot of the busbar maximum temperature versus the rod diameter and the busbar width.
Figure 3: Temperature distribution in the busbar.
Note About the COMSOL Implementation
Using nested loops in MATLAB it is easy to study multiple cases combining different values of the geometry parameters.
To set up this simulation you can start with the application library file busbar_llsw_llmatlab.mph, which you can easily load into MATLAB, where you continue to implement the script for running a multiple parameter sweep.
Wrapper functions used by the script:
mphopen to load the model .mph file.
mphgeom to display the model geometry.
mphmean to evaluate average quantities in the model.
mphplot to create plots.
Application Library path: LiveLink_for_MATLAB/Tutorials/busbar_llsw_llmatlab
Modeling Instructions — MATLAB®
1
In SOLIDWORKS open the file busbar_assembly.sldasm, which you find if you browse to the application’s LiveLink™ for SOLIDWORKS® Application Library folder.
2
Start COMSOL with MATLAB.
You now have two possibilities to continue:
Enter each command, starting at step 3 below, at the MATLAB command line.
Paste the full model script, included in the section Model M-File, into a text editor, then save the file with a “.m” extension, and finally run this file in MATLAB.
3
model = mphopen('busbar_llsw_llmatlab');
4
mphgeom(model)
The geometry in the MATLAB figure should be equivalent to the following one:
5
cad = model.geom('geom1').feature('cad1');
cad.updateCadParamTable(true, true);
6
model.param.set('LL_D1_Sketch1_angle_connector_sldprt',200);
7
mphgeom(model)
This produces a MATLAB figure with a geometry similar to the one below:
8
model.study('std1').feature('param').active(false);
9
rod= 14:2:20;
size_rod = size(rod,2);
width = 60:20:100;
size_width = size(width,2);
10
for j = 1:size_rod
model.param.set('LL_D1_Sketch2_rod_sldprt',rod(j));
11
for i = 1:size_width
12
str = sprintf('Iteration No %d...',(j-1)*size_width+i);
h = waitbar(0,str);
waitbar(((j-1)*size_width+i)/(size_rod*size_width), h);
13
To update the value of the parameter width in the model object and compute the solution with the updated geometry enter the commands:
model.param.set('LL_D1_Sketch1_angle_connector_sldprt',width(i));
model.sol('sol1').run;
14
T_max(i,j) = mphmax(model,'T','volume','selection','geom1_cad1_Copper_dom');
delete(h)
end
15
end
16
model.result('pg2').set('data','dset1');
mphplot(model,'pg2','rangenum',1)
17
[xx,yy] = meshgrid(rod,width);
figure
h = surf(xx,yy,T_max);
view(140,10)
xlabel('rod[mm]');
ylabel('width[mm]');
zlabel('Tmax[K]');
Model M-File
Below you find the full script of the model. You can copy it and paste it into a text editor and save it with the “.m” extension. To run the script in MATLAB make sure that the path to the folder containing the script is set in MATLAB, then type the file name without the “.m” extension at the MATLAB prompt.
model = mphopen('busbar_llsw_llmatlab');
mphgeom(model)
 
cad = model.geom('geom1').feature('cad1');
cad.updateCadParamTable(true, true);
 
model.param.set('LL_D1_Sketch1_angle_connector_sldprt',200);
mphgeom(model);
 
model.study('std1').feature('param').active(false);
 
rod = 14:2:20;
size_rod = size(rod,2);
width = 60:20:100;
size_width = size(width,2);
for j = 1:size_rod
   model.param.set('LL_D1_Sketch2_rod_sldprt',rod(j));
   for i = 1:size_width
      str = sprintf('Iteration No %d...', (j-1)*size_rod+i);
      h = waitbar(0,str);
      waitbar(((j-1)*size_width+i)/(size_rod*size_width), h);
      model.param.set('LL_D1_Sketch1_angle_connector_sldprt',...          width(i));
      model.sol('sol1').run;
      T_max(i,j) = mphmax(model,'T','volume',...
         'selection','geom1_cad1_Copper_dom');
      delete(h)
   end
end
 
model.result('pg2').set('data','dset1');
mphplot(model,'pg2','rangenum',1);
 
[xx,yy] = meshgrid(rod,width);
figure
h = surf(xx,yy,T_max);
view(140,10)
xlabel('rod[mm]');
ylabel('width[mm]');
zlabel('Tmax[K]');