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.
How to define an integration for a variable?
Posted 5 janv. 2010, 07:56 UTC−5 7 Replies
Please login with a confirmed email address before reporting spam
Integration coupling variable is used to integrate a variable in the whole boundary or subdomian considered. How can I define an integration for a variable within limits?
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)?
A simple problem I'm interested in is the selfweight calculation for soils in civil engineering. In a certain depth of the soil, the total stress should be an integration of above selfweight.
Sincere thanks for your reply
Roger
Please login with a confirmed email address before reporting spam
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
JF
Please login with a confirmed email address before reporting spam
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
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
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
Please login with a confirmed email address before reporting spam
I am specifically looking for summation as in Fourier and Taylor series.
Thanks
Please login with a confirmed email address before reporting spam
Best,
Jeff
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.
Suggested Content
- KNOWLEDGE BASE Computing Time and Space Integrals
- KNOWLEDGE BASE Reverse Proxy Setup for Model Manager Server
- BLOG Integrals with Moving Limits and Solving Integro-Differential Equations
- BLOG How to Activate Material in Simulations of Manufacturing Processes
- FORUM How to define the integration of electrical resistance
