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.

parametric sweep

Please login with a confirmed email address before reporting spam

hi,
can we use geometry parameter like (length, width, height) in parametric sweep, i want to see how the output changes with variation in geometry

8 Replies Last Post 25 mars 2016, 11:56 UTC−4
Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 5 avr. 2013, 04:30 UTC−4

Yes you can do that. It is very useful. Just make sure to set 'use parametric solver' under the Parametric Sweep > Study Extensions to 'OFF'.

Sounds strange, but the parametric solver does not loop through geometry and mesh.

Cheers
Edgar

--
Edgar J. Kaiser
www.emphys.com
Yes you can do that. It is very useful. Just make sure to set 'use parametric solver' under the Parametric Sweep > Study Extensions to 'OFF'. Sounds strange, but the parametric solver does not loop through geometry and mesh. Cheers Edgar -- Edgar J. Kaiser http://www.emphys.com

Nils Malm COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 5 avr. 2013, 07:40 UTC−4
Hello,

Yes you can do that. It is very useful. Just make sure to set 'use parametric solver' under the Parametric Sweep > Study Extensions to 'OFF'.


Changing this setting should not be necessary since the "Automatic" option looks for parameters being used in geometry and mesh settings. If any such use is detected, the parametric solver will not be used. If you find a case where this automatic detection does not work, please report it to COMSOL support.


Sounds strange, but the parametric solver does not loop through geometry and mesh.


The terminology is admittedly a bit confusing with respect to parametric sweeps and the parametric solver. The parametric solver performs an "inner sweep", which is optimized for performance in the sense that it tries to avoid reassembling and refactorizing the Jacobian or reassembling other constant vectors. It also uses the previous solution as initial guess for the next parameter step, speeding up convergence of each step. This is only possible as long as the degrees of freedom stay the same; so it cannot be used when the geometry or mesh is modified.

The parametric solver is also a "continuation solver", meaning that it can control the parameter steps taken in a way similar to a transient solver with automatic time step control. This makes it suitable for solving models in pseudo-time, such as contact and plasticity problems.

The parametric sweep functionality, in contrast, performs an "outer sweep", meaning that it essentially solves a set of independent models. This means that each parameter step will be more expensive to compute since degree of freedom allocation, etc, is redone separately for each step. But on the other hand, this makes it possible to change geometry and mesh between steps, as well as distribute steps, e.g., over nodes in a cluster.

best regards
Nils Malm
Hello, [QUOTE] Yes you can do that. It is very useful. Just make sure to set 'use parametric solver' under the Parametric Sweep > Study Extensions to 'OFF'. [/QUOTE] Changing this setting should not be necessary since the "Automatic" option looks for parameters being used in geometry and mesh settings. If any such use is detected, the parametric solver will not be used. If you find a case where this automatic detection does not work, please report it to COMSOL support. [QUOTE] Sounds strange, but the parametric solver does not loop through geometry and mesh. [/QUOTE] The terminology is admittedly a bit confusing with respect to parametric sweeps and the parametric solver. The parametric solver performs an "inner sweep", which is optimized for performance in the sense that it tries to avoid reassembling and refactorizing the Jacobian or reassembling other constant vectors. It also uses the previous solution as initial guess for the next parameter step, speeding up convergence of each step. This is only possible as long as the degrees of freedom stay the same; so it cannot be used when the geometry or mesh is modified. The parametric solver is also a "continuation solver", meaning that it can control the parameter steps taken in a way similar to a transient solver with automatic time step control. This makes it suitable for solving models in pseudo-time, such as contact and plasticity problems. The parametric sweep functionality, in contrast, performs an "outer sweep", meaning that it essentially solves a set of independent models. This means that each parameter step will be more expensive to compute since degree of freedom allocation, etc, is redone separately for each step. But on the other hand, this makes it possible to change geometry and mesh between steps, as well as distribute steps, e.g., over nodes in a cluster. best regards Nils Malm

Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 5 avr. 2013, 07:52 UTC−4
Nils,

I indeed had a case some time ago, when the automatic detection had not worked. However, I didn't document it and just avoided the automatic setting from then when I did geometry sweeps.
It may also be that it was still the 4.2 or 4.1 version, not sure here.

Cheers
Edgar

--
Edgar J. Kaiser
www.emphys.com
Nils, I indeed had a case some time ago, when the automatic detection had not worked. However, I didn't document it and just avoided the automatic setting from then when I did geometry sweeps. It may also be that it was still the 4.2 or 4.1 version, not sure here. Cheers Edgar -- Edgar J. Kaiser http://www.emphys.com

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 5 avr. 2013, 08:26 UTC−4
Hi Nils

Thanks for the clarification about the two names "Parametric Solver" and "Parametric sweep",
I'll do my best to stick to these from now on ;)


