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

property values in each cells

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 25, 2013, 23:56
Default property values in each cells
  #1
New Member
 
Thomas
Join Date: Jan 2013
Posts: 4
Rep Power: 12
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, 06:15
Default
  #2
Senior Member
 
fumiya's Avatar
 
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 18
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
Code:
forAll(p, cellI)
{
    //You can use p[cellI]
}
Using the "findCell" function, you can find the cell label that contains
the position you specify:

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

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] SnappyHexMesh for internal Flow vishwa OpenFOAM Meshing & Mesh Conversion 24 June 27, 2016 08:54
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 09:38
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
[Netgen] Import netgen mesh to OpenFOAM hsieh OpenFOAM Meshing & Mesh Conversion 32 September 13, 2011 05:50


All times are GMT -4. The time now is 20:54.