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.
Subdomain integration in Comsol Script
Posted 2009年6月27日 GMT+8 04:27 5 Replies
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
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.
Please login with a confirmed email address before reporting spam
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
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
Please login with a confirmed email address before reporting spam
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
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.
