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

Tabulated thermophysicalProperties library

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree15Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   May 14, 2018, 04:38
Default tabulated properties for OpenFOAM 5.x
  #21
New Member
 
Join Date: Feb 2018
Location: France
Posts: 5
Rep Power: 2
Yuusha is on a distinguished road
Hi,

tilasoldo and I have rewritten the chriss85 code for OpenFOAM 5.x. It is available at GitHUB : https://github.com/Yuusha0/tabulatedThermophysicalProperties

The tabulated tables model works with psiThermo and rhoThermo. It has been improved to work with multi species simulations. However, due to OpenFOAM design, simulations are very slow with large tables. The heTabularThermo thermophysical type currently doesn't work. Please use hePsiThermo or heRhoThermo.

Table files design is the same as chriss85 original version. A python script is provided to easily transpose tables (like h(p, T)) from (T, p) to (p, T). More informations can be found in the README.md file.

Feel free to report bugs and/or submit patch on GitHub.
Yuusha is offline   Reply With Quote

Old   July 5, 2018, 05:10
Default
  #22
New Member
 
Jan Gaertner
Join Date: Nov 2017
Posts: 5
Rep Power: 2
janGaertner is on a distinguished road
Hey,


great work Yuusha for porting it to OpenFOAM-5.x.
I have downloaded your github repo and compilation went fine. Now when I wanted to test it on one of the tutorials (buoyantPimpleFoam/hotRoom/) I get the error message of unknown rhoThermo type and a list of possible options.


This was my thermophysicalProperties file

thermoType
{
type heRhoThermo;
mixture pureMixture;
transport const;
thermo hTabular;
equationOfState tabularEOS;
specie specie;
energy sensibleEnthalpy;
}
janGaertner is offline   Reply With Quote

Old   July 8, 2018, 12:25
Default
  #23
New Member
 
Join Date: Feb 2018
Location: France
Posts: 5
Rep Power: 2
Yuusha is on a distinguished road
Hi,

Maybe I'm not as clear as I think in the README. If you want to use this class with buoyantPimpleFoam, you have to recompile it. If you have made a standard installation of OpenFOAM, in the Make/options file, under the EXE_INC, add :
  • -I{$WM_PROJECT_USER_DIR}/src/thermophysicalModels/basic/lnInclude
  • -I{$WM_PROJECT_USER_DIR}/src/thermophysicalModels/specie/lnInclude
Under the EXE_LIBS, add :
  • -L{$FOAM_USER_LIBBIN}
  • -lTabularThermophysicalModels
  • -luserspecie
I advise you to modify the name of the solver in order to . For example, you can name it myBuoyantPimpleFoam in order to diferenciate it from the OpenFOAM original.

Maybe you have to slightly adapt it function of how your OpenFOAM is installed.
Yuusha is offline   Reply With Quote

Old   July 12, 2018, 03:31
Default
  #24
New Member
 
Jan Gaertner
Join Date: Nov 2017
Posts: 5
Rep Power: 2
janGaertner is on a distinguished road
Hello Yuusha,


I have actually found a different way now. I think it is probably not as clean but for me it had worked to test the libraries.

BuoyantPimpleFoam uses the rhoThermo class, therefore I have changed the rhoThermos.C file directly to allow the tabularEOS and hTabular options and recompiled the library.

In the system/controlDict file I added then the library

Code:
libs
(
  "libuserspecie.so"
);

With this the solver worked and I could test it.


I used your code now as a basis to extend it for my work with superheated flows. I have seen that the lookup function in the tables loop always over the complete table in the worst case to find the correct index. As my tables are generally constructed with a uniform spacing the lookup can be done directly.

My tests showed an improvement of the speed of up to 20 for 200x200 tables.



If you are interested in these interpolation tables I can share this over GitHub with you.





Best,


Jan
janGaertner is offline   Reply With Quote

Old   July 12, 2018, 09:36
Default
  #25
New Member
 
Join Date: Feb 2018
Location: France
Posts: 5
Rep Power: 2
Yuusha is on a distinguished road
Hi Jan,

I'm very interested by your improvement to the table reading. Chriss85 gave an improved version of table interpolation but we were unable to compile it. So the actual version is not the best.

Can you make a pull request on GitHub ? I will test and merge your improved version.
Yuusha is offline   Reply With Quote

Old   July 16, 2018, 10:11
Default
  #26
New Member
 
Jan Gaertner
Join Date: Nov 2017
Posts: 5
Rep Power: 2
janGaertner is on a distinguished road
I am still working on the tabularThermo directory for my personal code.



I have uploaded a gitHub repo with just the tables. I don't work much with GitHub, hope you can use and compare it with these too.


https://github.com/JanGaertner/fastInterpolationTable
janGaertner is offline   Reply With Quote

Old   July 23, 2018, 08:28
Default Version 2.0
  #27
New Member
 
Join Date: Feb 2018
Location: France
Posts: 5
Rep Power: 2
Yuusha is on a distinguished road
Hi,

A new version (v2.0) of thermophysical tables is available at GitHub : https://github.com/Yuusha0/tabulated...icalProperties

It features a new uniform search model (thanks to janGaertner), a bisection search algorithm, an optional tabular enthalpy of formation (if your data come from equilibrium chemistry for example) and a test case using rhoSimpleFoam.
Yuusha is offline   Reply With Quote

Old   September 30, 2018, 04:53
Default Update to OpenFOAM 6 version
  #28
New Member
 
Join Date: Feb 2018
Location: France
Posts: 5
Rep Power: 2
Yuusha is on a distinguished road
Hi,

A new version is available at GitHub : https://github.com/Yuusha0/tabulated...icalProperties.

It features the compatibility with OpenFOAM 6 and an improved python script to import and convert thermophysical tables.

People who still use OpenFOAM 5 can still use the version 2.0.2.
Yuusha is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi species mass transport library [update] novyno OpenFOAM 101 June 29, 2018 23:27
problem loading UDF library in parallel cluster Veera Gutti FLUENT 8 July 26, 2016 07:24
ERROR: unable to find library HJH CFX 5 September 22, 2015 03:55
Compiled library vs. inInclude Files, DSMC solver crashes after run GPesch OpenFOAM Programming & Development 8 April 18, 2013 07:17
OpenFOAM141dev linking error on IBM AIX 52 matthias OpenFOAM Installation 24 April 28, 2008 15:49


All times are GMT -4. The time now is 17:34.