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

ground area

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 11, 2012, 11:16
Default ground area
  #1
New Member
 
Kathrin
Join Date: Nov 2011
Posts: 15
Rep Power: 5
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, 12:35
Default
  #2
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 397
Rep Power: 12
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, 10:54
Default
  #3
New Member
 
Kathrin
Join Date: Nov 2011
Posts: 15
Rep Power: 5
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, 11:17
Default
  #4
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 397
Rep Power: 12
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

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
Water subcooled boiling Attesz CFX 7 January 5, 2013 04: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
Non overlap area fractions saisanthoshm88 CFX 9 April 26, 2011 13:05
CFX Solver Memory Error mike CFX 1 March 19, 2008 08:22


All times are GMT -4. The time now is 22:04.