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

Polynomial density and transport properties in buoyantBoussinesqSimpleFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree12Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 22, 2012, 12:39
Default Polynomial density and transport properties in buoyantBoussinesqSimpleFoam
  #1
New Member
 
Peder Aursand
Join Date: Apr 2012
Posts: 2
Rep Power: 0
pedera is on a distinguished road
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?
pedera is offline   Reply With Quote

Old   April 23, 2012, 06:46
Default
  #2
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18
olivierG is on a distinguished road
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
olivierG is offline   Reply With Quote

Old   April 25, 2012, 04:39
Default
  #3
New Member
 
Peder Aursand
Join Date: Apr 2012
Posts: 2
Rep Power: 0
pedera is on a distinguished road
Hi,

Quote:
Originally Posted by olivierG View Post
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
Thanks oliverG, that makes sense!

But anyhow, does there exist any documentation of the polynomial transport properties feature?
pedera is offline   Reply With Quote

Old   April 25, 2012, 05:04
Default
  #4
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18
olivierG is on a distinguished road
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)
    }
}
You can use this straight with buoyantPimpleFoam. If you want to use buoyantSimpleFoam (steady state), you need to create your own solver (easy, see http://www.cfd-online.com/Forums/ope...tml#post355667)

regards,
olivier
olivierG is offline   Reply With Quote

Old   August 6, 2012, 12:47
Default
  #5
New Member
 
Howard NJOKU
Join Date: Nov 2010
Location: Nsukka, Nigeria
Posts: 9
Rep Power: 16
Oke'e is on a distinguished road
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 eye-opener, 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 heat-transfer"? 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
Oke'e is offline   Reply With Quote

Old   August 7, 2012, 09:30
Default
  #6
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18
olivierG is on a distinguished road
hello,
You can still use buoyantPimpleFoam with incompressible fluid.

regards,
olivier
olivierG is offline   Reply With Quote

Old   August 28, 2012, 08:56
Default
  #7
New Member
 
Howard NJOKU
Join Date: Nov 2010
Location: Nsukka, Nigeria
Posts: 9
Rep Power: 16
Oke'e is on a distinguished road
Thanks Olivier, your responses cleared up a lot of grey areas for me and my work is up and running again.

Howard
Oke'e is offline   Reply With Quote

Old   November 2, 2012, 09:34
Default
  #8
Member
 
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 14
Nikunj.R is on a distinguished road
Hello All!

I am simulating a water filled cylinder being heated by a co-axial 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.
Attached Files
File Type: zip poolEx330_water.zip (16.3 KB, 132 views)
Nikunj.R is offline   Reply With Quote

Old   November 6, 2012, 06:43
Default
  #9
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18
olivierG is on a distinguished road
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
olivierG is offline   Reply With Quote

Old   November 6, 2012, 12:31
Default
  #10
Member
 
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 14
Nikunj.R is on a distinguished road
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.85044e-07Time = 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/OpenFOAM-2.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/i386-linux-gnu/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.02e-7 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!
Nikunj.R is offline   Reply With Quote

Old   November 6, 2012, 12:51
Default
  #11
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18
olivierG is on a distinguished road
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
olivierG is offline   Reply With Quote

Old   November 6, 2012, 14:22
Default
  #12
Member
 
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 14
Nikunj.R is on a distinguished road
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.
Nikunj.R is offline   Reply With Quote

Old   November 6, 2012, 16:55
Default
  #13
Member
 
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 14
Nikunj.R is on a distinguished road
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.8611E-10(T^6) - 9.8744E-07(T^5) + 8.3490E-04(T^4) - 3.7610E-01(T^3) + 9.5196E+01(T^2) - 1.2836E+04(T) + 7.2132E+05), I am getting the following error:

Courant Number mean: 8.34989e-07 max: 1.49846e-06
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.38803e-08, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 0.687432, Final residual = 6.84879e-08, No Iterations 2
DILUPBiCG: Solving for Uz, Initial residual = 0.359104, Final residual = 8.25799e-08, No Iterations 2
DILUPBiCG: Solving for h, Initial residual = 1, Final residual = 1.17068e-07, 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/OpenFOAM-2.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/i386-linux-gnu/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!
Attached Files
File Type: gz squareMesh.tar.gz (4.1 KB, 37 views)
Nikunj.R is offline   Reply With Quote

Old   November 8, 2012, 09:46
Default
  #14
Member
 
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 14
Nikunj.R is on a distinguished road
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.
Nikunj.R is offline   Reply With Quote

Old   November 8, 2012, 09:56
Default
  #15
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18
olivierG is on a distinguished road
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
olivierG is offline   Reply With Quote

Old   November 8, 2012, 10:25
Default
  #16
Member
 
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 14
Nikunj.R is on a distinguished road
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.
Nikunj.R is offline   Reply With Quote

Old   November 8, 2012, 16:01
Default Temp. not propagating
  #17
Member
 
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 14
Nikunj.R is on a distinguished road
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
Nikunj.R is offline   Reply With Quote

Old   November 8, 2012, 16:04
Default
  #18
Member
 
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 14
Nikunj.R is on a distinguished road
attachments:
Attached Images
File Type: jpg aaa3.jpg (22.3 KB, 103 views)
Attached Files
File Type: gz squareMesh_openTop1_vel.tar.gz (4.5 KB, 30 views)
Nikunj.R is offline   Reply With Quote

Old   March 10, 2014, 04:23
Default use hpolynomial for rhoCentralFoam
  #19
New Member
 
anshul bansal
Join Date: Jun 2013
Posts: 22
Rep Power: 13
anshul bansal is on a distinguished road
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
anshul bansal is offline   Reply With Quote

Old   March 10, 2014, 04:41
Default
  #20
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18
olivierG is on a distinguished road
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,
olivierG is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passive scalar transport novyno OpenFOAM Running, Solving & CFD 10 May 5, 2016 14: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 05: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


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