Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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 integration combining several solutions

Please login with a confirmed email address before reporting spam

Basically, I have the following problem: I am computing stationary electromagnetic modes (using RF module) for the same structure, but at different carrier frequencies. And I need to compute certain domain integrals, using field profiles at _different_ frequencies. I like the postint function in comsol, but looks like it accepts only fields computed at the one given frequency - I cannot see how to import field profiles previously computed at different frequencies and compute the integral... Any ideas?

12 Replies Last Post Jul 18, 2011, 2:49 p.m. EDT
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 11, 2011, 1:47 a.m. EST
Hi

check the doc for the "at()" and "with()" operators

--
Good luck
Ivar
Hi check the doc for the "at()" and "with()" operators -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 11, 2011, 5:35 a.m. EST
would be nice to know which "doc" should I check... That's the general problem with COMSOL that I have: I cannot find any good documentation. I have 6 thick books which came together with the package, but they are nearly useless...

Or maybe you just show me how to do that, the task is really simple. At the moment I have in my matlab code:

fem.sol=femeig(fem, ...
'complexfun','on', ...
'solcomp',{'tHxHy20','tHxHy10','tHxHy21','hz'}, ...
'outcomp',{'tHxHy20','tHxHy10','tHxHy21','hz'}, ...
'blocksize','auto', ...
'neigs',2, ...
'shift',-betatrial*i);

Ip=postint(fem,'Ex*Ey', ...
'recover','off', ...
'dl',[1,2], ...
'solnum',1);

And what I really need is to replace, say Ey, with the corresponding field from another solution (computed for different model parameters but on exactly the same mesh) which is stored, e.g., in fem1... Is it possible at all?
would be nice to know which "doc" should I check... That's the general problem with COMSOL that I have: I cannot find any good documentation. I have 6 thick books which came together with the package, but they are nearly useless... Or maybe you just show me how to do that, the task is really simple. At the moment I have in my matlab code: fem.sol=femeig(fem, ... 'complexfun','on', ... 'solcomp',{'tHxHy20','tHxHy10','tHxHy21','hz'}, ... 'outcomp',{'tHxHy20','tHxHy10','tHxHy21','hz'}, ... 'blocksize','auto', ... 'neigs',2, ... 'shift',-betatrial*i); Ip=postint(fem,'Ex*Ey', ... 'recover','off', ... 'dl',[1,2], ... 'solnum',1); And what I really need is to replace, say Ey, with the corresponding field from another solution (computed for different model parameters but on exactly the same mesh) which is stored, e.g., in fem1... Is it possible at all?

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 11, 2011, 8:04 a.m. EST
Each manual has an index at the end. You'll quickly find out that the User's Guide's index has an entry for the at operator and one for the with operator.
Each manual has an index at the end. You'll quickly find out that the User's Guide's index has an entry for the at operator and one for the with operator.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 11, 2011, 8:29 a.m. EST
I may sound captious, but the Comsol Multiphysics User's Guide Index has no entries for "with" or "at" operators. In fact it does not have entries for any operators.

But anyway, I think I found short description of these operators in the HTML version of User's guide (Quick reference) - and I believe this is not going to help me. Because with() allows me to access any solution within the same fem structure. However in my case I need to combine solutions from different fem structures - i.e. results of two different runs
I may sound captious, but the Comsol Multiphysics User's Guide Index has no entries for "with" or "at" operators. In fact it does not have entries for any operators. But anyway, I think I found short description of these operators in the HTML version of User's guide (Quick reference) - and I believe this is not going to help me. Because with() allows me to access any solution within the same fem structure. However in my case I need to combine solutions from different fem structures - i.e. results of two different runs

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 11, 2011, 8:46 a.m. EST
The at operator is listed in the User's Guide version 3.5a's index on page 606.
The with operator is listed in the User's Guide version 3.5a's index on page 623.
Version 3.5a is the most recent version with "thick books" so I am guessing that's the one for which you have those books.
The at operator is listed in the User's Guide version 3.5a's index on page 606. The with operator is listed in the User's Guide version 3.5a's index on page 623. Version 3.5a is the most recent version with "thick books" so I am guessing that's the one for which you have those books.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 11, 2011, 9:36 a.m. EST
I have User's Guide for version 3.3
I have User's Guide for version 3.3

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 11, 2011, 10:31 a.m. EST
That explains things. I don't believe those operators existed back then.
Try out version 4.1 when you get a chance.
That explains things. I don't believe those operators existed back then. Try out version 4.1 when you get a chance.

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 11, 2011, 11:11 a.m. EST
Hi

also index your pdf docs with an "indexer", that makes life far easier and quicker to find things

--
Good luck
Ivar
Hi also index your pdf docs with an "indexer", that makes life far easier and quicker to find things -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 17, 2011, 5:30 a.m. EDT

Basically, I have the following problem: I am computing stationary electromagnetic modes (using RF module) for the same structure, but at different carrier frequencies. And I need to compute certain domain integrals, using field profiles at _different_ frequencies. I like the postint function in comsol, but looks like it accepts only fields computed at the one given frequency - I cannot see how to import field profiles previously computed at different frequencies and compute the integral... Any ideas?


HI,

I also want to combine many small solutions together.
Because i have do a parametric sweep to study a transient problem, which will produce about 60 segregated solutions .
Firstly i try turn on the option " store solution in model", in that way i can get these 60 solutions in the opening model, but unfortunately, 60 parametric solutions are so big that the solver will alway stop on the way.
Finally, I have to turn off the "store solution in model" and add "save solution to files" which will create 60 mph files containing every solutions.
Each solution represent 1 second of simulation process, if i want to get a line plot from the 1s to 60s, how should I do?
Is there any way to make a combination of these solutions? This will be the best way to solve the issue if it can.

