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.

Boundary Integration in a Parametric Sweep

Please login with a confirmed email address before reporting spam

Hey all,

I am running a parametric sweep solver across several values for a single constant and I need to be able to output the total force per area on a circle composed of 4 boundaries for each iteration (a boundary integration). My understanding is that the parametric solver by default evaluates global variables (so what I am getting currently is the force per area summed up for all points in the geometry). Is there a syntax (or perhaps a .m file edit) for specifying the parametric solver to integrate the total force per area across those 4 boundaries for each iteration (and output it to a .txt file)?

Thank you!

Cheers,
Gar Waterman
Bucknell University - Biomedical Engineering '11

6 Replies Last Post Mar 11, 2014, 1:27 a.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 Apr 20, 2010, 1:52 a.m. EDT
Hi

If I understand you, you have one (or several the same) boundary over which you integrate the force density to get a total force (or pressure, depends on your formula), well this is, with a parametric sweep calcualted for each step, so if you set the parameter value in teh postprocessing global tab to any value you get the results for that specific value,, if you do a boundary integration on the solution, you can either use the "apply" to get the value of the currently selected parameter step (see also the with() operator, or the at() for time series) or you hit the "plot" button and you get a graph your foce versus the paramete values. You might then dump the plot as an ascii file, or you use matlab to continue your data treatment

Hope this helps on the way
have fun comsoling
Ivar
Hi If I understand you, you have one (or several the same) boundary over which you integrate the force density to get a total force (or pressure, depends on your formula), well this is, with a parametric sweep calcualted for each step, so if you set the parameter value in teh postprocessing global tab to any value you get the results for that specific value,, if you do a boundary integration on the solution, you can either use the "apply" to get the value of the currently selected parameter step (see also the with() operator, or the at() for time series) or you hit the "plot" button and you get a graph your foce versus the paramete values. You might then dump the plot as an ascii file, or you use matlab to continue your data treatment Hope this helps on the way have fun comsoling Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 20, 2010, 8:28 a.m. EDT
Hey Ivar,

First of all, thank you very much for taking the time to respond - it is very much appreciated!

I see in the postprocessing menu the option to plot across multiple solutions, but there is only one solution available, despite that I have run the parametric solver. How do I get COMSOL to "see" the other solutions I have solved for?

Also, I need to only plot the force/area vs. parameter step for a very specific set of boundaries (not an integration of the whole solution). I don't see where I would select which specific boundaries I want is the "Plot Parameters" dialogue box, or the "Global Variables Plot" dialogue box. And while I see the option to select specific boundaries in the "Boundary Integration" box, there is not an option to plot is across multiple solutions (it can only be output a value for the current solution).

Thank you!

Gar
Hey Ivar, First of all, thank you very much for taking the time to respond - it is very much appreciated! I see in the postprocessing menu the option to plot across multiple solutions, but there is only one solution available, despite that I have run the parametric solver. How do I get COMSOL to "see" the other solutions I have solved for? Also, I need to only plot the force/area vs. parameter step for a very specific set of boundaries (not an integration of the whole solution). I don't see where I would select which specific boundaries I want is the "Plot Parameters" dialogue box, or the "Global Variables Plot" dialogue box. And while I see the option to select specific boundaries in the "Boundary Integration" box, there is not an option to plot is across multiple solutions (it can only be output a value for the current solution). Thank you! Gar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 20, 2010, 11:31 a.m. EDT
UPDATE:

I had been using 'parametric sweep' instead of going into solver parameters (F11). Now, I have been able to store all the different solutions and access them from the Postprocessing>Boundary Integration dialogue. I have also been able to plot them and export the data for further processing. Problem solved! I'll update further if I run into any more issues...

Thank you very much!

Cheers,
Gar
UPDATE: I had been using 'parametric sweep' instead of going into solver parameters (F11). Now, I have been able to store all the different solutions and access them from the Postprocessing>Boundary Integration dialogue. I have also been able to plot them and export the data for further processing. Problem solved! I'll update further if I run into any more issues... Thank you very much! Cheers, Gar

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 21, 2010, 3:32 p.m. EDT
Hi

indeed, when you change your application mode parameters use rater the "physics - Properties - analysis type" to change from static to parametric or to eigenfrequency

In the "solve - solver parameters" you have 2 places to adapt, the application mode (top and you might have several and not all are wanted in say parametric) and the solver: also to be set (separately in this view) to parametric.

This is confusing when you have 1 physics, but rhter logical when you have several application modes = physics running

Have fun Comsoling
Ivar
Hi indeed, when you change your application mode parameters use rater the "physics - Properties - analysis type" to change from static to parametric or to eigenfrequency In the "solve - solver parameters" you have 2 places to adapt, the application mode (top and you might have several and not all are wanted in say parametric) and the solver: also to be set (separately in this view) to parametric. This is confusing when you have 1 physics, but rhter logical when you have several application modes = physics running Have fun Comsoling Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 29, 2011, 8:44 a.m. EDT
Hello Ivar,

I am trying to run an analysis entirely using the matlab interface. I want to plot reaction force (RFZ_smaxi) on a boundary in my model against the parameter values. (I am using a parameter sweep).

The syntax "postsum" only gives the sum for all the solution numbers.
I want to be able to plot it like it is possible from the GUI.

Any suggestions?

Thanks,
Aseem
Hello Ivar, I am trying to run an analysis entirely using the matlab interface. I want to plot reaction force (RFZ_smaxi) on a boundary in my model against the parameter values. (I am using a parameter sweep). The syntax "postsum" only gives the sum for all the solution numbers. I want to be able to plot it like it is possible from the GUI. Any suggestions? Thanks, Aseem

Polepalli Siva Krishna

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 11, 2014, 1:27 a.m. EDT
hi
can i integrate the 2 parameters at a time
hi can i integrate the 2 parameters at a time

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.