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
Posted Apr 5, 2013, 4:22 a.m. EDT Version 5.0 8 Replies
Please login with a confirmed email address before reporting spam
can we use geometry parameter like (length, width, height) in parametric sweep, i want to see how the output changes with variation in geometry
Please login with a confirmed email address before reporting spam
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
Please login with a confirmed email address before reporting spam
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
Please login with a confirmed email address before reporting spam
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
Please login with a confirmed email address before reporting spam
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
Please login with a confirmed email address before reporting spam
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
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
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?
Please login with a confirmed email address before reporting spam
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
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.