CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Temperature dependent properties (https://www.cfd-online.com/Forums/openfoam-pre-processing/150018-temperature-dependent-properties.html)

lcbuijs March 13, 2015 06:05

Temperature dependent properties
 
Dear FOAMers,

I'm trying to implement temperature dependent fluid properties (density, viscosity, heat capacity, etc.) in my simulation using the thermophysicalProperties dictionary in buoyantPimpleFoam. My simulation concerns natural convection of water in a cubical cavity heated from below (a Rayleigh-Benard cell). I'm thinking that including the properties as polynomials might be the best way to do this, seeing as the temperature differences are not very large.

I've looked through the forums and found some similar threads, but these are mainly concerned with more advanced functionality of the dictionary. I'm simply having trouble finding out where to start, mainly because I'm completely new to the use of this dictionary itself. In short my question is as follows: what is the correct/most suitable way to set up this dictionary for my case?

Any help is greatly appreciated! Best regards,
Luuk

Linse March 13, 2015 07:39

I would suggest to use the code already implemented. ;-)

If you check within the reactingFoam-tutorials for example, you will find several cases where heat capacity et al. are computed based on temperature. It depends on the constant->thermophysicalProperties->thermoType .
If there is an entry "janaf" for thermo, the heat capacity will be computed based on a polynomial of grade 5 depending on temperature.

Certainly you will find other temperature-dependent properties as well. Some might not be implemented to your liking, but I guess the janaf-stuff is a good entry-point for implementing your own definitions if needed.
In addition you will find a lot of interesting code within $FOAM_SRC/thermophysicalModels that might help a lot...

lcbuijs March 16, 2015 04:49

Dear Linse,

Thank you very much for your reply. I will look into the tutorials that I can find for this dictionary. Just a small additional question though. Can you tell me what would be the correct/most suitable entries for type and equationOfState in my case? I'm sure I can figure out the rest by myself, but this would narrow down the options significantly and be a nice starting point.

Thanks again and best regards,
Luuk

ali.lajevardi June 22, 2015 10:22

Quote:

Originally Posted by Linse (Post 536142)
I would suggest to use the code already implemented. ;-)

If you check within the reactingFoam-tutorials for example, you will find several cases where heat capacity et al. are computed based on temperature. It depends on the constant->thermophysicalProperties->thermoType .
If there is an entry "janaf" for thermo, the heat capacity will be computed based on a polynomial of grade 5 depending on temperature.

Certainly you will find other temperature-dependent properties as well. Some might not be implemented to your liking, but I guess the janaf-stuff is a good entry-point for implementing your own definitions if needed.
In addition you will find a lot of interesting code within $FOAM_SRC/thermophysicalModels that might help a lot...

please tell me ,address that note clear ( it means: $FOAM_SRC/thermophysicalModels) - thanks

Linse June 26, 2015 19:28

Dear Luuk,

I am sorry for that late reply upon your question. Probably you have found good settings for your case already. But for what it is worth:
If you do not know which settings are available, using a banana is a great help with many of OpenFOAM's capabilities. If at the place of one setting in the dictionary you put "banana" (or any other rubbish word) instead of a valid value, OF will tell you the acceptable entries. Most of the time these already will enable you to make a reasonable choice.

Looking at your case, I probably would have chosen the "perfectGas" settings, as in OF-nomenclature this is identical to what is often referred to as ideal gas. If you need to use a polynomial heat capacity approach or if a constant value is acceptable, depends on the gases, the temperature range, your accuracy requirements...

@Ali: I am sorry, but I do not understand your question...
$FOAM_SRC/thermophysicalModels should point to a directory where one finds plenty of different models and source code files related to treatment of thermophysical properties.

Cheers,
Bernhard


All times are GMT -4. The time now is 10:09.