Henrik Sönnerlind
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
9 years ago
2015年9月16日 GMT-4 16:47
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
2015年9月19日 GMT-4 01:02
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
2015年9月21日 GMT-4 03:04
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
2015年9月22日 GMT-4 05:08
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
2015年9月23日 GMT-4 02:13
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
2015年10月8日 GMT-4 01:23
Thank you, Henrik. It works for my requirements!
Thank you, Henrik. It works for my requirements!