Hi I'm on project that find optimal parameter about transient heat transfer problem. (find optimal values that minimize temperature fluctuation)
I have problem about exceed maximum array size (about 1800GB) while solving ga problem
I defined a design domain contains multiple values (i.e. length, geometry properties, etc) and FEA using pde toolbox has finished
the last task what i have to do is find optimal values with solution of FEA using ga function and my pseudo code about FEA is here:
function [result, model] = Heattransfer(L1, t1, t2, t3, length_fin, num_fins, shelltype, shellmat, intermed, time)
thermalmodel = createpde('thermal', 'transient');
result = solve(thermalmodel, tlist);
L1, t1, t2, t3, length_fin is about geometry parameters that is noninteger values (because it is length)
num_fins, shelltype, shellmat, intermed is also about geometry parameters that is interger values (because it is about number or material type, i implemented that decide material type, geometry type by select number like if shellmat == 1, steel / elseif shellmat == 2, polymer)
and code about ga is as below:
function value = ObjectiveFcn(a, time)
result = Heattransfer(L1, t1, t2, t3, length_fin, num_fins, shelltype, shellmat, intermed, time);
function [c, ceq] = Constraints(b)
c1 = L1 + t1 + t2 + t3 - 0.3;
lb = [0, 0, 0, 0, 0, 1, 1, 1, 1];
ub = [0.3, 0.01, 0.02, 0.01, 0.01, 374, 2, 3, 2];
ObjectivefunWithTime = @(a) Objectivefun(a, time);
ConstraintsFcn = @(b) Constraints(b);
options = optimoptions('ga', 'Display', 'iter', 'PopulationSize', 10,...
'MaxGenerations', 20, 'CrossoverFraction', 0.8, 'UseParallel', true);
[x_opt, fval] = ga(ObjectivefunWithTime, 9, [], [], [], [], lb, ub, ConstraintsFcn, intvar, options);
time is not design variable so I excepted it from objective function
In ub (upper bound), I actually want to set value for t1, t2, t3, length_fin as 0.3 to find optimal value widely (under Constraints) but when i set values like that, it results error for invalid geometry (conflicted in pde toolbox code) so I defined arbiturary values.
What should I do for achieve my goal? (find optimal value)
I'm sorry for messy code
If anyone knows about this, please comment.
Thank you