Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline SteelCat  
#1 Posted : 22 May 2020 15:29:10(UTC)
SteelCat


Rank: Advanced Member

Groups: Registered
Joined: 02/05/2020(UTC)
Posts: 41
Italy

Was thanked: 3 time(s) in 3 post(s)
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)Dry

Edited by user 22 May 2020 15:54:46(UTC)  | Reason: Not specified

Physics is like sex. Sure, it may give some practical results, but that’s not why we do it. (R. Feynman)

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Jean Giraud  
#2 Posted : 22 May 2020 15:57:44(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
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
thanks 1 user thanked Jean Giraud for this useful post.
on 22/05/2020(UTC)
Offline SteelCat  
#3 Posted : 22 May 2020 16:13:12(UTC)
SteelCat


Rank: Advanced Member

Groups: Registered
Joined: 02/05/2020(UTC)
Posts: 41
Italy

Was thanked: 3 time(s) in 3 post(s)
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

Edited by user 22 May 2020 18:07:21(UTC)  | Reason: Not specified

Physics is like sex. Sure, it may give some practical results, but that’s not why we do it. (R. Feynman)
Offline Jean Giraud  
#4 Posted : 22 May 2020 20:45:34(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
That was done multiple times, recently.
Construct the polygons from the book data.
Attach the Smath document ... like done.
Cheers ... Jean
Offline mkraska  
#5 Posted : 23 May 2020 00:08:27(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
Originally Posted by: SteelCat Go to Quoted Post
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://smath.com/wiki/SMath_with_Plugins.ashx
thanks 2 users thanked mkraska for this useful post.
on 23/05/2020(UTC),  on 23/05/2020(UTC)
Offline SteelCat  
#6 Posted : 23 May 2020 09:36:05(UTC)
SteelCat


Rank: Advanced Member

Groups: Registered
Joined: 02/05/2020(UTC)
Posts: 41
Italy

Was thanked: 3 time(s) in 3 post(s)
Originally Posted by: mkraska Go to Quoted Post
Originally Posted by: SteelCat Go to Quoted Post
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)
Offline Jean Giraud  
#7 Posted : 23 May 2020 14:00:45(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: SteelCat Go to Quoted Post
It certainly works, but maybe there is something more elegant, even for numerical applications ...

More elegant than what ?

Maths Polygon Area_Perimeter.sm (76kb) downloaded 20 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.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.