CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > 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 Display Modes
Old   June 17, 2014, 12:22
Default Calculation of patch area in a 2D geometry
  #1
Member
 
Luca
Join Date: Mar 2011
Location: Germany
Posts: 33
Rep Power: 6
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, 11:19
Smile
  #2
Member
 
Vignesh
Join Date: Oct 2012
Location: Darmstadt, Germany
Posts: 30
Rep Power: 4
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 TG
vigneshTG is offline   Reply With Quote

Reply

Thread Tools
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 On
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 11:25
Fluent msh and cyclic boundary cfdengineering OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 48 January 25, 2013 04:28
Using starToFoam clo OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 33 September 26, 2012 04:04
Using createPatch in place of couplePatches sripplinger OpenFOAM Mesh Utilities 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 04:08.