Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.
Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Return a modified structure from Matlab to COMSOL for a new iteration.
Posted Apr 1, 2012, 8:42 a.m. EDT Low-Frequency Electromagnetics, Interfacing, Materials Version 4.2 4 Replies
Please login with a confirmed email address before reporting spam
Hello,
I am new on this discussion. I am working for my master thesis designing optimization algorithms in order to finding the minimum HTS tape usage on future wind turbines.
My question is: I am working with sensitivity analysis in COMSOL. I have a control variable which is "p" and an initial guess "IG". After my first iteration I obtain the expression fsens(p) and I evaluate this expression in Matlab. There I obtain a structure like this:
pSol =
expr: {'p'}
d1: [1x277 double]
p: [2x277 double]
t: [3x488 int32]
ve: [277x1 int32]
unit: {''}
My goal is to run an optimization algorithm in matlab which will give me a new result for the field "p.d1" which is the material distribution (1 - filled, 0- void). This new vector contains the value of "p" for each element in the model. I need to enter this new structure again to COMSOL to run the following iteration and get the new sensitivities for this new distribution. I tried million of things and nothing works.
Does someone knows how can I do this?
Thanks,
Matias
I am new on this discussion. I am working for my master thesis designing optimization algorithms in order to finding the minimum HTS tape usage on future wind turbines.
My question is: I am working with sensitivity analysis in COMSOL. I have a control variable which is "p" and an initial guess "IG". After my first iteration I obtain the expression fsens(p) and I evaluate this expression in Matlab. There I obtain a structure like this:
pSol =
expr: {'p'}
d1: [1x277 double]
p: [2x277 double]
t: [3x488 int32]
ve: [277x1 int32]
unit: {''}
My goal is to run an optimization algorithm in matlab which will give me a new result for the field "p.d1" which is the material distribution (1 - filled, 0- void). This new vector contains the value of "p" for each element in the model. I need to enter this new structure again to COMSOL to run the following iteration and get the new sensitivities for this new distribution. I tried million of things and nothing works.
Does someone knows how can I do this?
Thanks,
Matias
4 Replies Last Post Apr 4, 2012, 10:23 a.m. EDT