
[Sponsors] 
Polynomial density and transport properties in buoyantBoussinesqSimpleFoam 

LinkBack  Thread Tools  Display Modes 
April 22, 2012, 11:39 
Polynomial density and transport properties in buoyantBoussinesqSimpleFoam

#1 
New Member
Peder Aursand
Join Date: Apr 2012
Posts: 2
Rep Power: 0 
I am trying to use buoyantBoussinesqSimpleFoam to simulate natural convection around a cold pipe in a pool of water. The pipe is 273K and the surrounding walls of the pool are 293K, I therefore need to take into account density inversion of water in order to do this properly. Also, the transport properties of water vary strongly over the temperature range.
What I would like to do, is to define polynomials for rho, nu and Pr as a function of temperature T. According to the documentation of thermophysical models in OpenFOAM, this should be possible using the icoPolynomial and polynomialTransport models. I am however not able to find a proper documentation on the usage of these. The little I've been able to find involves using the thermophysicalModels file, but the buoyantBoussinesqSimpleFoam solver seems to ignore this file and instead look for a file called transportProperties with constant values for the transport properties. Can anyone help me or point me in the right direction here? 

April 23, 2012, 05:46 

#2 
Senior Member
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 262
Rep Power: 10 
hello,
You wan to use buoyantBoussinesqSimpleFoam, and you say the fluid properties vary srongly, right ? So the sort answer: do not use the Boussinesq form, try buoyantSimpleFoam instead. With buoyantSimpleFoam, you can use the polynomial properties. regards, olivier 

April 25, 2012, 03:39 

#3  
New Member
Peder Aursand
Join Date: Apr 2012
Posts: 2
Rep Power: 0 
Hi,
Quote:
But anyhow, does there exist any documentation of the polynomial transport properties feature? 

April 25, 2012, 04:04 

