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.
Post-process two different solutions from a Parametric Sweep...
Posted Apr 29, 2011, 5:38 p.m. EDT Parameters, Variables, & Functions, Results & Visualization Version 5.2 12 Replies
Please login with a confirmed email address before reporting spam
I am using COMSOL 4.1 and I am facing a conceptually simple problem with no luck. Basically I have a simple 2D Eigenvalue Problem which gives me 20 eigenvalues (and 20 eigenmodes) and a Parametric Sweep with 50 parameter values. So, in a nutshell, I have 50 outer solution and 20 inner solutions.
Now I need to estimate a surface integral of a product of two variables through the derived value tab. The only problem is that I need the two variables to be picked from two different solutions (different parameter).
I have looked at the with operator but it lets you choose one inner solution (of the 20 in my case) for a FIXED outer solution (parameter of the Parametric Sweep).
Is there a way to combine these two solutions so that I can define a product like U(outersol(3))*U(outersol(10))?
Thanks very much.
Claudio
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
have you tried to generate 20 integrals of the inner solution and export them as a table, you have also table operations that integrate over the table values, and you can inverse the row-colums
But this does perhaps not allow to pick an item from each in integrate that.
via matlab you should be able though
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
first thanks very much for your response.
With the table approach you suggested I don't think I can solve the problem because inside the integrals I have a product of variables picked from two different outer solutions.
I have tried also with the Livelink for Matlab with no luck because basically the formalism there in order to define an integral is:
val=mphint(model,{'e1','e2',...},'Dataset','X','Outersolnum',Y,'Solnum',Z);
so, as you can see, I can define a specific Dataset with X, a specific Outer Solution with Y and a specific Inner Solution with Z (or eventually using with(...,...) in the expression field) but the problem remains because the expressions to be integrated MUST involve variables picked from the same Outer Solution.
So, to my understanding, there is no way to develop an integral of a product of two variables (it can be also the same quantity) picked from two different outer solutions in a Parametric Sweep Eigenvalue Analysis.
I hope I am wrong because it looks ridiculous that all the solutions and all the variables are stored for each inner and outer solution, but I can't just pick the ones I want to do some post-processing, not even with the Livelink.
Claudio
Please login with a confirmed email address before reporting spam
You have an interesting case there, and I see the potential use, but not the answer ;)
Have you tried to twickle "support" ? at least it could be considered as a "suggesion" for next release
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
yes I have been in contact with the support for the last 2 weeks and, apparently, no one is able to handle the situation.
I hope they are gonna come out with at least a workaround because it is really embarrassing that such a big software lacks very easy post-processing task like mine.
Please login with a confirmed email address before reporting spam
well the reason for matlab or java or... programming access, is really to deal with special cases, even if they look rather evident, now
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
Good luck!
Please login with a confirmed email address before reporting spam
I have a similar problem, where my parametric solution is 225 times (outer solution).
I need to extract variables from different solutions, and integrate them.
Apparently I need comsol not to search from all the solutions. Executing any variant of the following command, keeps returning 225 numbers (all the same). Is any way to overcome that?
lala=mphint(model,' with(2,ec.Jx)-with(5,ec.Jx) ) * (with(12,ec.Jx)-with(25,ec.Jx)', 'edim',3, 'selection',2)
lala=mphint(model,' (with(2,ec.Jx)-with(5,ec.Jx) ) * (with(12,ec.Jx)-with(25,ec.Jx))', 'edim',3,'selection',2,'Outersolnum',1)
lala=mphint(model,' (with(2,ec.Jx)-with(5,ec.Jx) ) * (with(12,ec.Jx)-with(25,ec.Jx))', 'edim',3, 'selection',2,'Solnum',1)
P.S.
I did contact comsol, but support is very disappointing.
Please login with a confirmed email address before reporting spam
Bad news: you need MATLAB and Livelink, both of which cost a pretty penny, and you have to spend time writing the code.
Edit: It may also be possible to do this with the Physics Builder. In the end, no built-in way that I know of.
Please login with a confirmed email address before reporting spam
can some one tell me hw to integrate two solutions from different modes
i have to do surface integration of normal electric field of frequency at w and 2w
Please login with a confirmed email address before reporting spam
www.comsol.co.in/blogs/solution-joining-parametric-eigenfrequency-time-dependent-problems/
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.