-
Filter by Topic
Most Popular
All Topics
- List all discussions
Post-process two different solutions from a Parametric Sweep...
|
Thread index | Previous thread | Next thread | Start a new discussion |
April 29, 2011 9:38pm UTC
Post-process two different solutions from a Parametric Sweep...
Hello,
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
Reply | Reply with Quote | Send private message | Report Abuse
May 4, 2011 12:13am UTC in response to Claudio Nucera
Re: Post-process two different solutions from a Parametric Sweep...
No one able to help me?
Reply | Reply with Quote | Send private message | Report Abuse
May 4, 2011 7:15am UTC in response to Claudio Nucera
Re: Post-process two different solutions from a Parametric Sweep...
Hi
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
Reply | Reply with Quote | Send private message | Report Abuse
May 4, 2011 4:34pm UTC in response to Ivar Kjelberg
Re: Post-process two different solutions from a Parametric Sweep...
Hi Ivar,
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
Reply | Reply with Quote | Send private message | Report Abuse
May 5, 2011 1:10pm UTC in response to Claudio Nucera
Re: Post-process two different solutions from a Parametric Sweep...
Hi
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
Reply | Reply with Quote | Send private message | Report Abuse
May 5, 2011 4:38pm UTC in response to Ivar Kjelberg
Re: Post-process two different solutions from a Parametric Sweep...
Hi Ivar,
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.
Reply | Reply with Quote | Send private message | Report Abuse
May 5, 2011 7:03pm UTC in response to Claudio Nucera
Re: Post-process two different solutions from a Parametric Sweep...
Hi
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
Reply | Reply with Quote | Send private message | Report Abuse
September 11, 2011 10:40pm UTC in response to Ivar Kjelberg
Re: Post-process two different solutions from a Parametric Sweep...
Were you able to solve your problem? I have to do the same thing, if you solved it, please tell me how.
Reply | Reply with Quote | Send private message | Report Abuse
September 11, 2011 10:48pm UTC in response to Rafael Oliveira
Re: Post-process two different solutions from a Parametric Sweep...
I solved it manually following a different approach. COMSOL support is awful! I spent like 4-5 weeks between completely useless phone conversations and emails and at the end they just told me that what I was asking IS IMPOSSIBLE TO BE DONE IN COMSOL...and we are just talking about a very basic post-processing procedure. Apparently a "with" operator (already implemented in COMSOL but just for inner solutions) able to pick variables from two different outer solutions is really TOO MUCH!
Good luck!
Reply | Reply with Quote | Send private message | Report Abuse
February 9, 2012 7:17pm UTC in response to Claudio Nucera
Re: Post-process two different solutions from a Parametric Sweep...
After all this time, did anyone solve that? Can you describe the steps you did?
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.
Reply | Reply with Quote | Send private message | Report Abuse
Rules and guidelines

