CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

FvPatch operations

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 9, 2008, 07:14
Default cell face side length. I ne
  #1
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18
maka is on a distinguished road
cell face side length.

I need to access the length of cell face in x or z direction. The cells are have hexagonal shape. I thought to use sqrt(magSf) but this will be correction only if dx=dz. Do you know any way to do this. Thansk.

Best regards,
Maka.
maka is offline   Reply With Quote

Old   July 9, 2008, 07:39
Default I thought of the following but
  #2
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18
maka is on a distinguished road
I thought of the following but it is only valid if mesh resolution in z direction (dz) is uniform.

const fvPatchScalarField& vsfp = vsf.boundaryField()[patchI];
// first cell
scalar cf1 = vsfp[xPatchFaceLabel(0,k)].patch().Cf();
scalar A1 = vsfp[xPatchFaceLabel(0,k)].patch().magSf();

// last cell
scalar cfn = vsfp[xPatchFaceLabel(nx()-1,k)].patch().Cf();
scalar An = vsfp[xPatchFaceLabel(nx()-1,k)].patch().magSf();

// Assuming constant resolution in z direction and cell centered node.
scalar dz = (A1+An)/(2*(cf1+cfn));
scalar dx1 = A1/dz;
scalar dxn = A2/dz;

is there a general solution, like using bounding box on the cell? Thanks.
maka is offline   Reply With Quote

Old   July 9, 2008, 07:40
Default scalar dxn = An/dz; That was a
  #3
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18
maka is on a distinguished road
scalar dxn = An/dz; That was a correction.
maka is offline   Reply With Quote

Old   July 9, 2008, 11:37
Default The above is wrong, the correc
  #4
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18
maka is on a distinguished road
The above is wrong, the correct way is to get: faces from the patch and get the edges. I can do that but the problem is that I can not find the function that gives the faceList from polyPatch for example

vsfp.patch().*?* will give faceList of the patch ?
maka is offline   Reply With Quote

Old   July 10, 2008, 07:36
Default The solution is: vsfp.patch()
  #5
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18
maka is on a distinguished road
The solution is:
vsfp.patch().patch().localFaces()[face_label].edges()[edge_label].centre(vsfp.pa tch().patch().localPoints())
maka 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
Nonbasic mathematical operations ngj OpenFOAM 0 September 26, 2008 17:16
Nonparallelized operations in OpenFOAM adona058 OpenFOAM Running, Solving & CFD 0 September 20, 2007 15:57
Cleaning up operations Vidya Raja FLUENT 3 May 22, 2006 14:17
body operations fintan CFX 3 November 30, 2005 23:05
GET_GVAR operations? Cujo CFX 3 July 23, 2003 11:27


All times are GMT -4. The time now is 19:42.