|
[Sponsors] |
Problem / Misunderstanding with mesh.C() : get the cell centers |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 15, 2010, 07:31 |
Problem / Misunderstanding with mesh.C() : get the cell centers
|
#1 |
Member
Join Date: Sep 2010
Posts: 35
Rep Power: 15 |
Hej,
This is probably very simple but I experienced unexpected results with the .C() function. It is supposed to return the cell centers of the mesh it is applied to. I think that I am right so far... However i have a 2D geometry defined for x between 0.0 and 0.0127 and y between 0.0 and 1.7, as you can see from my blockMeshDict below : Code:
vertices ( (0 0 0)//0 (0.0127 0 0)//1 (0.0127 1.7 0)//2 (0 1.7 0)//3 (0 0 0.1)//4 (0.0127 0 0.1)//5 (0.0127 1.7 0.1)//6 (0 1.7 0.1)//7 ); blocks ( hex (0 1 2 3 4 5 6 7) (20 170 1) simpleGrading (1 1 1) ); However, i wrote this piece of code : Code:
volVectorField centres = Ua.mesh().C(); volScalarField x = centres.component(0); Info<< min(x) << nl << endl; Info<< max(x) << nl << endl; min(x)=0.0 max(x)=0.0127 So basically it means that there are cell centers located at the boundaries, which is nonsense! Could you please help me and tell me what i have not properly understood, and how to solve it. Thanks in advance. Best /Ed |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cell Reynolds Number | laliong | Main CFD Forum | 12 | September 17, 2019 03:18 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 19:13 |
Cell face values computation un unstructured grids | Sergio Rossi | Main CFD Forum | 2 | May 28, 2006 10:04 |
May I use global coordinate of cell centers in subroutine Posdat | H. Shen | Siemens | 4 | March 29, 2000 09:20 |
extremely simple problem... can you solve it properly? | Mikhail | Main CFD Forum | 40 | September 9, 1999 09:11 |