|
[Sponsors] |
June 18, 2010, 04:05 |
polynomial thermophysical properties II
|
#1 |
Member
Sebastian Saegeler
Join Date: Nov 2009
Location: Munich
Posts: 70
Rep Power: 17 |
Hi,
I know, this question has already been discussed (http://www.cfd-online.com/Forums/ope...roperties.html). But the answer has not been very helpful to me. I am having exactly the same problem. Im trying to use the hPolynomialThermo for a temperaturedependent Cp. hPsiMixtureThermo<pureMixture<sutherlandTransport< specieThermo<hPolynomialThermo<perfectGas>>>> or hPsiMixtureThermo<pureMixture<constantTransport<sp ecieThermo<hPolynomialThermo<perfectGas>>>> But OpenFoam gives back Unknown basicPsiThermo type hPsiMixtureThermo<pureMixture<sutherlandTransport< specieThermo<hPolynomialThermo<perfectGas>>>>> Valid basicPsiThermo types are: 8 ( ePsiThermo<pureMixture<sutherlandTransport<specieT hermo<janafThermo<perfectGas>>>>> ePsiThermo<pureMixture<sutherlandTransport<specieT hermo<eConstThermo<perfectGas>>>>> hPsiThermo<pureMixture<constTransport<specieThermo <hConstThermo<perfectGas>>>>> hPsiThermo<pureMixture<sutherlandTransport<specieT hermo<hConstThermo<perfectGas>>>>> ePsiThermo<pureMixture<constTransport<specieThermo <eConstThermo<perfectGas>>>>> ePsiThermo<pureMixture<sutherlandTransport<specieT hermo<hConstThermo<perfectGas>>>>> ePsiThermo<pureMixture<constTransport<specieThermo <hConstThermo<perfectGas>>>>> hPsiThermo<pureMixture<sutherlandTransport<specieT hermo<janafThermo<perfectGas>>>>> ) I can not find anything on the web about that. Which conditions must be met, or which combination must be used, in order to be able to use the hPolynomialThermo? Another question would be, how to set the polynomial? Something like that: mixture //keyword air 1 28.9 //specie 1035.887 -0.255611 0.0006258047 2.627558e-07 //hPolynomialThermo, polynomial for Cp 1.458e-05 110.4; //sutherlandTransport I woud be very appreciated to get an answer . Thanks! Sebastian |
|
June 18, 2010, 05:51 |
|
#2 |
Senior Member
Stefan Herbert
Join Date: Dec 2009
Location: Darmstadt, Germany
Posts: 129
Rep Power: 17 |
Hi Sebastian,
I have had the same problem and solved it recently by changing thermophysicalModels/basic library. I have implemented it in a way that allows using polynomialTransport and polynomialThermo at the same time. I will point out what to do (sorry for formatting not being perfect):
Code:
thermoType hPsiThermo<pureMixture<polynomialTransport3<specieThermo<hPolynomialThermo4<perfectGas>>>>>; mixture air 1 //nMoles (??) 28.32708688 //molecular weight [kg/kmol] 0.0 //standard formation enthalpy [J/kg] 0.0 //standard formation enthropy [J/kg] cpPolynomial (9.86931771e02 1.73030395e-01 6.64980490e-05 1.25487e-09)//heat capacity [J/kgK] muPolynomial (4.70335908e-06 4.67918313e-08 -1.09914897e-11) //dynamic viscosity [kg/ms] kappaPolynomial (4.64248147e-03 7.28706102e-05 -6.13777213e-09); //heat conductivity [W/mK] Kind regards, Stefan Last edited by herbert; June 28, 2010 at 08:00. Reason: found errors |
|
June 23, 2010, 09:08 |
|
#3 |
Senior Member
Stefan Herbert
Join Date: Dec 2009
Location: Darmstadt, Germany
Posts: 129
Rep Power: 17 |
Hi everyone,
if anyone uses this piece of code, could you please report how it works and if there arise any problems? I have already tested it but you can never be sure. Regards, Stefan |
|
June 24, 2010, 10:53 |
|
#4 |
Senior Member
Join Date: Jan 2010
Location: Stuttgart
Posts: 150
Rep Power: 16 |
Hi Herbert,
I would like to test your thermophysical model. Is there any new compilation necessary? Should I make a backup of may original files or should I do not change the original files and create instead of new files? Thanks in advance! Best regards Chrisi |
|
June 24, 2010, 11:03 |
|
#5 |
Senior Member
Stefan Herbert
Join Date: Dec 2009
Location: Darmstadt, Germany
Posts: 129
Rep Power: 17 |
Hi Chrisi,
I'd recommend to copy the $FOAM_SRC/thermophysicalModels/basic/ to your $WM_PROJECT_USER_DIR/lib, make the changes I pointed out in my previous post and compile it to $FOAM_USER_LIBBIN. So the original files are not replaced. To use it with your solver, you should have to edit the Make/options and recompile the solver. Have a lot of fun Stefan |
|
June 24, 2010, 11:15 |
|
#6 |
Senior Member
Join Date: Jan 2010
Location: Stuttgart
Posts: 150
Rep Power: 16 |
Hi,
I did exactly what you said. But how can I complie it to $FOAM_USER_LIBBIN? Can you give me a detailed discription how to compile everything correctly? Regards Chrisi |
|
June 24, 2010, 11:17 |
|
#7 |
Member
Sebastian Saegeler
Join Date: Nov 2009
Location: Munich
Posts: 70
Rep Power: 17 |
Hi Stefan!
Wow, thanks a lot for that detailed instruction! I have implemented it into the Code. It compiled without an error. But when I am solving it, it gives me back an error again: Reading thermophysical properties ill defined primitiveEntry starting at keyword 'mixture' on line 22 and ending at line 30 file: /home/sebastian/OpenFOAM/sebastian-1.6/run_rhoSimpleThermo/constant/thermophysicalProperties at line 30. From function primitiveEntry::readEntry(const dictionary&, Istream&) in file db/dictionary/primitiveEntry/primitiveEntryIO.C at line 210. FOAM exiting Here, thats my thermo File: thermoType hPsiThermo<pureMixture<sutherlandTransport<specieT hermo<hPolynomialThermo4<perfectGas>>>>>; mixture //keyword air 1 28.9 //specie / specieCoeffs //1007 0 //hConstThermo / thermoCoeffs cpPolynomial(1035.887 -0.255611 0.0006258047 -2.627558e-07) //hPolynomialThermo / thermoCoeffs 1.458e-05 110.4; //sutherlandTransport / transportCoeffs Best wishes, Sebastian |
|
June 24, 2010, 11:44 |
|
#8 |
Senior Member
Stefan Herbert
Join Date: Dec 2009
Location: Darmstadt, Germany
Posts: 129
Rep Power: 17 |
Just replace
Code:
LIB=$(FOAM_LIBBIN)/libbasicThermophysicalModels Code:
LIB=$(FOAM_USER_LIBBIN)/libuserBasicThermophysicalModels Later in your solvers Make/options replace -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude by -I$(WM_PROJECT_USER_DIR)/lib/"path to your lnInclude" and for EXE_LIBS replace -lbasicThermophysicalModels by $(FOAM_USER_LIBBIN)/libuserBasicThermophysicalModels.so Hope it helps, Stefan |
|
June 24, 2010, 11:48 |
|
#9 |
Senior Member
Stefan Herbert
Join Date: Dec 2009
Location: Darmstadt, Germany
Posts: 129
Rep Power: 17 |
Dear Sebastian,
please try what happens, if you put two additional scalars before cpPolynomial. I'm not quite sure, but I think there should be standard enthalpy and entropy of formation be added. Good luck, Stefan |
|
June 24, 2010, 17:55 |
|
#10 | |
Senior Member
Join Date: Jan 2010
Location: Stuttgart
Posts: 150
Rep Power: 16 |
Hi Stefan,
Thank you so much for your help! But I have got a probleme compiling the new model. This is my error message. It is in german but I think I need not translate it for you . Quote:
Regards Chrisi |
||
June 28, 2010, 04:47 |
|
#11 |
Senior Member
Stefan Herbert
Join Date: Dec 2009
Location: Darmstadt, Germany
Posts: 129
Rep Power: 17 |
Dear Chrisi,
I'm sorry, I've forgotten to mention a detail. You have to include additional files into the header of hPsiThermos.C and basicMixtures.C to define polynomialTransport and hPolynomialThermo, respectivley. Just add Code:
#include "hPolynomialThermo.H" #include "polynomialTransport.H" Stefan |
|
June 28, 2010, 05:51 |
|
#12 | ||
Senior Member
Join Date: Jan 2010
Location: Stuttgart
Posts: 150
Rep Power: 16 |
Hi Stefan,
Thank you again. Without your help I would have never been able to compile it. I succeded compiling the new model but first I got this error: Quote:
I hope this will not cause a problem later? But know I try to recompile my solver like you told me. What did you mean with "path to your lnInclude"? Should this be the absolut path? Must it be in "" or not? At the moment I am getting this error message: Quote:
|
|||
June 28, 2010, 07:56 |
|
#13 |
Senior Member
Stefan Herbert
Join Date: Dec 2009
Location: Darmstadt, Germany
Posts: 129
Rep Power: 17 |
Hi Chrisi,
I'm really sorry, but there was still something missing in my first post. I have updated the code for makeBasicPsiThermo.H. The "path to your lnInclude" should be replaced by the absolute patch to basic/lnInclude. If you followed my suggestion it should look like Code:
-I$(WM_PROJECT_USER_DIR)/lib/thermophysicalModels/basic/lnInclude Stefan |
|
June 28, 2010, 09:50 |
|
#14 | ||
Senior Member
Join Date: Jan 2010
Location: Stuttgart
Posts: 150
Rep Power: 16 |
Hi,
Sorry its me again. At first thank you again. The model compiles perfect now. I can still not compile my solvers with the new model. This is my error: Quote:
Quote:
Can you see a mistake in my options-file? Regards Chrisi |
|||
June 28, 2010, 10:41 |
|
#15 |
Senior Member
Stefan Herbert
Join Date: Dec 2009
Location: Darmstadt, Germany
Posts: 129
Rep Power: 17 |
Hi Chrisi,
it seems that the error lies here: Code:
-I$(WM_PROJECT_USER_DIR)/lib/thermophysicalModels/basic/lnInclude \ Regards, Stefan |
|
June 28, 2010, 12:04 |
|
#16 |
Senior Member
Join Date: Jan 2010
Location: Stuttgart
Posts: 150
Rep Power: 16 |
Hi Herbert,
thanks. Now I compiled my solver succesfully. But I get the same error like Sebastian when I try to run the solver. I took exactly your thermophysical properties. Any ideas? Best regards Chrisi |
|
June 28, 2010, 12:09 |
|
#17 | |
Senior Member
Join Date: Jan 2010
Location: Stuttgart
Posts: 150
Rep Power: 16 |
Hi Herbert,
thanks. Now I compiled my solver succesfully. But I get the same error like Sebastian when I try to run the solver. Quote:
Any ideas? Best regards Chrisi |
||
June 28, 2010, 12:35 |
|
#18 |
Senior Member
Stefan Herbert
Join Date: Dec 2009
Location: Darmstadt, Germany
Posts: 129
Rep Power: 17 |
Dear Chrisi,
now I'm totally confused! That means the new model-combinations are not defined and the changes are completely ignored. I have to think about, but I don't think I missed something such elementary in my description! Please have a look on each single step again. Regards, Stefan |
|
June 29, 2010, 03:22 |
|
#19 |
Senior Member
Join Date: Jan 2010
Location: Stuttgart
Posts: 150
Rep Power: 16 |
Hi,
I am sorry I made a mistake!!! Now the solver with the new model is running!! Thank you so much! I will keep you up to date about the results! Best regards Chrisi |
|
July 6, 2010, 07:47 |
|
#20 |
Senior Member
Join Date: Jan 2010
Location: Stuttgart
Posts: 150
Rep Power: 16 |
Hi,
like promised I want to give an update. Everything seems to work very well with your new themphysical models. Thank you once again!! Best regards Chrisi |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Introducing polynomial thermophysical properties | juanltm | OpenFOAM Running, Solving & CFD | 11 | September 22, 2016 13:54 |
liquid in Thermophysical properties | David_010 | OpenFOAM | 1 | January 25, 2012 10:12 |
polynomial thermophysical properties | jason.ryon | OpenFOAM | 2 | May 11, 2011 07:16 |
thermophysical properties of two different gases | arvind_arya | OpenFOAM Pre-Processing | 1 | August 4, 2010 14:04 |
thermophysical properties of ham | Alex Ivancic | Main CFD Forum | 1 | November 5, 1998 12:09 |