Henrik Sönnerlind
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
9 years ago
16 set 2015, 16:47 GMT-4
Hi,
Yes, that is possible by using the setval() argument to withsol().
See for example the discussion in
www.comsol.com/community/forums/general/thread/86181
Regards,
Henrik
Hi,
Yes, that is possible by using the setval() argument to withsol().
See for example the discussion in http://www.comsol.com/community/forums/general/thread/86181
Regards,
Henrik
Please login with a confirmed email address before reporting spam
Posted:
9 years ago
19 set 2015, 01:02 GMT-4
Thank you, Henrik. So, for a certain eigen value, it would be setval('solnum', ##)??
Thank you, Henrik. So, for a certain eigen value, it would be setval('solnum', ##)??
Henrik Sönnerlind
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
9 years ago
21 set 2015, 03:04 GMT-4
Hi,
In your case it probably easiest to pick by eigenvalue number (rather than by value). Use setind() like in withsol('sol1',emw.normE,setind(lambda,2)) to pick eigenvalue number 2.
Trick: Use withsol() in a plot to see that it works as expected. With the expression above you can override the Data set and Mode index selectors in the plot.
Regards,
Henrik
Hi,
In your case it probably easiest to pick by eigenvalue number (rather than by value). Use setind() like in withsol('sol1',emw.normE,setind(lambda,2)) to pick eigenvalue number 2.
Trick: Use withsol() in a plot to see that it works as expected. With the expression above you can override the Data set and Mode index selectors in the plot.
Regards,
Henrik
Please login with a confirmed email address before reporting spam
Posted:
9 years ago
22 set 2015, 05:08 GMT-4
Thank you, Henrik, It works perfectly:) One final question: is there a way to do the same thing by defining variables in the variables section? I have checked that the "withsol" command works for the second set of solutions but not if I try to use the first set of solutions that is stored as Solution Store 1.
Thank you, Henrik, It works perfectly:) One final question: is there a way to do the same thing by defining variables in the variables section? I have checked that the "withsol" command works for the second set of solutions but not if I try to use the first set of solutions that is stored as Solution Store 1.
Henrik Sönnerlind
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
9 years ago
23 set 2015, 02:13 GMT-4
Hi,
It should work under Variables too. Variables containing withsol() operators can of course not be used in a place in the solver sequence before the referenced solution is computed. But that should not be the issue here, since it seems to be the first solution (='sol2') which causes problems.
Please submit your model to support if you cannot sort out this problem.
Regards,
Henrik
Hi,
It should work under Variables too. Variables containing withsol() operators can of course not be used in a place in the solver sequence before the referenced solution is computed. But that should not be the issue here, since it seems to be the first solution (='sol2') which causes problems.
Please submit your model to support if you cannot sort out this problem.
Regards,
Henrik
Please login with a confirmed email address before reporting spam
Posted:
9 years ago
8 ott 2015, 01:23 GMT-4
Thank you, Henrik. It works for my requirements!
Thank you, Henrik. It works for my requirements!