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.

Geometrical Optimization

Please login with a confirmed email address before reporting spam

Hi all,

I have set up a geometry with parameters (Global Definitions - Parameters). I added the physics (that works) and the optimization module. I have defined the objective function (an evaluation of a probe) and set up two of the geometrical parameters als Global Control Variables.

When the solver starts, it stops after three evaluations, claiming that there is no gradient in the objective function results. However, It appears that the geometry is not changed during the runs, so that there is of course no gradient.

How do you set up parametric geometry, that can be changed by the optimization solver? Are there any simple examples out there?

Best regards,
M. Richwin

5 Replies Last Post Nov 10, 2010, 2:40 a.m. EST
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 4, 2010, 2:41 a.m. EDT
Hi Matthias

first are you in 3.5 or 4 ?, in 4 you have two ways of parametrising:
a) for a fixed geometry but with a variable that actson some physics: use the i.e. stationary continuation/extend tab in the Solver subnode
b) to vary the geoemtry, add an explicit Parametric to your solver sequence.

Only the latter will loop around all your parameter hence rebuild geoemrty and meshing if required

This might be (part of?) your issue

--
Good luck
Ivar
Hi Matthias first are you in 3.5 or 4 ?, in 4 you have two ways of parametrising: a) for a fixed geometry but with a variable that actson some physics: use the i.e. stationary continuation/extend tab in the Solver subnode b) to vary the geoemtry, add an explicit Parametric to your solver sequence. Only the latter will loop around all your parameter hence rebuild geoemrty and meshing if required This might be (part of?) your issue -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 5, 2010, 2:05 a.m. EDT
Him

yes, I am using 4.0a. I guess the problem of the optimizer not changing anything during its runs (and therefore not detecting any gradients) is due to a second problem, that is the obvious fact that parameter changes are not always propagated correctly.

Regards
Matthias
Him yes, I am using 4.0a. I guess the problem of the optimizer not changing anything during its runs (and therefore not detecting any gradients) is due to a second problem, that is the obvious fact that parameter changes are not always propagated correctly. Regards Matthias

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 5, 2010, 9:00 a.m. EDT
Hi

yes you are the Nth today noticing that the lower subnodes are not updating in 4.0 and 4.0a, I see its fixed in 4.1 ;)

in the previous versions you must update the fields in BOTH node and subnode

--
Good luck
Ivar
Hi yes you are the Nth today noticing that the lower subnodes are not updating in 4.0 and 4.0a, I see its fixed in 4.1 ;) in the previous versions you must update the fields in BOTH node and subnode -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 10, 2010, 1:23 a.m. EST
Actually, support has said something slightly different: I had a parameter that had not had any direct use in a geometry, but was used to calculate other parameters only. This is not properly detected, and the parameter is taken to be not relevant. The workaround is to make the geometry use this parameter as well, e.g. by adding "N-N" (N was my parameter) somewhere as a geometric parameter.
Actually, support has said something slightly different: I had a parameter that had not had any direct use in a geometry, but was used to calculate other parameters only. This is not properly detected, and the parameter is taken to be not relevant. The workaround is to make the geometry use this parameter as well, e.g. by adding "N-N" (N was my parameter) somewhere as a geometric parameter.

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 10, 2010, 2:40 a.m. EST
Hi


Sorry for have missed that; interesting, indeed there are many cases to consider, and COMSOL cannot understand all our wills ;)

--
Good luck
Ivar
Hi Sorry for have missed that; interesting, indeed there are many cases to consider, and COMSOL cannot understand all our wills ;) -- Good luck Ivar

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.