|
[Sponsors] |
July 9, 2008, 08:14 |
cell face side length.
I ne
|
#1 |
Senior Member
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18 |
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. |
|
July 9, 2008, 08:39 |
I thought of the following but
|
#2 |
Senior Member
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18 |
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. |
|
July 9, 2008, 08:40 |
scalar dxn = An/dz; That was a
|
#3 |
Senior Member
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18 |
scalar dxn = An/dz; That was a correction.
|
|
July 9, 2008, 12:37 |
The above is wrong, the correc
|
#4 |
Senior Member
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18 |
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 ? |
|
July 10, 2008, 08:36 |
The solution is:
vsfp.patch()
|
#5 |
Senior Member
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18 |
The solution is:
vsfp.patch().patch().localFaces()[face_label].edges()[edge_label].centre(vsfp.pa tch().patch().localPoints()) |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Nonbasic mathematical operations | ngj | OpenFOAM | 0 | September 26, 2008 18:16 |
Nonparallelized operations in OpenFOAM | adona058 | OpenFOAM Running, Solving & CFD | 0 | September 20, 2007 16:57 |
Cleaning up operations | Vidya Raja | FLUENT | 3 | May 22, 2006 15:17 |
body operations | fintan | CFX | 3 | December 1, 2005 00:05 |
GET_GVAR operations? | Cujo | CFX | 3 | July 23, 2003 12:27 |