Indeed this tick appear rather recently (and discretely ;)
--
Having fun COMSOLing
Ivar
Hi Nils Thanks for the clarification about the two names "Parametric Solver" and "Parametric sweep", I'll do my best to stick to these from now on ;) Indeed this tick appear rather recently (and discretely ;) -- Having fun COMSOLing Ivar

Álvaro Martín Ortega

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 13 juin 2014, 04:35 UTC−4
Hello,

I have had a similar problem right now, in Comsol 4.4.

When I tried to add a geometry parameter to a sweep already containing other parameters, I obtained the same problem than you (even turning the study extensions off). In this case, the parametric sweep was creating a parametric solver node.

However, if I start over and select a seep only on the geometry parameter, it works! Ant this time, what is created from the parametric sweep is a "Parametric 2" node just under and at the same level than the Solver 1.

I am guessing: the sweeps over the geometry and mesh need to go on the parametric sweep; the ones over other parameters (inputs, change on boundary conditions...) on the parametric solver. That is what I did and seems to work well.

Best,

Álvaro
Hello, I have had a similar problem right now, in Comsol 4.4. When I tried to add a geometry parameter to a sweep already containing other parameters, I obtained the same problem than you (even turning the study extensions off). In this case, the parametric sweep was creating a parametric solver node. However, if I start over and select a seep only on the geometry parameter, it works! Ant this time, what is created from the parametric sweep is a "Parametric 2" node just under and at the same level than the Solver 1. I am guessing: the sweeps over the geometry and mesh need to go on the parametric sweep; the ones over other parameters (inputs, change on boundary conditions...) on the parametric solver. That is what I did and seems to work well. Best, Álvaro

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 18 juin 2015, 22:47 UTC−4
About the parametric sweep, after some tests, I found that this "parametric sweep" can be applied to any parameters, no matter geometry/mesh-related or not (input, source, etc.)

Originally when I add a geometry-related parameter, I got the "Parametric Sweep Parametric solver does not support parameters in geometry or mesh." warning

The solution to this problem is to remove any existing solver configurations, and select "Show default solver" again. Then you will see a "Job Configurations" node added, with a "Parametric 1" sub-node under it.

After this, everything will be OK. The model will be solved again and again for any combinations of parameters you define.

The value of the "Use parametric solver" option could be "Automatic" or "Off", both will be fine.

BTW, the above tests are conducted with COMSOL 5.0
About the parametric sweep, after some tests, I found that this "parametric sweep" can be applied to any parameters, no matter geometry/mesh-related or not (input, source, etc.) Originally when I add a geometry-related parameter, I got the "Parametric Sweep Parametric solver does not support parameters in geometry or mesh." warning The solution to this problem is to remove any existing solver configurations, and select "Show default solver" again. Then you will see a "Job Configurations" node added, with a "Parametric 1" sub-node under it. After this, everything will be OK. The model will be solved again and again for any combinations of parameters you define. The value of the "Use parametric solver" option could be "Automatic" or "Off", both will be fine. BTW, the above tests are conducted with COMSOL 5.0

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 23 mars 2016, 23:14 UTC−4
Suppose I have a parameter that I know will change neither the mesh nor the physics (magnetic fields no current and electrostatics), but only the definition of some variables in the model. When I make changes to this parameter, COMSOL is able to apply the change to these variables when I press the update button without re-solving the physics.

I would really like to be able to plot quantities against this parameter and have access to a drop-down menu in the results section like I would if I did a parametric sweep study. But when I do a parametric sweep on this parameter the solver re-does the physics each time (not the mesh thankfully), even though the parameter only effects the variables in the model, and I have parametric solver set to automatic already.

Any ideas?
Suppose I have a parameter that I know will change neither the mesh nor the physics (magnetic fields no current and electrostatics), but only the definition of some variables in the model. When I make changes to this parameter, COMSOL is able to apply the change to these variables when I press the update button without re-solving the physics. I would really like to be able to plot quantities against this parameter and have access to a drop-down menu in the results section like I would if I did a parametric sweep study. But when I do a parametric sweep on this parameter the solver re-does the physics each time (not the mesh thankfully), even though the parameter only effects the variables in the model, and I have parametric solver set to automatic already. Any ideas?

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 25 mars 2016, 11:56 UTC−4
Hello David,
You can add a second study with an auxiliary sweep in which you solve no equation at all, i.e. the technique explained here: www.comsol.com/blogs/maximum-evaluations-on-parallel-sections/ .
Best regards,
Jeff
Hello David, You can add a second study with an auxiliary sweep in which you solve no equation at all, i.e. the technique explained here: http://www.comsol.com/blogs/maximum-evaluations-on-parallel-sections/ . Best regards, Jeff

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.