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.
Integration over limited region
Posted May 10, 2010, 8:41 a.m. EDT Materials, Modeling Tools & Definitions, Parameters, Variables, & Functions, Results & Visualization Version 4.0, Version 4.0a, Version 4.1, Version 4.2, Version 4.2a 9 Replies
Please login with a confirmed email address before reporting spam
I want to calculate an integral of a function only on part of a subdomain.
For example
g(x)=integral of f(x') from x'=0 to x'=x
I think an integration coupling variable it is not possible since it always integrates over the hole subdomain.
Thanks for your help,
Oliver
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
I would say too that Danial has right, the easiest is to sudivide your domains or boundaries. But if you know the coordinate limits you can also get around with a bolean expression of the type
Integr_variable = mises_smsld*((x-x0)^2+(y-y0)^2<=R^2)
where R is a constant, but you should then also normalise over the
Area=1*((x-x0)^2+(y-y0)^2<=R^2)
Have fun Comsoling
Ivar
Please login with a confirmed email address before reporting spam
Hi
I would say too that Danial has right, the easiest is to sudivide your domains or boundaries. But if you know the coordinate limits you can also get around with a bolean expression of the type
Integr_variable = mises_smsld*((x-x0)^2+(y-y0)^2<=R^2)
where R is a constant, but you should then also normalise over the
Area=1*((x-x0)^2+(y-y0)^2<=R^2)
Have fun Comsoling
Ivar
Everyday something new to learn. great tip Ivar.
Please login with a confirmed email address before reporting spam
thank you for your answers.
Since I wanted to have a continuous function it does not work with the subdomain.
But I found an other option which seems to work.
I defined an integration coupling variable as.
g(x) = f * (dest(x')>=x')
this seems to be what I wanted.
Best regards,
Oli
Please login with a confirmed email address before reporting spam
If I understand you well you are also then playing with defined "destinations" and not just "global", otherwise you will get many items no ?
Perhaps not important with todays computer power
have fun Comsoling
Ivar
Please login with a confirmed email address before reporting spam
Yes it is quite time consument...
But with your advice I can avoid the problem of defining new subdomains, but it just works for a certain value of R or?
So in particular I want to calculate a local generation rate depending on an integral from one boundary to that local point. To use your method I would have to change R localy - is that possible?
But then it is not fast than with dest(x), or?
I do have fun Comsoling!
Oli
Please login with a confirmed email address before reporting spam
I think I have a similar problem with you. Instead of integrating over a whole boundary/line, I want to integrate f(x) from x=0 to x itself over arbitrary line (probably only lines paralleled to x axis) within a subdomain. Did f * (dest(x')>=x') in "integration coupling variables" work out finally? Did you choose subdomain variable or boundary variable? Your help will be greatly appreciated.
Thanks,
Fan
Please login with a confirmed email address before reporting spam
it worked fine at the end and I chose subdomain varaiables. So just try it and perhaps play around with the integral definitions in order to get some feeling for this.
Best Regards,
Oliver
Please login with a confirmed email address before reporting spam
I have a somewhat related problem:
on a whole 3D (x, y, z) domain, I want to define a value f(x)=integral over y and z of k(x,y,z)
With k beeing my turbulent cinetic energy.
How can I do this?
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 Out of Memory During Assembly
- KNOWLEDGE BASE Reverse Proxy Setup for Model Manager Server
- FORUM Attributes for each region, integration over region
- BLOG Curve Fitting of Experimental Data with COMSOL Multiphysics
- KNOWLEDGE BASE Unsupported Integration Order