Access cell properties
Hoes does one access cell properties such as pressure and temperature? I can't seem to find this in the programmer's guide.
have a look at src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.C
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,
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.
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
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?
|All times are GMT -4. The time now is 12:05.|