Jeff Hiller
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
Dec 8, 2016, 8:10 a.m. EST
Hi Linus,
Yes, you can compute such an average by making use of the sum and with operators.
The expression in your example would look something like sum(with(n,Thing_to_average),n,1,5)/5.
See Reference Manual for COMSOL Multiphysics, version 5.2a, page 231 and following) for information on these operators.
Best regards,
Jeff
Hi Linus,
Yes, you can compute such an average by making use of the sum and with operators.
The expression in your example would look something like sum(with(n,Thing_to_average),n,1,5)/5.
See Reference Manual for COMSOL Multiphysics, version 5.2a, page 231 and following) for information on these operators.
Best regards,
Jeff
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
Dec 9, 2016, 9:42 p.m. EST
Hi Linus,
Yes, you can compute such an average by making use of the sum and with operators.
The expression in your example would look something like sum(with(n,Thing_to_average),n,1,5)/5.
See Reference Manual for COMSOL Multiphysics, version 5.2a, page 231 and following) for information on these operators.
Best regards,
Jeff
Is it available for COMSOL version 5.0?
[QUOTE]
Hi Linus,
Yes, you can compute such an average by making use of the sum and with operators.
The expression in your example would look something like sum(with(n,Thing_to_average),n,1,5)/5.
See Reference Manual for COMSOL Multiphysics, version 5.2a, page 231 and following) for information on these operators.
Best regards,
Jeff
[/QUOTE]
Is it available for COMSOL version 5.0?
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
Dec 9, 2016, 10:19 p.m. EST
Hi Linus,
Yes, you can compute such an average by making use of the sum and with operators.
The expression in your example would look something like sum(with(n,Thing_to_average),n,1,5)/5.
See Reference Manual for COMSOL Multiphysics, version 5.2a, page 231 and following) for information on these operators.
Best regards,
Jeff
Greetings Jeff,
Your advise is very helpful! I found the operator at the given page number.
As for integration, the manual states "integrate(expr,var,lower,upper)". But where do I key in this exactly?
For example:
expr = pressure*sin (theta)*cos (theta) -> Definition>Analytic?
var = pressure, theta -> Definition>Variable (from what I understand)
lower = 0 rad; upper = pi/2 rad
I am trying to compute the pressure at every prescribed interval of angle from 0 to pi/2 rad (by parametric sweep). Hence, I will have a set of results for each angle interval.
This is the part where I face difficulty in understanding how to integrate these sets of results together by the above expression. I believe there must be a way for this to be done during the study.
Thank you.
[QUOTE]
Hi Linus,
Yes, you can compute such an average by making use of the sum and with operators.
The expression in your example would look something like sum(with(n,Thing_to_average),n,1,5)/5.
See Reference Manual for COMSOL Multiphysics, version 5.2a, page 231 and following) for information on these operators.
Best regards,
Jeff
[/QUOTE]
Greetings Jeff,
Your advise is very helpful! I found the operator at the given page number.
As for integration, the manual states "integrate(expr,var,lower,upper)". But where do I key in this exactly?
For example:
expr = pressure*sin (theta)*cos (theta) -> Definition>Analytic?
var = pressure, theta -> Definition>Variable (from what I understand)
lower = 0 rad; upper = pi/2 rad
I am trying to compute the pressure at every prescribed interval of angle from 0 to pi/2 rad (by parametric sweep). Hence, I will have a set of results for each angle interval.
This is the part where I face difficulty in understanding how to integrate these sets of results together by the above expression. I believe there must be a way for this to be done during the study.
Thank you.