CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Calculation of patch area in a 2D geometry

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 17, 2014, 13:22
Default Calculation of patch area in a 2D geometry
  #1
Member
 
Luca
Join Date: Mar 2011
Location: Italy
Posts: 62
Rep Power: 15
marluc is on a distinguished road
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
marluc is offline   Reply With Quote

Old   July 11, 2014, 12:19
Smile
  #2
Member
 
Vignesh
Join Date: Oct 2012
Location: Darmstadt, Germany
Posts: 66
Rep Power: 13
vigneshTG is on a distinguished road
Quote:
Originally Posted by marluc View Post
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
vigneshTG 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
[GAMBIT] periodic faces not matching Aadhavan ANSYS Meshing & Geometry 6 August 31, 2013 12:25
[Commercial meshers] Fluent msh and cyclic boundary cfdengineering OpenFOAM Meshing & Mesh Conversion 48 January 25, 2013 04:28
[Commercial meshers] Using starToFoam clo OpenFOAM Meshing & Mesh Conversion 33 September 26, 2012 05:04
[mesh manipulation] Using createPatch in place of couplePatches sripplinger OpenFOAM Meshing & Mesh Conversion 8 November 13, 2009 08:14
Surface integral calculation by undefined area Bloshchitsyn Vladimir CFX 0 November 18, 2007 23:19


All times are GMT -4. The time now is 06:01.