|
[Sponsors] |
September 26, 2012, 15:48 |
Access cell properties
|
#1 |
Member
Adam
Join Date: Jun 2011
Posts: 32
Rep Power: 14 |
Hoes does one access cell properties such as pressure and temperature? I can't seem to find this in the programmer's guide.
|
|
September 28, 2012, 03:06 |
|
#2 |
Senior Member
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 17 |
Hi,
have a look at src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.C Regards, Christian |
|
September 28, 2012, 11:43 |
|
#3 |
Member
Adam
Join Date: Jun 2011
Posts: 32
Rep Power: 14 |
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. |
|
October 6, 2012, 07:38 |
oscillatingFixedValue
|
#4 |
New Member
Join Date: Mar 2012
Posts: 20
Rep Power: 14 |
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. |
|
|
|
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 |