CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

estimating surface normals and areas in structured mesh

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 9, 2020, 04:31
Default estimating surface normals and areas in structured mesh
  #1
New Member
 
Join Date: Jun 2015
Posts: 12
Rep Power: 7
cfdwave is on a distinguished road
Hi All,

Sorry if the question might be simple but I have my data on a simple regular grid and am interested to estimate surface normal and area of the geometry to use to do surface integrals. My data structure are slightly specific and I have posted the details here

https://stackoverflow.com/questions/...tructured-grid

I would really appreciate any comments.
Thanks
Ashkan
cfdwave is offline   Reply With Quote

Old   May 9, 2020, 07:08
Default
  #2
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 1,323
Blog Entries: 19
Rep Power: 30
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
It seems like you are after a way to compute surface integral within a level-set like immersed boundary approach. There is surely literature on this but I can'trecall any specific paper at the moment. Have you tried searching with more specific keywords?
sbaffini is offline   Reply With Quote

Old   May 9, 2020, 07:21
Default
  #3
New Member
 
Join Date: Jun 2015
Posts: 12
Rep Power: 7
cfdwave is on a distinguished road
Quote:
Originally Posted by sbaffini View Post
It seems like you are after a way to compute surface integral within a level-set like immersed boundary approach. There is surely literature on this but I can'trecall any specific paper at the moment. Have you tried searching with more specific keywords?

That is absolutely correct Paolo that what I am after is very similar to immersed boundary and I indeed searched with keywords of immersed boundary but could not find anything.
cfdwave is offline   Reply With Quote

Old   May 9, 2020, 07:36
Default
  #4
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 1,323
Blog Entries: 19
Rep Power: 30
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
I work with a different kind of immersed boundary, where surface integrals are straightforward, so this sort of things it's not in my daily routine and I can't recall any specific paper at the moment. But there are literally dozens where the approach is at least similar.

If I had to give you my 2 cents (to be taken with a grain of salt) I would go with:

1) marching cube (square in 2D) algorithm to find the exact intersection for a given, arbitrary, level-set value. Should be quite simple in 2D over a structured grid (https://en.wikipedia.org/wiki/Marching_squares)

2) 1 should give you a set of edges with relative intersected cells, from which you can get the function to be integrated using the correct side. Sum all over the edges (order should be irrelevant) and you should be done
sbaffini is offline   Reply With Quote

Old   May 9, 2020, 07:46
Default
  #5
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 1,323
Blog Entries: 19
Rep Power: 30
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Of course, this might well be an overkill. You could also just loop on all the cells and once you detect a jump in level set you just need to detect the intersection points (maybe you can use VOF or level set literature for this) and compute the length L of the edge between them (then adding L times n times P in the outer cell to your integral).
sbaffini is offline   Reply With Quote

Old   May 9, 2020, 09:24
Default
  #6
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 5,416
Rep Power: 58
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
is the problem 2D or 3D?
FMDenaro is offline   Reply With Quote

Old   May 9, 2020, 10:19
Default
  #7
New Member
 
Join Date: Jun 2015
Posts: 12
Rep Power: 7
cfdwave is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
is the problem 2D or 3D?

It is 2D but will be expanded to 3D later as well.
cfdwave is offline   Reply With Quote

Old   May 9, 2020, 13:09
Default
  #8
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 5,416
Rep Power: 58
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by cfdwave View Post
It is 2D but will be expanded to 3D later as well.

I was thinking about a simple way: in the 3D space a plane is defined by f(x,y,z)=z-a*x-b*y+c=0, where a,b,c can be determined using three nodes that determine a plane surface. The direction of the normal is obtained by the partial derivatives


df/dx=a
df/dy=b
df/dz=1


you can normalize to get the normal vector unit.
FMDenaro is offline   Reply With Quote

Reply

Tags
finite difference, surface area, surface normals

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] High quality mesh for wind in complex urban environment ziboaa OpenFOAM Meshing & Mesh Conversion 0 January 14, 2020 13:15
[snappyHexMesh] snappyHexMesh Boundary Layer at Corner panpanzhong OpenFOAM Meshing & Mesh Conversion 5 July 3, 2018 06:53
[snappyHexMesh] Snappyhex mesh: poor inlet mesh Swagga5aur OpenFOAM Meshing & Mesh Conversion 1 December 3, 2016 17:59
[snappyHexMesh] snappyHexMesh - geometry does not appear in Mesh czhongrong OpenFOAM Meshing & Mesh Conversion 1 January 20, 2016 06:26
[snappyHexMesh] Collapsing Layers Tim_Simon OpenFOAM Meshing & Mesh Conversion 5 August 2, 2015 23:51


All times are GMT -4. The time now is 07:13.