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 10.11.2010, 02:40 GMT-5
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 04.11.2010, 02:41 GMT-4
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 05.11.2010, 02:05 GMT-4
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 05.11.2010, 09:00 GMT-4
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 10.11.2010, 01:23 GMT-5
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 10.11.2010, 02:40 GMT-5
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.