#4 
Senior Member
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 262
Rep Power: 10 
hello,
For polynomial transport, as for the rest: there is very little documentation unfortunatelly, you should look in source code and in forum ... or buy a training courses, as this is the way OpenFoam live. Anyway, here is an exemple of a polynomial transport properties used in thermophysicalProperties: Code:
thermoType hRhoThermo<pureMixture<icoPoly8ThermoPhysics>>; mixture { specie { nMoles 1;// not used since pureMixture and not ideal gaz. molWeight 1;// idem } equationOfState// rho(T) { rhoCoeffs<8> ( 1000 0 0 0 0 0 0 0);// coef a + bT+cT˛+... } thermodynamics { Hf 0; Sf 0; CpCoeffs<8> ( 1000 0 0 0 0 0 0 0);// Cp(T) } transport { muCoeffs<8> // viscosity(T) ( 0.01 0 0 0 0 0 0 0); kappaCoeffs<8> ( 1 0 0 0 0 0 0 0);//conductivity(T) } } regards, olivier 

August 6, 2012, 11:47 

#5 
New Member
Howard NJOKU
Join Date: Nov 2010
Location: Nsukka, Nigeria
Posts: 9
Rep Power: 7 
Hi all,
I am working on a heat transfer problem in a vertical cylindrical water tank, in which hot water flows into the top of the tank while cold water is withdrawn simultaneously from the bottom. What results is a situation of different layers in the tank at different temperatures and because of this it doesn't seem OK to use fixed properties. Your suggestion to use the buoyantPimpleFoam solver for such cases is an eyeopener, but (I hope it doesn't sound foolish): Can this solver be used in this case, where water is my working fluid when the User Guide says the solver is for "Transient solver for buoyant, turbulent flow of compressible fluids for ventilation and heattransfer"? This specification of compressible fluid discouraged me from using the solver initially and I have been trying the buoyantBoussinesqPimpleFoam solver. Your response will be of immense help. Thanks. Oke'e 

August 7, 2012, 08:30 

#6 
Senior Member
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 262
Rep Power: 10 
hello,
You can still use buoyantPimpleFoam with incompressible fluid. regards, olivier 

August 28, 2012, 07:56 

#7 
New Member
Howard NJOKU
Join Date: Nov 2010
Location: Nsukka, Nigeria
Posts: 9
Rep Power: 7 
Thanks Olivier, your responses cleared up a lot of grey areas for me and my work is up and running again.
Howard 

November 2, 2012, 09:34 

#8 
Member
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 6 
Hello All!
I am simulating a water filled cylinder being heated by a coaxial thinner cylinder at constant temperature. I am using buoyantPimpleFoam solver for simulating it. Despite following the discussions in this post, I am facing convergence issues while using the thinner cylinder temperature of 330K and 300 K. Attached with this post are my input files. Please help me with possible solutions to this issue. I would appreciate any help in this regard. Thanks a lot. Regards, Nikunj. 

November 6, 2012, 06:43 

#9 
Senior Member
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 262
Rep Power: 10 
hello,
I just take a look at your transportProperties: for T=300 K, you get rho=1e10 kg/m3 !! i don't know for other values, but something is clearly wrong here. regards, olivier 

November 6, 2012, 12:31 

#10 
Member
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 6 
Thanks for your reply Olivier!
I did notice this earlier and I tried running this example in a much simpler geometry (cuboid). While using constant properties, I am not getting any errors. However, when I use a liner dependence for rho, and keep other properties (Cp, mu, kappa) constant, I am getting the following error: Courant Number mean: 1186.73 max: 5937.61deltaT = 4.85044e07Time = 0.0264005diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0DILUPBiCG: Solving for Ux, Initial residual = 0.602502, Final residual = 0.00270336, No Iterations 1001DILUPBiCG: Solving for Uy, Initial residual = 0.571317, Final residual = 0.00204734, No Iterations 1001DILUPBiCG: Solving for Uz, Initial residual = 0.69013, Final residual = 0.00698875, No Iterations 1001DILUPBiCG: Solving for h, Initial residual = 1, Final residual = 5.10565e+09, No Iterations 1001> FOAM FATAL ERROR: Maximum number of iterations exceeded From function specieThermo<Thermo>::T(scalar f, scalar T0, scalar (specieThermo<Thermo>::*F)(const scalar) const, scalar (specieThermo<Thermo>::*dFdT)(const scalar) const) const in file /home/opencfd/OpenFOAM/OpenFOAM2.1.1/src/thermophysicalModels/specie/lnInclude/specieThermoI.H at line 69.FOAM aborting#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"#1 Foam::error::abort() in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"#2 Foam::specieThermo<Foam::hPolynomialThermo<Foam::i coPolynomial<8>, 8> >::T(double, double, double (Foam::specieThermo<Foam::hPolynomialThermo<Foam:: icoPolynomial<8>, 8> >::*)(double) const, double (Foam::specieThermo<Foam::hPolynomialThermo<Foam:: icoPolynomial<8>, 8> >::*)(double) const, double (Foam::specieThermo<Foam::hPolynomialThermo<Foam:: icoPolynomial<8>, 8> >::*)(double) const) const in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libbasicThermophysicalModels.so"#3 Foam::hRhoThermo<Foam:ureMixture<Foam:olynomia lTransport<Foam::specieThermo<Foam::hPolynomialThe rmo<Foam::icoPolynomial<8>, 8> >, 8> > >::calculate() in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libbasicThermophysicalModels.so"#4 Foam::hRhoThermo<Foam:ureMixture<Foam:olynomia lTransport<Foam::specieThermo<Foam::hPolynomialThe rmo<Foam::icoPolynomial<8>, 8> >, 8> > >::correct() in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libbasicThermophysicalModels.so"#5 in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/buoyantPimpleFoam"#6 __libc_start_main in "/lib/i386linuxgnu/libc.so.6"#7 in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/buoyantPimpleFoam" My thermophysicalProperties file lookis like this: /** C++ **\ =========   \\ / F ield  OpenFOAM: The Open Source CFD Toolbox  \\ / O peration  Version: 2.1.1  \\ / A nd  Web: www.OpenFOAM.org  \\/ M anipulation  \**/FoamFile{ version 2.0; format ascii; class dictionary; location "constant"; object thermophysicalProperties;}// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //thermoType hRhoThermo<pureMixture<icoPoly8ThermoPhysics>>;pRef 100000;mixture{ specie{ nMoles 1; molWeight 1; }equationOfState{rhoCoeffs<8> (1232.2 0.7806 0 0 0 0 0 0); // rho (T)} thermodynamics {Sf 0; Hf 0;CpCoeffs<8> (4178.0 0 0 0 0 0 0 0); // Cp (T) }transport { muCoeffs<8> (8.02e7 0 0 0 0 0 0 0); // viscosity (T)kappaCoeffs<8> (0.61 0 0 0 0 0 0 0); //conductivity (T) }}// ************************************************** *********************** // Thanks for your help! 

November 6, 2012, 12:51 

#11 
Senior Member
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 262
Rep Power: 10 
hello,
Your Co number is too high. When using variable properties with T, you should take care that T can for some iterations get some bad value, like very cold / hot > then your density goes wrong > velocity goes wrong > high courant number and crash. The solution is: relax T / rho much more, and use first order for velocity at the beginning. NB: There where a feature bug some time ago about adding temperature limiter, and i don't know if this is implemented actually, but this is not so difficult to add this. regards, olivier 

November 6, 2012, 14:22 

#12 
Member
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 6 
Well, I am getting this error even when i am simulating an iso thermal problem with same temperature everywhere.
Please note that everyhting is working fine when I simulate an example where the water is entering from one end and leaving from another. The aforementioned error occurs only when I simulate this geometry (and other geometries) such that no water leaves or enters the system. So, could this problem be due to the fact that I have a closed system or something else? The probable solution you provided in the last post makes sense. Could you tell me what do u mean by "relaxing T/rho and using first order for velocity at the beginning" and how to implement the same. Thanks a tonne! Nikunj. 

November 6, 2012, 16:55 

#13 
Member
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 6 
Hey!
I figured how to relax T and rho. This works fine when I am using rho, which is lineraly dependen on Temperature. However, when I am using the following dependence of rho on T (rho = 4.8611E10(T^6)  9.8744E07(T^5) + 8.3490E04(T^4)  3.7610E01(T^3) + 9.5196E+01(T^2)  1.2836E+04(T) + 7.2132E+05), I am getting the following error: Courant Number mean: 8.34989e07 max: 1.49846e06 deltaT = 0.00172794 Time = 0.0043679 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCG: Solving for Ux, Initial residual = 0.358751, Final residual = 8.38803e08, No Iterations 2 DILUPBiCG: Solving for Uy, Initial residual = 0.687432, Final residual = 6.84879e08, No Iterations 2 DILUPBiCG: Solving for Uz, Initial residual = 0.359104, Final residual = 8.25799e08, No Iterations 2 DILUPBiCG: Solving for h, Initial residual = 1, Final residual = 1.17068e07, No Iterations 2 > FOAM FATAL ERROR: Maximum number of iterations exceeded From function specieThermo<Thermo>::T(scalar f, scalar T0, scalar (specieThermo<Thermo>::*F)(const scalar) const, scalar (specieThermo<Thermo>::*dFdT)(const scalar) const) const in file /home/opencfd/OpenFOAM/OpenFOAM2.1.1/src/thermophysicalModels/specie/lnInclude/specieThermoI.H at line 69. FOAM aborting #0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #1 Foam::error::abort() in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #2 Foam::specieThermo<Foam::hPolynomialThermo<Foam::i coPolynomial<8>, 8> >::T(double, double, double (Foam::specieThermo<Foam::hPolynomialThermo<Foam:: icoPolynomial<8>, 8> >::*)(double) const, double (Foam::specieThermo<Foam::hPolynomialThermo<Foam:: icoPolynomial<8>, 8> >::*)(double) const, double (Foam::specieThermo<Foam::hPolynomialThermo<Foam:: icoPolynomial<8>, 8> >::*)(double) const) const in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libbasicThermophysicalModels.so" #3 Foam::hRhoThermo<Foam:ureMixture<Foam:olynomia lTransport<Foam::specieThermo<Foam::hPolynomialThe rmo<Foam::icoPolynomial<8>, 8> >, 8> > >::calculate() in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libbasicThermophysicalModels.so" #4 Foam::hRhoThermo<Foam:ureMixture<Foam:olynomia lTransport<Foam::specieThermo<Foam::hPolynomialThe rmo<Foam::icoPolynomial<8>, 8> >, 8> > >::correct() in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libbasicThermophysicalModels.so" #5 in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/buoyantPimpleFoam" #6 __libc_start_main in "/lib/i386linuxgnu/libc.so.6" #7 in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/buoyantPimpleFoam" Aborted (core dumped) As apparent by the courant number, the problem is not with the convergence now, it is with something else. Attached with this post are all the files I used for the analysis. Thanks for you help! 

November 8, 2012, 09:46 

#14 
Member
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 6 
Hey Guys!
Apparently there is some 'glitch' (if i can call it that) in this solver, which creates problems when a closed system is simulated. The above example, when run with open top, runs w/o any errors. I dont know why is it because of, but thats how it is working for me. Nikunj. 

November 8, 2012, 09:56 

#15 
Senior Member
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 262
Rep Power: 10 
hello,
Have you tested to move the pRefCell outside the domain ? On some solver there is a glitch at the cell location of the pRefCell. Regards, olivier 

November 8, 2012, 10:25 

#16 
Member
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 6 
I have not specified pRef cell. Because, pRef is not even used in the peqn.H file of this solver, specifieing it is not going to make any difference, I think. I amy be wrong though.
Nikunj. 

November 8, 2012, 16:01 
Temp. not propagating

#17 
Member
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 6 
Hello!
Even though the example is running without any error, the temperature is not propagating in the control volume, no matter how high the temperature at the BC is. It can be seen from the attached figure. Also attached are the case files that I am using. Please advise me about how to go about it. I think that there is some issue with the p_rgh condition, but i could be worng. Thanks, Nikunj 

November 8, 2012, 16:04 

#18 
Member
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 6 
attachments:


March 10, 2014, 04:23 
use hpolynomial for rhoCentralFoam

#19 
New Member
anshul bansal
Join Date: Jun 2013
Posts: 22
Rep Power: 5 
hey all,
can i use hpolynomial thermo condition for rhoCentralFoam solver?? because i use it, it gives me that error... thermoType { type heRhoThermo; mixture reactingMixture; transport polynomial; thermo hPolynomial; energy sensibleEnthalpy; equationOfState icoPolynomial; specie specie; } Valid psiThermo types are: type mixture transport thermo equationOfState specie energy hePsiThermo homogeneousMixture const hConst perfectGas specie sensibleEnthalpy hePsiThermo homogeneousMixture sutherland hConst perfectGas specie sensibleEnthalpy hePsiThermo homogeneousMixture sutherland janaf perfectGas specie sensibleEnthalpy hePsiThermo inhomogeneousMixture const hConst perfectGas specie sensibleEnthalpy hePsiThermo inhomogeneousMixture sutherland hConst perfectGas specie sensibleEnthalpy hePsiThermo inhomogeneousMixture sutherland janaf perfectGas specie sensibleEnthalpy hePsiThermo multiComponentMixture const hConst perfectGas specie sensibleEnthalpy hePsiThermo multiComponentMixture const hConst perfectGas specie sensibleInternalEnergy hePsiThermo multiComponentMixture sutherland janaf perfectGas specie sensibleEnthalpy hePsiThermo multiComponentMixture sutherland janaf perfectGas specie sensibleInternalEnergy hePsiThermo pureMixture const eConst perfectGas From function psiThermo::New in file lnInclude/basicThermoTemplates.C at line 73. FOAM exiting help me out please?? thanks Anshul 

March 10, 2014, 04:41 

#20 
Senior Member
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 262
Rep Power: 10 
hello,
rhoCentralFoam use hePsiThermo, not heRhoThermo, thus you can't use polynomial. However, for Cp you can use janaf which is also a polynomial model, but not for density (only perfect gas here). regards, 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Passive scalar transport  novyno  OpenFOAM Running, Solving & CFD  10  May 5, 2016 13:31 
icoPoly8ThermoPhysics limits density below 2 kg/m3  smajer  OpenFOAM  2  March 16, 2012 07:11 
Questions for a species transport problems (snapshots attached)  aleisia  FLUENT  2  October 9, 2011 04:40 
unsteady solver and density method  Ellen  FLUENT  0  December 23, 2008 15:25 
UDF to change density in species transport  Karthik  FLUENT  6  December 8, 2004 19:19 