Is there any way to speed up the PDE solver with the parallel computing toolbox?
조회 수: 8(최근 30일)
Can I speed up this code by paralleling it with the parallel computing toolbox?
thermalmodel = createpde('thermal','transient');
gm = multicuboid(1,1,0.5,'ZOffset',0.5);%if this doesn't work choose your own geometry
thermalmodel.Geometry = gm;
%%%%%%%%%%%%%%%%%%%%%%%GENERATE MESH %%%%%%%%%%%%%%%
% meshsize = 0.4;%mm
meshsize = 4;%mm
htc = vpa(25) *u.Watt/(u.m^2*u.Kelvin);
htc = rewrite(htc,u.Watt/(u.in^2*u.Kelvin));
htc = double(separateUnits(htc));
mybc = @(region,state) sin(350*state.time).^2;
tfinal = 6;
tlist = 0:3:tfinal;
thermalmodel.SolverOptions.ReportStatistics = 'on';
result = solve(thermalmodel,tlist);
title('Temperature in K')
title(sprintf('Transient Temperature at Final Time (%g seconds)',tfinal));
Ravi Kumar 2018년 9월 26일
Your mesh density is too high. I could not get the mesh generated on my machine in a reasonable time. This means, there are large number of DoFs. Can you run your problem first with the default mesh, by using:
I am sure you will be able to solve this on a single machine. Then see how much mesh resolution you really need.