Discussion ClosedThis 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.

Subdomain integration in Comsol Script

Please login with a confirmed email address before reporting spam

How do you do subdomain integration in comsol script. I just want to find integral of u over one subdomain.

5 Replies Last Post 2009年7月1日 GMT+2 14:23

Please login with a confirmed email address before reporting spam

Posted: 2 decades ago 2009年6月26日 GMT+2 22:47
Why don't you use GUI > Postprocessing > Subdomain Integration and input u as a parameter.
Why don't you use GUI > Postprocessing > Subdomain Integration and input u as a parameter.

Please login with a confirmed email address before reporting spam

Posted: 2 decades ago 2009年6月26日 GMT+2 23:57

Why don't you use GUI > Postprocessing > Subdomain Integration and input u as a parameter.


Thanks, but can't use GUI because I need to repeat the calculation several times with different model parameters and integrate the solution u for each iteration and store it for further processing/analysis. That's why I need to use Comsol Script.
[QUOTE] Why don't you use GUI > Postprocessing > Subdomain Integration and input u as a parameter. [/QUOTE] Thanks, but can't use GUI because I need to repeat the calculation several times with different model parameters and integrate the solution u for each iteration and store it for further processing/analysis. That's why I need to use Comsol Script.

Please login with a confirmed email address before reporting spam

Posted: 2 decades ago 2009年6月27日 GMT+2 04:00
Sorry may be I'm wrong,
but you can for example use parametric analysis, then plot your u (in subdomain integration) and then save data from plot.
Sorry may be I'm wrong, but you can for example use parametric analysis, then plot your u (in subdomain integration) and then save data from plot.

Please login with a confirmed email address before reporting spam

Posted: 2 decades ago 2009年7月1日 GMT+2 12:25

How do you do subdomain integration in comsol script. I just want to find integral of u over one subdomain.


The standard trick:
Use the GUI, calculate the integral from the postprocessing menu.
Save the model as an .m-file.
Open the m-file and see what happened in the end of the file.
You should find a line containing the 'postint' command. The syntax is pretty straightforward look in the manual fort more details.

As I said, whatever command corresponding to the "GUI buttons" could be found this way.
regards Nisse
[QUOTE] How do you do subdomain integration in comsol script. I just want to find integral of u over one subdomain. [/QUOTE] The standard trick: Use the GUI, calculate the integral from the postprocessing menu. Save the model as an .m-file. Open the m-file and see what happened in the end of the file. You should find a line containing the 'postint' command. The syntax is pretty straightforward look in the manual fort more details. As I said, whatever command corresponding to the "GUI buttons" could be found this way. regards Nisse

Please login with a confirmed email address before reporting spam

Posted: 2 decades ago 2009年7月1日 GMT+2 14:23
Thanks Nisse,
yes, I tried what you recommended and works. My final implementation was even simpler and more flexible using the postint command.
Cheers




How do you do subdomain integration in comsol script. I just want to find integral of u over one subdomain.


The standard trick:
Use the GUI, calculate the integral from the postprocessing menu.
Save the model as an .m-file.
Open the m-file and see what happened in the end of the file.
You should find a line containing the 'postint' command. The syntax is pretty straightforward look in the manual fort more details.

As I said, whatever command corresponding to the "GUI buttons" could be found this way.
regards Nisse


Thanks Nisse, yes, I tried what you recommended and works. My final implementation was even simpler and more flexible using the postint command. Cheers [QUOTE] [QUOTE] How do you do subdomain integration in comsol script. I just want to find integral of u over one subdomain. [/QUOTE] The standard trick: Use the GUI, calculate the integral from the postprocessing menu. Save the model as an .m-file. Open the m-file and see what happened in the end of the file. You should find a line containing the 'postint' command. The syntax is pretty straightforward look in the manual fort more details. As I said, whatever command corresponding to the "GUI buttons" could be found this way. regards Nisse [/QUOTE]

Note that while COMSOL employees may participate in the discussion forum, COMSOL®software users who are on-subscription should submit their questions via theSupport Centerfor a more comprehensive response from the Technical Support team.

Baidu
map