accessing thermophysical properties on a lower level
Hej,
I have a question about the accessing thermophysical properties on a lower level than the ones given. I would like to obtain for example rho at a certain temperature, which is not the cell temperature, therefore I can't use the normal approach via Code:
volScalarField rho = thermo.rho(); I would like to be able to just obtain rho, without a specific cell attached to it, similar to Code:
scalar rho = thermo.rho(pressure, temperature); I know that these functions exist in the thermophysical properties like icoPolynomial, however, they are not accessible, since this class is templated into heRhoThermo, which does not provide these functions, as far as I can see. Does anybody have an idea on how to access this? |
Hi,
as far as I know, this is not possible without some minor changes. I still use OF2.1 so you must find the equivalent file in OF2.2. An easy way is to add a dummy function in the thermo class called by the solver (e.g. basicPsiThermo), which returns the value if the class already knows the fields and has access to the mixture class (this is not true for basicPsiThermo). If not, return a dummy value. Then, in the real thermo classes (e.g. hPsiThermo) you redefine the function (function overload) so that the correct value is returned. Have a look at my realGasThermo library. In basicPsiThermo I added an additional function so that the solver gets access to the new fields. Christian |
Depends on your mixture type. If your thermo class is a 'basicMultiComponentMixture', then you should have (or can add) in your solver something like this:
Code:
basicMultiComponentMixture& composition = thermo.composition(); Code:
scalar rhoSpecie0 = composition.rho(0, 1e5, 273.15); May I ask what you want to do with the "raw" thermo data? |
Quote:
I am trying to implement advanced wall functions, for which I need the thermophysical properties of the fluid in points at a distance y away from the wall. This distance y does not correspond to a fixed point in the grid space. It could be the edge of the thermal or momentum sublayer, for which I have a temperature and then need the the thermophysical properties of the fluid. |
Sorry, I not really familiar with wall function modeling. So, no further ideas...
|
All times are GMT -4. The time now is 18:10. |