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

Cell Faces: Determining orientation?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 2, 2011, 11:22
Default Cell Faces: Determining orientation?
  #1
New Member
 
Robert Maier
Join Date: Apr 2011
Posts: 9
Rep Power: 15
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?

Thanks!

Robert
robertmaier9 is offline   Reply With Quote

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

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

Code:
//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;
  else
      Info<< "it is horizontal" << endl;
}
Cheers!
banji 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
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Meshing & Mesh Conversion 2 March 27, 2011 21:11
DecomposePar unequal number of shared faces maka OpenFOAM Pre-Processing 6 August 12, 2010 09:01
[snappyHexMesh] external flow with snappyHexMesh chelvistero OpenFOAM Meshing & Mesh Conversion 11 January 15, 2010 19:43
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 04:15
Warning 097- AB Siemens 6 November 15, 2004 04:41


All times are GMT -4. The time now is 17:53.