|
[Sponsors] |
June 25, 2014, 11:34 |
Patch-> Cell-> Center - Face: Distance
|
#1 |
New Member
Martin K
Join Date: Jan 2013
Location: Germany
Posts: 28
Rep Power: 13 |
Hi all,
I got stuck with a hopefully simple calculation. With a code sniplet out of this forum (dont remember where I found it) and some research, I try to calculate the distance of a cell center and face center, belonging to a patch cell called faceCelli. Code:
forAll(myPatch, facei) { label faceCelli = myPatch.faceCells()[facei]; wallList.resize(wallList.size()+1); wallList[wallList.size()-1]=faceCelli; // ... faceArea+=mesh.magSf()[faceCelli]; cellMarker[faceCelli]=1.0; C[faceCelli]=mesh.C()[faceCelli]; Cf[faceCelli]=mesh.Cf()[facei]; cellFaceDistanceVector[faceCelli] =C[faceCelli] - Cf[facei]; //Cf[faceCelli] wont work either cellFaceDistance[faceCelli]= mag(cellFaceDistanceVector[faceCelli]); The distance between cell center and cell face center becomes way too large. As I can see in my timeName.C and .Cf, they are both calculated on the correct cell ID. So why wont I get the correct distance? Best regards Martin |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to set periodic boundary conditions | Ganesh | FLUENT | 15 | November 18, 2020 07:09 |
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch | gschaider | OpenFOAM Installation | 225 | August 25, 2015 20:43 |
snappyhexmesh remove blockmesh geometry | philipp1 | OpenFOAM Running, Solving & CFD | 2 | December 12, 2014 11:58 |
[blockMesh] BlockMesh FOAM warning | gaottino | OpenFOAM Meshing & Mesh Conversion | 7 | July 19, 2010 15:11 |
[blockMesh] BlockMeshmergePatchPairs | hjasak | OpenFOAM Meshing & Mesh Conversion | 11 | August 15, 2008 08:36 |