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.

Average over a parametric sweep

Please login with a confirmed email address before reporting spam

Hi,

I have a parametric study and would like to plot the average of an expression.
E.g: parameter alpha=0,1,2,3

then I would like to have an operator like

average(expr,alpha,list_of_values)

Is there a possibility to do this?

Thanks in advance.

Jens


3 Replies Last Post 21.01.2014, 09:38 GMT-5
Bettina Schieche COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21.01.2014, 08:30 GMT-5
Hi,

a useful option is provided by the Derived Values in the Results node. Here, the Data Series Operations provide an average over a parametric solution.

For field variables, I recommend having a look at the built-in operators "with" and "sum" in the documentation. The former gives you access to a solution with a certain index in a time-dependent or parametric study, the latter is a new feature with COMSOL 4.4 and allows for summation. An average can thus be realized by (sum(with(i,expr),i,1,4))/4 for a parametric solution with 4 iterations.

Regards
Bettina Schieche
Hi, a useful option is provided by the Derived Values in the Results node. Here, the Data Series Operations provide an average over a parametric solution. For field variables, I recommend having a look at the built-in operators "with" and "sum" in the documentation. The former gives you access to a solution with a certain index in a time-dependent or parametric study, the latter is a new feature with COMSOL 4.4 and allows for summation. An average can thus be realized by (sum(with(i,expr),i,1,4))/4 for a parametric solution with 4 iterations. Regards Bettina Schieche

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21.01.2014, 09:35 GMT-5
Hallo,

thanks for the reply. I need the average of field variables, so only the second option is possible.
But that requires version 4.4 which i cannot use due to huge bug in the ACDC module.

Regards

Jens
Hallo, thanks for the reply. I need the average of field variables, so only the second option is possible. But that requires version 4.4 which i cannot use due to huge bug in the ACDC module. Regards Jens

Bettina Schieche COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21.01.2014, 09:38 GMT-5
You can also do the summation manually using the with operator.

Regards
Bettina Schieche
You can also do the summation manually using the with operator. Regards Bettina Schieche

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.