CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Polynomial density and transport properties in buoyantBoussinesqSimpleFoam (https://www.cfd-online.com/Forums/openfoam-solving/100258-polynomial-density-transport-properties-buoyantboussinesqsimplefoam.html)

anshul bansal March 10, 2014 11:57

thanks olivier ..

vitors May 2, 2014 11:32

icoPolynomial: chtMultiRegionSimpleFoam
 
Hello,

I am running a simulation with chtMultiRegionSimpleFoam which, apparently, runs ok. It has three solids and one fluid, namely, water.

I set water properties in my thermophysicalProperties files and it works fine for rhoConst. When I tried to use icoPolynomial for equationOfState (and the respective changes in the heRhoThemo type) I could and the four polynomials without issues.

However, and simulating I realized the fluid density never changes. The only way I got a variation in the fluid density was using a PerfectFluid in equationOfState.

I'm using OpenFOAM 2.2.0.

My themophysicalProperties file for fluid is:

Code:

thermoType
{
    type            heRhoThermo;
    mixture        pureMixture;
    transport      polynomial;
    thermo          hPolynomial;
    equationOfState icoPolynomial;
    specie          specie;
    energy          sensibleEnthalpy;
}

dpdt            no;

// Cooler - water
// Data from H2O_NIST
// Values for 590 < T < 619 (K)
// Data for viscosity (mu), kappa, Cp and rho were fitted for polynomials
// of 6th order.

mixture
{
    specie
    {
        // Water mol weight [g/mol]
        nMoles          1;
        molWeight      18.02;
    }

    transport
    {
      // *** polynomial
      // mu [Pa.s]
      // kappa [W/m/K]

    muCoeffs<8> (0.477756 -0.00337294 7.80884e-06 -2.59645e-09 -1.64495e-11 2.49614e-14 -1.10764e-17 0);
    kappaCoeffs<8> (1456.92 -10.2864 0.0238197 -7.80437e-06 -5.02923e-08 7.60632e-11 -3.36662e-14 0);
    }

    thermodynamics
    {
      // *** hPolynomial
      // Cp = [J/kg/K]
      Hf  0;
      Sf  0;
      CpCoeffs<8> (-7.56975e08 5.24432e06 -11530.9 1.22828 0.0308639 -4.34995e-05 1.88346e-08 0);
    }

    equationOfState
    {
      // *** icoPolynomial
      // rho = [Kg/m^3]
      rhoCoeffs<8> (4.02745e06 -27520.6 57.8951 0.00610405 -0.000187407 2.52756e-07 -1.08057e-10 0);
    }
}

Any suggestions on how effectivelly use icoPolynomial for water?

Thank you in advance.

Vitor

karaul May 16, 2014 07:15

> the fluid density never changes.

Check fvSolution for water

it has probably rhomin and rhomax like (my example)

SIMPLE
{
momentumPredictor on;
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 100000;
rhoMin rhoMin [1 -3 0 0 0] 1000;
rhoMax rhoMax [1 -3 0 0 0] 3000;
}

vitors May 16, 2014 11:10

Quote:

Originally Posted by karaul (Post 492323)
>
Check fvSolution for water

it has probably rhomin and rhomax like (my example)

Bull's eye Evgeny, thanks. After playing with fvSolution I realized that my densities are
far too high and they were bounded by the values in fvSolution.

Now I can focus in the real problem: why the densities are too high.

Thank you very much.

Vitor

tbao June 16, 2015 22:31

Quote:

Originally Posted by Nikunj.R (Post 390678)
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::printStack(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::pureMixture<Foam::polynomia lTransport<Foam::specieThermo<Foam::hPolynomialThe rmo<Foam::icoPolynomial<8>, 8> >, 8> > >::calculate() in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libbasicThermophysicalModels.so"
#4 Foam::hRhoThermo<Foam::pureMixture<Foam::polynomia 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! :)

Hi Nikunj,

I meet the same problem. Could you tell the detail how did you figure out relaxing T and rho. I used chtmultiregionFoam. Thanks for your help.

tbao June 16, 2015 23:48

Quote:

Originally Posted by olivierG (Post 390634)
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

Hi Olivier,

I used icoPolynomial in chtmultiregionfoma and I got very high Co number for water, os it was not converged. I think your explanation to this problem is pretty right, unfortunately I am a new foamer so I quite don't know how to fix this problem. You said that the solution is to relax T and rho, could you please tell me the detail or give me some hint to fix my problem. Thanks in advance.

praveensrikanth91 September 21, 2016 13:56

Quote:

Originally Posted by tbao (Post 550677)
Hi Olivier,

I used icoPolynomial in chtmultiregionfoma and I got very high Co number for water, os it was not converged. I think your explanation to this problem is pretty right, unfortunately I am a new foamer so I quite don't know how to fix this problem. You said that the solution is to relax T and rho, could you please tell me the detail or give me some hint to fix my problem. Thanks in advance.

Hey,

I was wondering if you found a solution to this problem. I am facing a similar problem with my closed liquid domain where the Co blows up. I tried relaxing the solution and that did not help at all.

Any help is appreciated

Thank you so much

tbao September 21, 2016 14:23

Quote:

Originally Posted by praveensrikanth91 (Post 618808)
Hey,

I was wondering if you found a solution to this problem. I am facing a similar problem with my closed liquid domain where the Co blows up. I tried relaxing the solution and that did not help at all.

Any help is appreciated

Thank you so much

Hi,

I did not solve this problem. Instead, I modified cht solver for my purpose. Good luck

praveensrikanth91 September 26, 2016 20:22

Thank you so much for the reply tbao. That is unfortunate though. I was hoping to find out a solution here. Hope someone else who faced a similar issue would be able to help

Praveen

wangchengan2003 November 16, 2016 02:33

Dear Olivier
I want to know set the polynomial properties in other solvers? For example, in IcoFoam, PimpleDymFoam, etc?
Best regards


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