# Calculation of patch area in a 2D geometry

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

 June 17, 2014, 12:22 Calculation of patch area in a 2D geometry #1 Member   Luca Join Date: Mar 2011 Location: Germany Posts: 38 Rep Power: 6 Dear All, I have a very simple 2D channel flow of 1 unit length height. When using the following code to determine the inlet patch area I get the value 0.25 instead of the expected value of 1: Code: ```scalar area = gSum(mesh.magSf().boundaryField()["inlet"]); Info << "Inlet area: " << area << endl;``` Can anyone explain explain me the reason, i.e. how is the face area evaluated for a 2D case? Thank you in advance, Luca

July 11, 2014, 11:19
#2
Member

Vignesh
Join Date: Oct 2012
Posts: 33
Rep Power: 4
Quote:
 Originally Posted by marluc Dear All, I have a very simple 2D channel flow of 1 unit length height. When using the following code to determine the inlet patch area I get the value 0.25 instead of the expected value of 1: Code: ```scalar area = gSum(mesh.magSf().boundaryField()["inlet"]); Info << "Inlet area: " << area << endl;``` Can anyone explain explain me the reason, i.e. how is the face area evaluated for a 2D case? Thank you in advance, Luca
Luca !!

I think you are calculating area not the height. Even in 2D, there is one cell thickness along z direction. Check what is the length you have given in z direction in blockMesh and divide the area by this length, you will get the height !!

Hope this helps !!
__________________
Thanks and Regards

Vignesh TG

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post [GAMBIT] periodic faces not matching Aadhavan ANSYS Meshing & Geometry 6 August 31, 2013 11:25 cfdengineering OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 48 January 25, 2013 04:28 clo OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 33 September 26, 2012 04:04 sripplinger OpenFOAM Mesh Utilities 8 November 13, 2009 08:14 Bloshchitsyn Vladimir CFX 0 November 18, 2007 23:19

All times are GMT -4. The time now is 23:00.