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
05.01.2010, 09:17 GMT-5
Hi
You have to study the chapter of "Integration Coupling Variables" in the doc, there are different types, not only on a border or a subdomain (projection or extrusion items), in the worst case you add a few specific interiour subdomains, sometimes this is simpler. In the GUI environment these equivalent to the Postprocessing Cross Section Plot's
Good luck
Ivar
Hi
You have to study the chapter of "Integration Coupling Variables" in the doc, there are different types, not only on a border or a subdomain (projection or extrusion items), in the worst case you add a few specific interiour subdomains, sometimes this is simpler. In the GUI environment these equivalent to the Postprocessing Cross Section Plot's
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
05.01.2010, 11:21 GMT-5
integrate over the whole domain the function f(x)*(x>x0)*(x<x1) and that does what you want
JF
integrate over the whole domain the function f(x)*(x>x0)*(x
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
13.03.2012, 20:49 GMT-4
What you can do is draw 2 lines exactly at the positions you want to carry on the integration.
Then in integration you choose the boundaries , if it is domain or boundary you will see how you can pick up just the space between your lines.
What you can do is draw 2 lines exactly at the positions you want to carry on the integration.
Then in integration you choose the boundaries , if it is domain or boundary you will see how you can pick up just the space between your lines.
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
31.10.2013, 05:34 GMT-4
Hi Roger,
I stumbled upon the same problem.
For integration of f(x,y) from 0 to x I use a separate "General form PDE" with a dependent variable intX on the domain of the function. In the settings I set all coefficients of the PDE to zero exept for the source term f. For the source term f I use: d(intX,x)-f(x,y). By doing so the problem is converted from an integration to a differentiation and therefore a boundary condition needs to be set. This is done by adding a "constraint" to the boundary where x=0 with reaction term R=-intX.
I hope this helps.
But I have another question related to this. Is there a better way to integrate over fixed boundaries? I want to integrate a function f(x,y) from y=0 to y=1. I know I could set up a "General projection" for this but I noticed that this is computationally very expensive. Is there a way to speed it up? Is the nojac()-operator somehow useful?
If I use the built-in integrate()-operator for this, I get an error-message. I think this is due to the fact that this operator is supposed to be used for postprocessing only but not for solving. Am I right on this one?
Hi Roger,
I stumbled upon the same problem.
For integration of f(x,y) from 0 to x I use a separate "General form PDE" with a dependent variable intX on the domain of the function. In the settings I set all coefficients of the PDE to zero exept for the source term f. For the source term f I use: d(intX,x)-f(x,y). By doing so the problem is converted from an integration to a differentiation and therefore a boundary condition needs to be set. This is done by adding a "constraint" to the boundary where x=0 with reaction term R=-intX.
I hope this helps.
But I have another question related to this. Is there a better way to integrate over fixed boundaries? I want to integrate a function f(x,y) from y=0 to y=1. I know I could set up a "General projection" for this but I noticed that this is computationally very expensive. Is there a way to speed it up? Is the nojac()-operator somehow useful?
If I use the built-in integrate()-operator for this, I get an error-message. I think this is due to the fact that this operator is supposed to be used for postprocessing only but not for solving. Am I right on this one?
Please login with a confirmed email address before reporting spam
Posted:
10 years ago
08.06.2015, 11:55 GMT-4
In matlab, we can use int(f(x),x0,x1) which represents the integration of f(x) from x0 to x1?
In comsol, how can we get this kind of integration? For f(x) from 0 to x, is it int(f(x),0,x)?
do it with integrate(expr,var,lower,upper) operator defining some variable tempInt. Here the excerpt from Comsol documentation :
integrate(expr,var,lower,upper) computes the integral of expr for the integration variable var over an interval specified by expressions lower for the lower limit and upper for the upper limit. The expressions for lower and upper limits do not have to be constants but are required to evaluate to real values.
Best
Peter
[QUOTE]
In matlab, we can use int(f(x),x0,x1) which represents the integration of f(x) from x0 to x1?
In comsol, how can we get this kind of integration? For f(x) from 0 to x, is it int(f(x),0,x)?
[/QUOTE]
do it with integrate(expr,var,lower,upper) operator defining some variable tempInt. Here the excerpt from Comsol documentation :
integrate(expr,var,lower,upper) computes the integral of expr for the integration variable var over an interval specified by expressions lower for the lower limit and upper for the upper limit. The expressions for lower and upper limits do not have to be constants but are required to evaluate to real values.
Best
Peter
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
16.10.2016, 12:27 GMT-4
How to find the in built functions such as integrate.
I am specifically looking for summation as in Fourier and Taylor series.
Thanks
How to find the in built functions such as integrate.
I am specifically looking for summation as in Fourier and Taylor series.
Thanks
Jeff Hiller
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
17.10.2016, 13:56 GMT-4
Check out Chapter 5 of the COMSOL Multiphysics Reference Manual, version 5.2a.
Best,
Jeff
Check out Chapter 5 of the COMSOL Multiphysics Reference Manual, version 5.2a.
Best,
Jeff