Integral over a closed domain

Integral over a closed domain - Messages

#1 Posted: 5/22/2020 9:29:10 AM
SteelCat

SteelCat

3 likes in 47 posts.

Group: User

Hi everyone,
I'm looking for some tips to make applications about the integration of a function over a closed non rectangular domain (i.e Green's theorem)
Physics is like sex. Sure, it may give some practical results, but that’s not why we do it. (R. Feynman)
#2 Posted: 5/22/2020 9:57:44 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

In short: area of a closed contour goes by the rule of the polygon.
Something in preparation ~ one day.
Not so easy on some difficult f(x,y) that have no symbolic.
Cheers ... Jean
1 users liked this post
SteelCat 5/22/2020 12:11:00 PM
#3 Posted: 5/22/2020 10:13:12 AM
SteelCat

SteelCat

3 likes in 47 posts.

Group: User

On a textbook I found some applications with a fictitious rettangular domain and a function (theta in the picture) defined from vertices coords, that accounts for the effective boundary.
It certainly works, but maybe there is something more elegant, even for numerical applications ...

Annotazione 2020-05-22 150801.jpg
Physics is like sex. Sure, it may give some practical results, but that’s not why we do it. (R. Feynman)
#4 Posted: 5/22/2020 2:45:34 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

That was done multiple times, recently.
Construct the polygons from the book data.
Attach the Smath document ... like done.
Cheers ... Jean
#5 Posted: 5/22/2020 6:08:27 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote

On a textbook I found some applications with a fictitious rettangular domain and a function (theta in the picture) defined from vertices coords, that accounts for the effective boundary.
It certainly works, but maybe there is something more elegant, even for numerical applications ...

Annotazione 2020-05-22 150801.jpg



You could use finite elements. Create a mesh e.g. of triangles and use some quadrature formula inside the triangles based on some interpolation formula between the vertices (and for second order approximation also midside node). This provides an approximation which gets better with finer mesh.

So what you need is:
  • A triangulation method
  • an generic element integrator and
  • some integration loop over all elements.


The most simple integrator for linear triangles is the average of the nodal values times the area of the triangle, but you also could use some quadrature formula based on internal locations (like Gauss quadrature).

If you have a closed form integral for a single triangle of arbitrary size, then you can create a triangulation just using the boundary points without further mesh generation. The result is exact in this case.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
2 users liked this post
frapuano 5/23/2020 2:32:00 AM, SteelCat 5/23/2020 3:35:00 AM
#6 Posted: 5/23/2020 3:36:05 AM
SteelCat

SteelCat

3 likes in 47 posts.

Group: User

Wrote

Wrote

On a textbook I found some applications with a fictitious rettangular domain and a function (theta in the picture) defined from vertices coords, that accounts for the effective boundary.
It certainly works, but maybe there is something more elegant, even for numerical applications ...

Annotazione 2020-05-22 150801.jpg



You could use finite elements. Create a mesh e.g. of triangles and use some quadrature formula inside the triangles based on some interpolation formula between the vertices (and for second order approximation also midside node). This provides an approximation which gets better with finer mesh.

So what you need is:
  • A triangulation method
  • an generic element integrator and
  • some integration loop over all elements.


The most simple integrator for linear triangles is the average of the nodal values times the area of the triangle, but you also could use some quadrature formula based on internal locations (like Gauss quadrature).

If you have a closed form integral for a single triangle of arbitrary size, then you can create a triangulation just using the boundary points without further mesh generation. The result is exact in this case.



Many thanks for your point of view.
Physics is like sex. Sure, it may give some practical results, but that’s not why we do it. (R. Feynman)
#7 Posted: 5/23/2020 8:00:45 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

It certainly works, but maybe there is something more elegant, even for numerical applications ...


More elegant than what ?

Maths Polygon Area_Perimeter.sm (75 KiB) downloaded 43 time(s).

1. Construct your 2 polygons.
2. From the big one: subtract area of small from big.
3. That tread goes no where from nothing.
  • New Posts New Posts
  • No New Posts No New Posts