Integral over a closed domain

Integral over a closed domain - Сообщения

#1 Опубликовано: 22.05.2020 09:29:10
SteelCat

SteelCat

3 сообщений из 47 понравились пользователям.

Группа: 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 Опубликовано: 22.05.2020 09:57:44
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: 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 пользователям понравился этот пост
SteelCat 22.05.2020 12:11:00
#3 Опубликовано: 22.05.2020 10:13:12
SteelCat

SteelCat

3 сообщений из 47 понравились пользователям.

Группа: 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 Опубликовано: 22.05.2020 14:45:34
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

That was done multiple times, recently.
Construct the polygons from the book data.
Attach the Smath document ... like done.
Cheers ... Jean
#5 Опубликовано: 22.05.2020 18:08:27
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: 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 пользователям понравился этот пост
frapuano 23.05.2020 02:32:00, SteelCat 23.05.2020 03:35:00
#6 Опубликовано: 23.05.2020 03:36:05
SteelCat

SteelCat

3 сообщений из 47 понравились пользователям.

Группа: 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 Опубликовано: 23.05.2020 08:00:45
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: 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 КиБ) скачан 44 раз(а).

1. Construct your 2 polygons.
2. From the big one: subtract area of small from big.
3. That tread goes no where from nothing.
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений