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

ground area

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 11, 2012, 10:16
Default ground area
  #1
New Member
 
Kathrin
Join Date: Nov 2011
Posts: 15
Rep Power: 14
Katl is on a distinguished road
How can I get the horizontal area of a cell?
As far as I know does magSf() give you the vertical face area. Or is there any way to indicate the direction of the cell face vector?

I need this value in order to get the ground area of the cells at a patch. Another option would be deviding the volume of the cells by the cell hight. But I couldn't find a way to get this value either.

Thanks...
Katl is offline   Reply With Quote

Old   January 12, 2012, 11:35
Default
  #2
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 21
marupio is on a distinguished road
magSf() gives you the magnitude of surface area... Sf() gives you the area vector, pointing away from the owner cell. Get a unit vector of your "ground" surface, pointing up, and dot product the Sf()... I think that should do it.
__________________
~~~
Follow me on twitter @DavidGaden
marupio is offline   Reply With Quote

Old   January 19, 2012, 09:54
Default
  #3
New Member
 
Kathrin
Join Date: Nov 2011
Posts: 15
Rep Power: 14
Katl is on a distinguished road
Thanks David for your reply.
I finally went back to my case and tried your suggestion. The thing is just that the ground is perpendicular to the patch so the dot product becomes zero.

I did it like this:
Code:
scalar groundArea = gSum( normalVector & patch().Sf() );


cheers
Katl is offline   Reply With Quote

Old   January 19, 2012, 10:17
Default
  #4
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 21
marupio is on a distinguished road
Oh, sorry, I thought you wanted to find the projected area of a single surface on to the ground. You want the projected area of the entire cell volume? Well, you could do what I suggested for all its bounding surfaces, sum the answers and divide by two. This would work assuming the surfaces overlap only once, which is the case for tetrahedral and hexahedral cell volumes.
__________________
~~~
Follow me on twitter @DavidGaden
marupio is offline   Reply With Quote

Reply


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
Non overlap area fractions saisanthoshm88 CFX 11 September 17, 2015 18:42
Water subcooled boiling Attesz CFX 7 January 5, 2013 03:32
Mesh of the ground of a certain area samiam1000 Main CFD Forum 2 August 5, 2011 01:46
Mesh of the ground of a certain area samiam1000 OpenFOAM 0 August 4, 2011 02:33
CFX Solver Memory Error mike CFX 1 March 19, 2008 07:22


All times are GMT -4. The time now is 21:49.