CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Programming & Development

Cell Faces: Determining orientation?

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

LinkBack Thread Tools Display Modes
Old   September 2, 2011, 11:22
Default Cell Faces: Determining orientation?
New Member
Robert Maier
Join Date: Apr 2011
Posts: 9
Rep Power: 6
robertmaier9 is on a distinguished road
Hi All,

A little background:

I'm working on a project concerned with the heat transfer across the interface of a multiphase flow using VOF. I am using an adapted version of interFoam. When you have a cell on the interface of two fluids with different heat transfer coeeficients then 0 < alpha < 1. Depending on the angle of the interface you might expect an arithmetic or a harmonic mean of the two to get the overall heat transfer coefficient of the two. Sometimes it's in between both methods. This model tries address this using alpha and the angle of the interface to get a more accurate representation of the heat transfer coefficient, k.

My question:

I would like to calculate for k (heat transfer coefficient) on the faces, but it is critical to know whether the face is horizontal or vertical as the angle of the interface in relation to the direction of heat flow is important. Is there a way to determine the orrientation of a face, i.e. is it horizontal or vertical?


robertmaier9 is offline   Reply With Quote

Old   September 2, 2011, 11:49
New Member
Robert Maier
Join Date: Apr 2011
Posts: 9
Rep Power: 6
robertmaier9 is on a distinguished road
Nevermind. problem solved!
robertmaier9 is offline   Reply With Quote

Old   March 17, 2015, 13:24
New Member
Join Date: Jan 2013
Location: U.S.A
Posts: 12
Rep Power: 4
banji is on a distinguished road
To determine if a face is aligned vertically or horizontally, you can also follow these instructions:

//Find the surface normal vector for each face and get its internal field
 Field<vector> list = mesh.Sf().internalField();

//iterate through all elements of the list, using 'iter', say, and 
//determine the sign of the x-component.
//If the x component > 0, it is vertical, else it is horizontal:

forAll (list, iter)
  if (list[iter].x() > 0)
     Info<< "it is vertical" << endl;
      Info<< "it is horizontal" << endl;
banji is offline   Reply With Quote


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
snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Native Meshers: snappyHexMesh and Others 2 March 27, 2011 21:11
DecomposePar unequal number of shared faces maka OpenFOAM Pre-Processing 6 August 12, 2010 09:01
external flow with snappyHexMesh chelvistero OpenFOAM 11 January 15, 2010 20:43
Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 July 15, 2005 04:15
Warning 097- AB CD-adapco 6 November 15, 2004 05:41

All times are GMT -4. The time now is 18:46.