CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

How to find face area of each cell in a boundary patch?

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

Like Tree6Likes
  • 1 Post By Hale
  • 3 Post By t.oliveira
  • 2 Post By alberto.lorenzon

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 31, 2013, 01:58
Default How to find face area of each cell in a boundary patch?
  #1
Member
 
Hale
Join Date: May 2013
Posts: 53
Rep Power: 12
Hale is on a distinguished road
Hi,

Is there any way to find the face area of each cell belonging to a boundary patch? Is it possible to find them after the simulation is finished?

thanks
Hale
t.oliveira likes this.
Hale is offline   Reply With Quote

Old   September 4, 2018, 17:03
Default
  #2
Senior Member
 
Thomas Oliveira
Join Date: Apr 2015
Posts: 114
Rep Power: 11
t.oliveira is on a distinguished road
Quote:
Originally Posted by Hale View Post
Is there any way to find the face area of each cell belonging to a boundary patch?
During the simulation, any of the three lines below provides the area of faces in a patch.

Code:
// mesh is a fvMesh, patchI is a label
mesh.magSf().boundaryField()[patchI];         //1
mesh.boundary()[patchI].magSf();              //2
mag(mesh.boundaryMesh()[patchI].faceAreas()); //3
(3) provides the areas of faces also in empty patches, while (1) and (2) ignore them.

I tested the CPU time for each of these lines in one example. The result I got for this particular example was, normalized to the first one:
1: 1
2: 1.28
3: 37.4 <= One of the reasons why this is higher may be the fact that 76% of the faces in the example were in empty patches, so this line was calculating the area of 4.2 times more faces.

Kind regards,
Thomas
t.oliveira is offline   Reply With Quote

Old   April 15, 2019, 10:33
Default
  #3
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Quote:
Originally Posted by t.oliveira View Post
During the simulation, any of the three lines below provides the area of faces in a patch.

Code:
// mesh is a fvMesh, patchI is a label
mesh.magSf().boundaryField()[patchI];         //1
mesh.boundary()[patchI].magSf();              //2
mag(mesh.boundaryMesh()[patchI].faceAreas()); //3
(3) provides the areas of faces also in empty patches, while (1) and (2) ignore them.

I tested the CPU time for each of these lines in one example. The result I got for this particular example was, normalized to the first one:
1: 1
2: 1.28
3: 37.4 <= One of the reasons why this is higher may be the fact that 76% of the faces in the example were in empty patches, so this line was calculating the area of 4.2 times more faces.

Kind regards,
Thomas

This is useful for, say using this data internally during calculations. However, I'd like to use the data for postprocessing. I tried to find something of this sort in OpenFOAM or through filters in paraview but reached a dead end. Is there any way I can find the individual cell areas of a patch by some postprocessing command?
deepbandivadekar is offline   Reply With Quote

Old   August 6, 2019, 07:06
Default
  #4
New Member
 
Join Date: Apr 2017
Posts: 1
Rep Power: 0
alberto.lorenzon is on a distinguished road
Quote:
Originally Posted by t.oliveira View Post
During the simulation, any of the three lines below provides the area of faces in a patch.

Code:
// mesh is a fvMesh, patchI is a label
mesh.magSf().boundaryField()[patchI];         //1
mesh.boundary()[patchI].magSf();              //2
mag(mesh.boundaryMesh()[patchI].faceAreas()); //3
(3) provides the areas of faces also in empty patches, while (1) and (2) ignore them.

I tested the CPU time for each of these lines in one example. The result I got for this particular example was, normalized to the first one:
1: 1
2: 1.28
3: 37.4 <= One of the reasons why this is higher may be the fact that 76% of the faces in the example were in empty patches, so this line was calculating the area of 4.2 times more faces.

Kind regards,
Thomas
This was actually useful for my research. Thank you for the post!
alberto.lorenzon is offline   Reply With Quote

Reply

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
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 17:22
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44
[Commercial meshers] Fluent msh and cyclic boundary cfdengineering OpenFOAM Meshing & Mesh Conversion 48 January 25, 2013 03:28
Water subcooled boiling Attesz CFX 7 January 5, 2013 03:32
[Gmsh] Import problem ARC OpenFOAM Meshing & Mesh Conversion 0 February 27, 2010 10:56


All times are GMT -4. The time now is 16:02.