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

Access cell properties

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 26, 2012, 15:48
Default Access cell properties
  #1
Member
 
Adam
Join Date: Jun 2011
Posts: 32
Rep Power: 14
Smed is on a distinguished road
Hoes does one access cell properties such as pressure and temperature? I can't seem to find this in the programmer's guide.
Smed is offline   Reply With Quote

Old   September 28, 2012, 03:06
Default
  #2
Senior Member
 
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 17
Chris Lucas is on a distinguished road
Hi,

have a look at src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.C

Regards,
Christian
Chris Lucas is offline   Reply With Quote

Old   September 28, 2012, 11:43
Default
  #3
Member
 
Adam
Join Date: Jun 2011
Posts: 32
Rep Power: 14
Smed is on a distinguished road
Thanks Christian. I'm using the sprayFoam solver, so I think in my case I use the SLGThermo.H. I'm still not sure how to use the thermo models, but I found that cell pressure and temperature variables are defined in createFields.H by the following line:
volScalarField& p = thermo.p();

When I run my code in gdb, I can print out this cell pressure while in the main loop using,
"print p[cellnumber]"
But when I enter the parcels.evolve() function, I'm no longer able to access the "p" variable. This is where I'm hoping to actually use the cell properties, so I'm not sure where to go from here.
Smed is offline   Reply With Quote

Old   October 6, 2012, 07:38
Default oscillatingFixedValue
  #4
New Member
 
Join Date: Mar 2012
Posts: 20
Rep Power: 14
T.Matrix is on a distinguished road
Hello, everyone:

Recently, I read the source code about oscillatingFixedValue. It is a useful BCs, and provides a convenience for users. Because of a new in OpenFOAM, there are some questions I hard to understand for class oscillatingFixedValue.
1. For implementing of private member function currentScale(), there is a program statement as follow:
const scalar t= this->db().time().timeOutputValue(). I don't know what does the this->db() mean?
2. From within constructors function
template<class Type>
oscillatingFixedValueFvPatchField<Type>:scillati ngFixedValueFvPatchField
(
const oscillatingFixedValueFvPatchField<Type>& ptf,
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
what's the meaning of iF? We just need to set the value on BCs, why does it need this auxiliary parameter iF?

3. who can describe some details of Mapping functions?

thank you.
T.Matrix is offline   Reply With Quote

Reply


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
How to access only one phase in multiphase model by UDF wersoe Fluent UDF and Scheme Programming 1 January 4, 2017 07:11
Access cell face center / cell vertices lichmaster OpenFOAM Programming & Development 7 May 31, 2014 02:31
Help Me, what's the Cell Above any given cell in 3D. gomane8 Main CFD Forum 3 September 11, 2011 21:29
Help Me, what's the Cell Above in 3D. gomane8 Main CFD Forum 0 September 10, 2011 19:09
how to access to the face value of VOF of each cell Wei Shao Fluent UDF and Scheme Programming 2 November 5, 2009 10:16


All times are GMT -4. The time now is 16:27.