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.
How to use parametric sweep by loading parameter values?
Posted 7 giu 2012, 06:02 GMT-4 8 Replies
Please login with a confirmed email address before reporting spam
I have several parameters to add in study settings, as below:
parameter: a1 a2 a3 a4 a5
first set: 1 3 4 5 7
second set: 2 1 3 6 4
...etc.
There are many sets, so I don't want to key in step by step.
My question is how to edit the parameter values file(*.txt form) to load into comsol model?
Please login with a confirmed email address before reporting spam
in v4.2a there is only the way: {{a1_1 a2_1 a3_1 ...}, {a1_2 a2_2 a3_3 ....}, {a1_3 a2_3 a3_3 ...}}
AND the a1 must be a monotone increasing or decreasing series without 2 identical step values
You might add a dummy variabble in fron for the step increase
In V4.3 I have heard there are improved ways, quicker to set up, but I'm still waiting for the CD, promished for next week :)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
I solve my problem~~
Please login with a confirmed email address before reporting spam
I have a similar question.
I have two sets of parameters : length and width.
I do not want to have a step function but only for specific values : Length- 10,20,40,60,90
Width - 1,2,5,10
I do not want to use a step function as this is extremely time consuming and takes a very long time for values that i do not need.
I have added two differernt parametric sweeps one for each parameter.
Would you please tell me how to add these specific values.
Thanks.
Please login with a confirmed email address before reporting spam
there is something I do not fully understand in your demand. That you want as "output" a certain set of values I do follow, that you do not want COMSOL to do any "intermediate steps" because that takes time, in principle yes, but in practice this might NOT be possible !
the way COMSOl is set up is to get, in average to THE solution, in the best way, for that it takes into considerations many issues (I expect only "support" could give a full list). If you define a "Parametric Sweep" with two parameters and give your values as range, then COMSOL will try to use these, but it might not manage to make the solution converge.
If you define a ramp or step function and allow for a more continuous range, then COMSOL can try intermediate steps, if not no, it might fail in some cases.
From my experience, when you have only small geometrical changes, then mostly COMSOl converges nicely (without need fo any intermediate steps), if you give good initial conditions.
One way is to solve the case once and then rerun the parametric sweep by using values from the first solution. But by default COMSOL starts with the model initial conditions, wich are "all 0" except if you have adapted them manually (which highly suggested that you do)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Thanks for your reply.
However, I do not fully understand about convergence of the solutions. I read some more discussion forum topics and familiarized myself to taking the solution of an output and then making it the initial conditions for the next set of runs.
However, I have not done this.
For example, I have two parametric Sweeps, one for length and one for width of a rectangle for instance.
Length - 1,7,70,93 m
Width - 1,7,13,17 m
When I run the parametric sweep, I have a solution say for these particular values
{Length, width}={70,13}
Now if i use this same combination of parameters, only this time without using a parametric sweep, the solution converges.
Could you please tell me what is the difference between these two situations. I may have confused myself with the two things together, but it would be very helpful if you explain.
Thanks.
Sahana
Please login with a confirmed email address before reporting spam
I try to use parametric sweep for more than one parameter, foe example I enter several parameters with different ranges in parameter name, when I push study to compute it, this problem pops up:
"Parameter lists do not have equal length for Specified combination Sweep type."
what should I do?
Thanks.
Please login with a confirmed email address before reporting spam
In my experience, when I set the following, the COMSOL generated the same error message saying
"Parameter lists do not have equal length for Specified combination Sweep type."
a=(5,5,15) --> 5, 10, 15 therefore '3' values
b=(1,1,2) --> 1, 2 therefore '2' values
However, when I matched the number of values as follows, it worked out well.
a=(5,5,15) --> 5, 10, 15 therefore '3' values
b=(1,1,3) --> 1,2,3 therefore '3' values
Please login with a confirmed email address before reporting spam
Sounds like you have the "Specified combinations" selected when you may have wanted "All combinations".
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.