CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM

property values in each cells

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   February 26, 2013, 00:56
Default property values in each cells
New Member
Join Date: Jan 2013
Posts: 4
Rep Power: 3
Thomas Jacob is an unknown quantity at this point
how can i get the values of pressure in each cell
Thomas Jacob is offline   Reply With Quote

Old   February 26, 2013, 07:15
Senior Member
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 173
Rep Power: 8
fumiya is on a distinguished road
Hi Thomas,

You can access the cell center value of pressure field p by p[cell_label].

If you want to access every cell, you can use
forAll(p, cellI)
    //You can use p[cellI]
Using the "findCell" function, you can find the cell label that contains
the position you specify:

vector pos(0,0,0); //Change the position as you like
label cellI = mesh.findCell(pos);
Hope that helps,
fumiya is offline   Reply With Quote


Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
No layers in a small gap bobburnquist OpenFOAM Native Meshers: snappyHexMesh and Others 6 August 26, 2015 09:38
SnappyHexMesh for internal Flow vishwa OpenFOAM Native Meshers: snappyHexMesh and Others 23 August 6, 2014 03:50
snappyHexMesh in parallel - FOAM Fatal IO Error mturcios777 OpenFOAM Running, Solving & CFD 4 August 10, 2012 19:18
[ICEM] error analysis despaired student ANSYS Meshing & Geometry 7 June 27, 2012 11:57
Import netgen mesh to OpenFOAM hsieh Open Source Meshers: Gmsh, Netgen, CGNS, ... 32 September 13, 2011 05:50

All times are GMT -4. The time now is 23:56.