Please some advice, thanks very much.
Best regards.
[QUOTE] Basically, I have the following problem: I am computing stationary electromagnetic modes (using RF module) for the same structure, but at different carrier frequencies. And I need to compute certain domain integrals, using field profiles at _different_ frequencies. I like the postint function in comsol, but looks like it accepts only fields computed at the one given frequency - I cannot see how to import field profiles previously computed at different frequencies and compute the integral... Any ideas? [/QUOTE] HI, I also want to combine many small solutions together. Because i have do a parametric sweep to study a transient problem, which will produce about 60 segregated solutions . Firstly i try turn on the option " store solution in model", in that way i can get these 60 solutions in the opening model, but unfortunately, 60 parametric solutions are so big that the solver will alway stop on the way. Finally, I have to turn off the "store solution in model" and add "save solution to files" which will create 60 mph files containing every solutions. Each solution represent 1 second of simulation process, if i want to get a line plot from the 1s to 60s, how should I do? Is there any way to make a combination of these solutions? This will be the best way to solve the issue if it can. Please some advice, thanks very much. Best regards.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 17, 2011, 5:36 a.m. EDT

Hi

also index your pdf docs with an "indexer", that makes life far easier and quicker to find things

--
Good luck
Ivar


HI, Dr.Ivar

I also want to combine many small solutions together.
Because i do a parametric sweep to study a transient problem, which will produce about 60 segregated solutions .

Firstly I try turn on the option " store solution in model", in that way i can get these 60 solutions in the opening model, but unfortunately, 60 parametric solutions are so big that the solver will alway stop on the way.

Finally, I have to turn off the "store solution in model" and add "save solution to files" which will create 60 mph files containing every solutions.

Each solution represent 1 second of the simulation process, if i want to get a line plot from 1s to 60s, how should I do?
Is there any way to make a combination of these solutions? It will be the best way to solve the issue if there is possibility.

Please some advice, thanks very much.
Best regards.
[QUOTE] Hi also index your pdf docs with an "indexer", that makes life far easier and quicker to find things -- Good luck Ivar [/QUOTE] HI, Dr.Ivar I also want to combine many small solutions together. Because i do a parametric sweep to study a transient problem, which will produce about 60 segregated solutions . Firstly I try turn on the option " store solution in model", in that way i can get these 60 solutions in the opening model, but unfortunately, 60 parametric solutions are so big that the solver will alway stop on the way. Finally, I have to turn off the "store solution in model" and add "save solution to files" which will create 60 mph files containing every solutions. Each solution represent 1 second of the simulation process, if i want to get a line plot from 1s to 60s, how should I do? Is there any way to make a combination of these solutions? It will be the best way to solve the issue if there is possibility. Please some advice, thanks very much. Best regards.

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 17, 2011, 8:29 a.m. EDT
Hi

as said in the other thread, I do not see any other way than use matlab to open all files, one by one, and build up your own "transverse" data base. Unfortunately, I have not used matlab with v4 (not needed it so far) so I'm no longer/not yet familiar with the new matlab naming and convention for v4. But I'm suer others out here are more experienced than me

--
Good luck
Ivar
Hi as said in the other thread, I do not see any other way than use matlab to open all files, one by one, and build up your own "transverse" data base. Unfortunately, I have not used matlab with v4 (not needed it so far) so I'm no longer/not yet familiar with the new matlab naming and convention for v4. But I'm suer others out here are more experienced than me -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 18, 2011, 2:49 p.m. EDT

would be nice to know which "doc" should I check... That's the general problem with COMSOL that I have: I cannot find any good documentation. I have 6 thick books which came together with the package, but they are nearly useless...

Or maybe you just show me how to do that, the task is really simple. At the moment I have in my matlab code:

fem.sol=femeig(fem, ...
'complexfun','on', ...
'solcomp',{'tHxHy20','tHxHy10','tHxHy21','hz'}, ...
'outcomp',{'tHxHy20','tHxHy10','tHxHy21','hz'}, ...
'blocksize','auto', ...
'neigs',2, ...
'shift',-betatrial*i);

Ip=postint(fem,'Ex*Ey', ...
'recover','off', ...
'dl',[1,2], ...
'solnum',1);

And what I really need is to replace, say Ey, with the corresponding field from another solution (computed for different model parameters but on exactly the same mesh) which is stored, e.g., in fem1... Is it possible at all?


Hi Andrey,

Did you ever find a way to do this? I need to do exactly the same thing and am having a lot of difficulty.
[QUOTE] would be nice to know which "doc" should I check... That's the general problem with COMSOL that I have: I cannot find any good documentation. I have 6 thick books which came together with the package, but they are nearly useless... Or maybe you just show me how to do that, the task is really simple. At the moment I have in my matlab code: fem.sol=femeig(fem, ... 'complexfun','on', ... 'solcomp',{'tHxHy20','tHxHy10','tHxHy21','hz'}, ... 'outcomp',{'tHxHy20','tHxHy10','tHxHy21','hz'}, ... 'blocksize','auto', ... 'neigs',2, ... 'shift',-betatrial*i); Ip=postint(fem,'Ex*Ey', ... 'recover','off', ... 'dl',[1,2], ... 'solnum',1); And what I really need is to replace, say Ey, with the corresponding field from another solution (computed for different model parameters but on exactly the same mesh) which is stored, e.g., in fem1... Is it possible at all? [/QUOTE] Hi Andrey, Did you ever find a way to do this? I need to do exactly the same thing and am having a lot of difficulty.

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.