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/)
-   -   buoyantSimpleFoam and watertank (https://www.cfd-online.com/Forums/openfoam-solving/125718-buoyantsimplefoam-watertank.html)

Tobi October 29, 2013 16:05

buoyantSimpleFoam and watertank
 
3 Attachment(s)
Dear Foamers,

I am working (since 2 weeks) on a very simple simulation.

What I want to simulate:

Something like that: http://www.wiga-energietechnik.de/bi...mage/lwsp2.gif


What I did:

- I meshed the whole geometry with a corse and very fine mesh
- I build polynoms for water thermodynamics (30°C-70°C)
- I changed the thermodynamics for water
- Simulation is LAMINAR

- Inlet 4e-5 m³/s

- At the inlet I have a very simple pipe installation but the solver blow up every time so I just set an Inlet + Outlet (thats all - see pictures).

Now my problem:

Every BC I set make problems.

I am not 100% sure how I should set the p_rgh BC for inlet/outlet/wall.

p is calculated.


For U and T its clear.

The solver is working just for 1 or none iterations.
If I set of the gravity the simulation is working.

It seems that the solver is calculating my water with a compressibility because after the first time step I get extrem huge velocity fields in the big domain.


I tried a lot of BC for U + p_rgh - fixed at the outlet - pressureInletOutletVelocty etc.

Does someone can give me a hint how to set these BC right?

Relaxationfactors are decreased to 0.1.
linearUpwind + limitedLinear schemes are used etc...


Interesting fact:

without gravitation the simulation is working.
With gravitation the mass flux cant be calculated:
Code:

--> FOAM FATAL ERROR:
Continuity error cannot be removed by adjusting the outflow.
Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow.
Total flux              : 102320
Specified mass inflow  : 0.29563
Specified mass outflow  : 0.151702
Adjustable mass outflow : 0

For gravity I have to set the outlet p_rgh to fixedValue that I can calculate the first timestep but after that the solver blow up again. A picture of p, p_rgh and U is included in the attachment.

The error message:
Code:

Time = 2

DILUPBiCG:  Solving for Ux, Initial residual = 0.733571, Final residual = 0.0031127, No Iterations 7
DILUPBiCG:  Solving for Uy, Initial residual = 0.623405, Final residual = 0.000739902, No Iterations 8
DILUPBiCG:  Solving for Uz, Initial residual = 0.701814, Final residual = 0.0023944, No Iterations 7
DILUPBiCG:  Solving for h, Initial residual = 1, Final residual = 0.00132406, No Iterations 2


--> FOAM FATAL ERROR:
Maximum number of iterations exceeded

    From function thermo<Thermo, Type>::T(scalar f, scalar T0, scalar (thermo<Thermo, Type>::*F)(const scalar) const, scalar (thermo<Thermo, Type>::*dFdT)(const scalar) const, scalar (thermo<Thermo, Type>::*limit)(const scalar) const) const
    in file /home/shorty/OpenFOAM/OpenFOAM-2.2.x/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 76.

FOAM aborting

Compared with the velocity field its clear why its blow up but I can not fix it.


Any suggestions would be appreciated.

Regards Tobi

hanness October 30, 2013 02:55

Hi Tobi,

seems to me as your problem might arise due to the initial conditions of p. In your final solution the p field should be close to the hydrostatic field and p_rgh close to constant. However, if you assume p to be constant in the beginning then you get the p_rgh field shown in your plot which leads to high velocities and possibly even to a crash. The problem is that in the very first step the solver uses the p-field to calculate the p_rgh field although your boundary conditions are set for p_rgh and p is set to calculated. So what you can do is either adapt the solver (which is just a change of one line) or probably a little bit easier use funkySetFields to set the initial pressure field to the hydrostatic pressure.

Hope that helps
Hannes

tomf October 30, 2013 04:41

Hi Tobi,

As a by-pass you could run initially with gravity turned off. Than after say 200 iterations turn gravity on. Unfortunately it is not run-time modifiable so you have to stop (and save) the run, change gravity and rerun from latestTime.

Regards,
Tom

Tobi October 31, 2013 04:24

3 Attachment(s)
Hi,

thanks for your replays.


I tried Toms hints.
The pictures show p, p_rgh and U after 500 iterations.

Then i turned gravity on and the 501 step is shown in the 2nd replay.

@hannes: what lines had to be modified?
@all: could it be possible that my polynomes are wrong?

Tobi October 31, 2013 04:49

3 Attachment(s)
Here are the pictures at 501 iterations.
After that my solver blow up:
Code:

[5]
[5]
[5] --> FOAM FATAL ERROR:
[5] Maximum number of iterations exceeded
[5]
[5]    From function thermo<Thermo, Type>::T(scalar f, scalar T0, scalar (thermo<Thermo, Type>::*F)(const scalar) const, scalar (thermo<Thermo, Type>::*dFdT)(const scalar) const, scalar (thermo<Thermo, Type>::*limit)(const scalar) const) const
[5]    in file /home/shorty/OpenFOAM/OpenFOAM-2.2.x/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 76.
[5]
FOAM parallel run aborting
[5]
[5] #0  Foam::error::printStack(Foam::Ostream&) in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libOpenFOAM.so"
[5] #1  Foam::error::abort() in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libOpenFOAM.so"
[5] #2  Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie, 8>, 8>, Foam::sensibleEnthalpy>::T(double, double, double, double (Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie, 8>, 8>, Foam::sensibleEnthalpy>::*)(double, double) const, double (Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie, 8>, 8>, Foam::sensibleEnthalpy>::*)(double, double) const, double (Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie, 8>, 8>, Foam::sensibleEnthalpy>::*)(double) const) const in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libfluidThermophysicalModels.so"
[5] #3  Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::polynomialTransport<Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie, 8>, 8>, Foam::sensibleEnthalpy>, 8> > >::calculate() in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libfluidThermophysicalModels.so"
[5] #4  Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::polynomialTransport<Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie, 8>, 8>, Foam::sensibleEnthalpy>, 8> > >::correct() in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libfluidThermophysicalModels.so"
[5] #5 
[5]  in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/bin/buoyantSimpleFoam"
[5] #6  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
[5] #7 
[5]  in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/bin/buoyantSimpleFoam"

One hint for p_rgh:

Code:

  p0 = p_rgh + rho*gh
Normally I should have such a pressure field shown in the picture, am I not?
Because my tank is 2m high and the fluid is water (1000kg/m³).

So as I see in this formula the higher I get in the tank the lower p0 should be because:

Code:

rho ~ 1000kg/m³
g = -9,81
h raises

p0 = p_rgh - 1000* 9,81 * 2

Is that correct?
Therefor p and p_rgh should not be the same?

Tobi October 31, 2013 05:08

Hi all,

just one question. Why is in interFoam the p0 calculation for nonclosedVolumes like that:
Code:

p == p_rgh + rho*gh;
and in buoyant***Foam like that:
Code:

p = p_rgh + rho*gh;
Regards
Tobi

Tobi October 31, 2013 13:56

Hi all,

I made a test with chtMultiRegionSimpleFoam with only one region.
Just a very simple case - box with inlet and outlet at the top of the box.

If I use the thermodynamics out of the liquidHeater tutorial:
Code:

thermoType
{
    type            heRhoThermo;
    mixture        pureMixture;
    transport      const;
    thermo          hConst;
    equationOfState rhoConst;
    specie          specie;
    energy          sensibleEnthalpy;
}

mixture
{
    specie
    {
        nMoles          1;
        molWeight      18;
    }
    equationOfState
    {
        rho            1000;
    }
    thermodynamics
    {
        Cp              4181;
        Hf              0;
    }
    transport
    {
        mu              959e-6;
        Pr              6.62;
    }
}

Its working.
After switching to my own thermodynamic with the polynoms its blow up after the 4th iteration:
Code:

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

mixture
{
    specie
    {
        nMoles          1;
        molWeight      18;
    }

    equationOfState
    {
          rhoCoeffs<8>  (611.705 2.78 -0.005 5.58512e-13 -4.3231e-16 0 0 0);
    }

    thermodynamics
    {
        Hf              0;
        Sf              0;
        CpCoeffs<8>    (5158.69 -6.26 0.01 6.17887e-12 -4.78243e-15 0 0 0);
    }

    transport
    {
        muCoeffs<8>    (0.000292721 -3.33273e-6 1.43625e-8 -2.76923e-11 2.0125e-14 0 0 0);
        kappaCoeffs<8>  (-55.2758 0.683843 -0.00315152 6.47667e-6 -5e-9 0 0 0);
    }
}


Therefor I made a test just with the first coefficient like:
Code:


rhoCoeffs<8>  (1000 0 0 0 0 0 0 0);

for all other polynoms too. But the result is the same - after 3 iterations the solver blow up due to maximum Iteration reached:

Code:

--> FOAM FATAL ERROR:
Maximum number of iterations exceeded

    From function thermo<Thermo, Type>::T(scalar f, scalar T0, scalar (thermo<Thermo, Type>::*F)(const scalar) const, scalar (thermo<Thermo, Type>::*dFdT)(const scalar) const, scalar (thermo<Thermo, Type>::*limit)(const scalar) const) const
    in file /home/shorty/OpenFOAM/OpenFOAM-2.2.x/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 76.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libOpenFOAM.so"
#1  Foam::error::abort() in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libOpenFOAM.so"
#2  Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie, 8>, 8>, Foam::sensibleEnthalpy>::T(double, double, double, double (Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie, 8>, 8>, Foam::sensibleEnthalpy>::*)(double, double) const, double (Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie, 8>, 8>, Foam::sensibleEnthalpy>::*)(double, double) const, double (Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie, 8>, 8>, Foam::sensibleEnthalpy>::*)(double) const) const in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libfluidThermophysicalModels.so"
#3  Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::polynomialTransport<Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie, 8>, 8>, Foam::sensibleEnthalpy>, 8> > >::calculate() in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libfluidThermophysicalModels.so"
#4  Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::polynomialTransport<Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie, 8>, 8>, Foam::sensibleEnthalpy>, 8> > >::correct() in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libfluidThermophysicalModels.so"
#5 
 in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/bin/chtMultiRegionSimpleFoam"
#6  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7 
 in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/bin/chtMultiRegionSimpleFoam"
Abgebrochen (Speicherabzug geschrieben)

Any hints?
I am out of mind and have no further ideas at the moment.

Regards
Tobi

Tobi October 31, 2013 14:12

Hi all,

just notice:

I am stupid! :p


All values of mu are wrong. Instead of writing:

503,89e-6

I wrote

0,50389e-6


After changing this, the easy test case is working. Now I am going to check if my bigger project is working too.

Tobi October 31, 2013 16:10

Okay.

I checked it out with the other case.
Without gravity its working (bouyantSimpleFoam and chtMultiRegionSimpleFoam).

But after switching on the gravity its still the same. :(

Regards Tobi

jherb October 31, 2013 20:28

Perhaps your problem is the same as described in this thread:
http://www.cfd-online.com/Forums/ope...roperties.html

You could also try the transient solver (buoyantPimpleFoam)

hanness November 4, 2013 04:03

Dear Tobi,

the pictures you showed match exactly the problem we had. I'm pretty sure that your results will improve when you start the simulations with hydrostatic pressure distribution for p. What happens is when you turn on gravity the pressure field rapidly changes in order to be consistent so that's why you get those strong gradients in the p_rgh field which again results in the high velocities.
If you don't want to set your p field with funkySetFields then you should adapt your solver. Copy the solver and the only thing you have to change in createFields.H is the line reading
Code:

p_rgh = p - rho*gh;
For the buoyantSimpleFoam solver it is line 71
Replace it by solving for p:
Code:

p = p_rgh + rho*gh
This way you initialise using the constant p_rgh field instead of the constant p field which is much closer to the real solution.

Regards
Hannes

Tobi November 4, 2013 06:43

1 Attachment(s)
Hi all,

thanks for the hints but it is still not working.
On my easy case the chtMultiRegionSimpleFoam solver (only with one domain) is working. But the buoyantSimpleFoam is not working. Additionally I tryed the hints hannes said but not with success.


In the attachment you find a picture of the chtMultiSImpleFoam solver and the solution.
I have no further idea at the moment.

For me it seems that the buoyantSimpleFoam is not a good solver for the thing I want to do. Furthermore the chtMultiSimpleFoam solver is not working in my big case too.

Thanks for your help but I think I have to give up on that project.
Maybe "WATER" is not very common for the solvers.

At least I had a look into the cht solver and the createFields.H file.
There is the same calculation as in the buoyantSimpleFoam.
So I have no idea why this solver is working and the other one not :/




Regards Tobi

Tobi November 4, 2013 07:26

Hi all,

now the pressure fields are the same (buoyantSimpleFoam and chtMultiRegionSimpleFoam) .

I had to change the schemes to get the same results :)


Now I am going to check if its working wit a bigger domain.

Tobi November 4, 2013 08:50

Summary with a bigger domain:


- chtMultiRegionSimpleFoam isn 't working anymore
- buoyantSimpleFoam isn 't working anymore
- myBuoyantSimpleFoam with the modification in the createFields.H is working.

Hannes I think the work is done now.
I will check my official geometry now.

I keep you posted.

Tobi November 4, 2013 09:26

Quote:

Originally Posted by hanness (Post 460410)
Dear Tobi,

the pictures you showed match exactly the problem we had. I'm pretty sure that your results will improve when you start the simulations with hydrostatic pressure distribution for p. What happens is when you turn on gravity the pressure field rapidly changes in order to be consistent so that's why you get those strong gradients in the p_rgh field which again results in the high velocities.
If you don't want to set your p field with funkySetFields then you should adapt your solver. Copy the solver and the only thing you have to change in createFields.H is the line reading
Code:

p_rgh = p - rho*gh;
For the buoyantSimpleFoam solver it is line 71
Replace it by solving for p:
Code:

p = p_rgh + rho*gh
This way you initialise using the constant p_rgh field instead of the constant p field which is much closer to the real solution.

Regards
Hannes

Hi Hannes - your hint is working fine :)
Thanks a lot.


Just one question to that.
Why isn 't it implemented as you wrote?

I think there is any reason for that?

Additionally with the PIMPLE algorithm it is not working.
Do you have any experience with that?

Maybe I will initialize it with simple and then switch to pimple.

Regards Tobi

Tobi November 5, 2013 12:25

Hi all,

with the modified buoyantSimpleFoam solver my case is working and the steady state result is very nice.

After initialize this solution with the buoyantPimpleFoam solver I get crazy p_rgh and p fields again :(

hanness November 6, 2013 09:53

Hi Tobi,

I can't really tell you why it is implemented that way, I'm not aware of any restrictions at that point. Maybe the thinking is, that it is easier to initialise a pressure field which is a little more intuitiv then to initialise p_rgh when not starting with constant fields.
However, concerning the problem with buoyantPimpleFoam I could only guess. First of all, one thing that might become neccessary is to increase your writePrecision in controlDict, the standard six (or eight?) digits are by far not sufficient when small fluctuations in p_rgh are concerned, so that might be a reason why a restart might fail. Otherwise it should be possible to run the simulation with the buoyantPimpleFoam starting from a constant field when the same change to the solver is performed (change in createFields.H).
Could you provide some more information on the crash if the above does not help?

Hannes

Tobi November 6, 2013 11:03

3 Attachment(s)
Dear Hannes,

thanks for your replay.

I also tried to start the simulation with the change in the createField.H.
But without success.

Additionally I changed the time precision like you said but the same - crash.
Here is the output:

Code:

Starting time loop

Courant Number mean: 6.92740210013e-09 max: 4.85034908134e-06
deltaT = 1.199999616e-07
Time = 1.2e-07

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG:  Solving for Ux, Initial residual = 2.28465064941e-09, Final residual = 2.28465064941e-09, No Iterations 0
DILUPBiCG:  Solving for Uy, Initial residual = 2.43944451461e-09, Final residual = 2.43944451461e-09, No Iterations 0
DILUPBiCG:  Solving for Uz, Initial residual = 1.09072719922e-09, Final residual = 1.09072719922e-09, No Iterations 0
DILUPBiCG:  Solving for h, Initial residual = 3.35094034737e-06, Final residual = 2.93432135474e-18, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.999966166727, Final residual = 4.61953060743e-07, No Iterations 25
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 7.21330773016e-17, global = 3.97805509428e-17, cumulative = 3.97805509428e-17
ExecutionTime = 42.62 s  ClockTime = 60 s

Courant Number mean: 8.31290630685e-09 max: 5.82512408095e-06
deltaT = 1.43999933184e-07
Time = 2.64e-07

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG:  Solving for Ux, Initial residual = 0.000359951353176, Final residual = 2.99850393754e-17, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.000406515147044, Final residual = 4.7022285039e-17, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 5.62159242983e-05, Final residual = 3.53128489406e-18, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.000118849971877, Final residual = 8.30419637485e-17, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.503136149457, Final residual = 2.61630245853e-07, No Iterations 26
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 3.97094383529e-17, global = 1.86616925674e-17, cumulative = 5.84422435102e-17
ExecutionTime = 66.02 s  ClockTime = 89 s

Courant Number mean: 9.97543173077e-09 max: 6.99668194517e-06
deltaT = 1.72799880008e-07
Time = 4.368e-07

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG:  Solving for Ux, Initial residual = 0.00020724814406, Final residual = 5.63890977966e-17, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.000235776423607, Final residual = 4.17515596363e-17, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 3.23259354164e-05, Final residual = 1.41492437006e-17, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.999999131419, Final residual = 1.4011399717e-14, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.999982729227, Final residual = 9.81585468245e-07, No Iterations 52
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 1.90312676653e-13, global = -1.04003980939e-14, cumulative = -1.03419558504e-14
ExecutionTime = 100.86 s  ClockTime = 130 s

Courant Number mean: 0.00016710031461 max: 0.221478550247
deltaT = 3.90105209282e-08
Time = 4.7581e-07

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG:  Solving for Ux, Initial residual = 0.0892826131216, Final residual = 3.47960960238e-10, No Iterations 2
DILUPBiCG:  Solving for Uy, Initial residual = 0.0860767448894, Final residual = 2.07507793124e-10, No Iterations 2
DILUPBiCG:  Solving for Uz, Initial residual = 0.00526497170747, Final residual = 5.00604327108e-07, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.999999999974, Final residual = 1.22827994334e-07, No Iterations 1
#0  Foam::error::printStack(Foam::Ostream&) in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libOpenFOAM.so"
#2  in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libOpenFOAM.so"
#4  Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMatrix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libOpenFOAM.so"
#5  Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libOpenFOAM.so"
#6  Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libfiniteVolume.so"
#7  Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/home/shorty/OpenFOAM/shorty-2.2.x/platforms/linux64Gcc47DPOpt/bin/myBuoyantPimpleFoam"
#8 
 in "/home/shorty/OpenFOAM/shorty-2.2.x/platforms/linux64Gcc47DPOpt/bin/myBuoyantPimpleFoam"
#9  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10 
 in "/home/shorty/OpenFOAM/shorty-2.2.x/platforms/linux64Gcc47DPOpt/bin/myBuoyantPimpleFoam"
Gleitkomma-Ausnahme (Speicherabzug geschrieben)

I added a picture of the initial solution.

Regards Tobi

jherb November 6, 2013 11:32

If I read your log file correctly, you don't use the nOuterCorrectors loop. Have you tried nOuterCorrectors > 1 with underrelaxation?

Tobi November 6, 2013 17:34

Hi,

PIMPLE and underrelaxation?
Is underrelaxation not changing the real solution (accuracy in time)?

Well I used nOuterCorrectors > 1 but without success anyway. The error is different. I reach the maximum iteration in the temperature calculation:

Code:

Courant Number mean: 6.92740210013e-09 max: 4.85034908134e-06
deltaT = 1.199999616e-07
Time = 1.2e-07

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
PIMPLE: iteration 1
DILUPBiCG:  Solving for Ux, Initial residual = 4.38718521517e-07, Final residual = 4.38718521517e-07, No Iterations 0
DILUPBiCG:  Solving for Uy, Initial residual = 4.74501872065e-07, Final residual = 4.74501872065e-07, No Iterations 0
DILUPBiCG:  Solving for Uz, Initial residual = 1.12086811751e-07, Final residual = 1.12086811751e-07, No Iterations 0
DILUPBiCG:  Solving for h, Initial residual = 3.35094034737e-06, Final residual = 2.93432135474e-18, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.997921524511, Final residual = 0.00514407773528, No Iterations 3
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 1.62324329599e-14, global = 2.43019772121e-17, cumulative = 2.43019772121e-17
PIMPLE: iteration 2
DILUPBiCG:  Solving for Ux, Initial residual = 8.49053274605e-06, Final residual = 1.56889161256e-18, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 9.2706169794e-06, Final residual = 1.7128784731e-18, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 2.42439406856e-06, Final residual = 6.15472389836e-19, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 9.4741734031e-05, Final residual = 4.43794077117e-17, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.19770073244, Final residual = 0.00135321069298, No Iterations 3
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 7.92499613563e-15, global = -2.83812616391e-17, cumulative = -4.07928442704e-18
PIMPLE: iteration 3
DILUPBiCG:  Solving for Ux, Initial residual = 5.83420314596e-06, Final residual = 9.42862909442e-19, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 6.40245339442e-06, Final residual = 1.01498615559e-18, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 1.25166849944e-06, Final residual = 2.97094658592e-19, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.999998344609, Final residual = 1.3555675042e-14, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.999975236161, Final residual = 9.72118583228e-07, No Iterations 53
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 9.88922463867e-14, global = -5.09467127861e-15, cumulative = -5.09875056304e-15
ExecutionTime = 55.77 s  ClockTime = 56 s

Courant Number mean: 8.77396468445e-05 max: 0.116223720973
deltaT = 5.162455599e-08
Time = 1.71625e-07

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
PIMPLE: iteration 1
DILUPBiCG:  Solving for Ux, Initial residual = 0.157070886327, Final residual = 5.76405070912e-06, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.150534403994, Final residual = 6.62063104725e-06, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.0099884610888, Final residual = 9.50614332261e-07, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.999999999998, Final residual = 1.22959247587e-07, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.999999956955, Final residual = 0.00978329204882, No Iterations 132
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = -0.00980931633566, global = 1.15347141494e-05, cumulative = 1.15347141443e-05
PIMPLE: iteration 2
DILUPBiCG:  Solving for Ux, Initial residual = 0.999932390446, Final residual = 0.0990621421236, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.999999756929, Final residual = 0.0923265680759, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.998134013837, Final residual = 0.046339171224, No Iterations 3
DILUPBiCG:  Solving for h, Initial residual = 1, Final residual = 0.0804871336416, No Iterations 25


--> FOAM FATAL ERROR:
Maximum number of iterations exceeded

    From function thermo<Thermo, Type>::T(scalar f, scalar T0, scalar (thermo<Thermo, Type>::*F)(const scalar) const, scalar (thermo<Thermo, Type>::*dFdT)(const scalar) const, scalar (thermo<Thermo, Type>::*limit)(const scalar) const) const
    in file /home/shorty/OpenFOAM/OpenFOAM-2.2.x/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 76.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libOpenFOAM.so"
#1  Foam::error::abort() in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libOpenFOAM.so"
#2  Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie, 8>, 8>, Foam::sensibleEnthalpy>::T(double, double, double, double (Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie, 8>, 8>, Foam::sensibleEnthalpy>::*)(double, double) const, double (Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie, 8>, 8>, Foam::sensibleEnthalpy>::*)(double, double) const, double (Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie, 8>, 8>, Foam::sensibleEnthalpy>::*)(double) const) const in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libfluidThermophysicalModels.so"
#3  Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::polynomialTransport<Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie, 8>, 8>, Foam::sensibleEnthalpy>, 8> > >::calculate() in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libfluidThermophysicalModels.so"
#4  Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::polynomialTransport<Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie, 8>, 8>, Foam::sensibleEnthalpy>, 8> > >::correct() in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libfluidThermophysicalModels.so"
#5 
 in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/bin/buoyantPimpleFoam"
#6  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7 
 in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/bin/buoyantPimpleFoam"
Abgebrochen (Speicherabzug geschrieben)


hanness November 7, 2013 04:36

Hi Tobi,

what I meant was to increase the write-precision and not the time-precision. At least that helps me a lot when restarting simulations.
Perhaps you could also try with larger time-steps. Your Courant-number is extremely low. Maybe it's also worth trying with nNonOrthogonalCorrectors > 0 (I reckon your mesh is not 100% orthogonal?).

Hannes

Tobi November 7, 2013 06:04

Hi Hannes,

I increased the "writePrecision" and not the "timePrecision" :)
At the moment I increased both to 15, set my dT lower and the nonOrthogonal to 1.

My mesh is good:
Code:

Time = 0

Mesh stats
    points:          1420256
    faces:            3787230
    internal faces:  3501625
    cells:            1185217
    faces per cell:  6.14980632238653
    boundary patches: 3
    point zones:      0
    face zones:      0
    cell zones:      0

Overall number of cells of each type:
    hexahedra:    981723
    prisms:        108684
    wedges:        0
    pyramids:      0
    tet wedges:    42
    tetrahedra:    0
    polyhedra:    94768
    Breakdown of polyhedra by number of faces:
        faces  number of cells
            4  746
            5  920
            6  27064
            7  14
            9  38347
          11  7
          12  25377
          15  2055
          18  231
          21  4
          24  3

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
                  Patch    Faces  Points                  Surface topology
                    wall  285437  286422  ok (non-closed singly connected)
                  inlet      72      77  ok (non-closed singly connected)
                  outlet      96      108  ok (non-closed singly connected)

Checking geometry...
    Overall domain bounding box (-0.32 -0.32 0) (0.320385 0.32 2.07)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
    Boundary openness (2.28798557816184e-15 4.72323772349634e-15 -2.4044112705264e-16) OK.
    Max cell openness = 3.29050685177786e-16 OK.
    Max aspect ratio = 10.1120918504922 OK.
    Minimum face area = 2.78885395035561e-07. Maximum face area = 0.000490145875985542.  Face area magnitudes OK.
    Min volume = 2.16128484755706e-10. Max volume = 9.89733961507632e-06.  Total volume = 0.637961111300693.  Cell volumes OK.
    Mesh non-orthogonality Max: 59.6160360035141 average: 9.19242164777073
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 2.68658486302931 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

End

At least I tried to switch of the gravity again but without success.

Regards
Tobi

jherb November 7, 2013 07:30

The idea of PIMPLE is to combine the PISO and the SIMPLE algorithms. You iterate several times over one time step and use underrelaxation to get a stable solution. Of course, if you only did one iteration per time step + underrelaxation your solution would not be correct. Therefore, you do multiple iterations (check your residuals).

So I would suggest, set nOuterCorrectors to e. g. 20 and and for the relaxation factors something like that:
Code:

relaxationFactors
{
    fields
    {
        rho            0.5;
        p_rgh          0.5;
    }
    equations
    {
        "(h|e)"        0.5;
        T              0.5;
        U              0.5;
        "(k|omega)" 0.5;
    }
}

You probably have to adjust these factors. See also the tutorials for pimpleFoam (.../OpenFOAM/OpenFOAM-2.2.x/tutorials/incompressible/pimpleFoam/...)


Quote:

Originally Posted by Tobi (Post 460912)
Hi,

PIMPLE and underrelaxation?
Is underrelaxation not changing the real solution (accuracy in time)?

Well I used nOuterCorrectors > 1 but without success anyway. The error is different. I reach the maximum iteration in the temperature calculation:

Code:

Courant Number mean: 6.92740210013e-09 max: 4.85034908134e-06
deltaT = 1.199999616e-07
Time = 1.2e-07

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
PIMPLE: iteration 1
DILUPBiCG:  Solving for Ux, Initial residual = 4.38718521517e-07, Final residual = 4.38718521517e-07, No Iterations 0
DILUPBiCG:  Solving for Uy, Initial residual = 4.74501872065e-07, Final residual = 4.74501872065e-07, No Iterations 0
DILUPBiCG:  Solving for Uz, Initial residual = 1.12086811751e-07, Final residual = 1.12086811751e-07, No Iterations 0
DILUPBiCG:  Solving for h, Initial residual = 3.35094034737e-06, Final residual = 2.93432135474e-18, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.997921524511, Final residual = 0.00514407773528, No Iterations 3
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 1.62324329599e-14, global = 2.43019772121e-17, cumulative = 2.43019772121e-17
PIMPLE: iteration 2
DILUPBiCG:  Solving for Ux, Initial residual = 8.49053274605e-06, Final residual = 1.56889161256e-18, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 9.2706169794e-06, Final residual = 1.7128784731e-18, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 2.42439406856e-06, Final residual = 6.15472389836e-19, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 9.4741734031e-05, Final residual = 4.43794077117e-17, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.19770073244, Final residual = 0.00135321069298, No Iterations 3
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 7.92499613563e-15, global = -2.83812616391e-17, cumulative = -4.07928442704e-18
PIMPLE: iteration 3
DILUPBiCG:  Solving for Ux, Initial residual = 5.83420314596e-06, Final residual = 9.42862909442e-19, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 6.40245339442e-06, Final residual = 1.01498615559e-18, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 1.25166849944e-06, Final residual = 2.97094658592e-19, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.999998344609, Final residual = 1.3555675042e-14, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.999975236161, Final residual = 9.72118583228e-07, No Iterations 53
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 9.88922463867e-14, global = -5.09467127861e-15, cumulative = -5.09875056304e-15
ExecutionTime = 55.77 s  ClockTime = 56 s

Courant Number mean: 8.77396468445e-05 max: 0.116223720973
deltaT = 5.162455599e-08
Time = 1.71625e-07

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
PIMPLE: iteration 1
DILUPBiCG:  Solving for Ux, Initial residual = 0.157070886327, Final residual = 5.76405070912e-06, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.150534403994, Final residual = 6.62063104725e-06, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.0099884610888, Final residual = 9.50614332261e-07, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.999999999998, Final residual = 1.22959247587e-07, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.999999956955, Final residual = 0.00978329204882, No Iterations 132
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = -0.00980931633566, global = 1.15347141494e-05, cumulative = 1.15347141443e-05
PIMPLE: iteration 2
DILUPBiCG:  Solving for Ux, Initial residual = 0.999932390446, Final residual = 0.0990621421236, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.999999756929, Final residual = 0.0923265680759, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.998134013837, Final residual = 0.046339171224, No Iterations 3
DILUPBiCG:  Solving for h, Initial residual = 1, Final residual = 0.0804871336416, No Iterations 25


--> FOAM FATAL ERROR:
Maximum number of iterations exceeded

    From function thermo<Thermo, Type>::T(scalar f, scalar T0, scalar (thermo<Thermo, Type>::*F)(const scalar) const, scalar (thermo<Thermo, Type>::*dFdT)(const scalar) const, scalar (thermo<Thermo, Type>::*limit)(const scalar) const) const
    in file /home/shorty/OpenFOAM/OpenFOAM-2.2.x/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 76.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libOpenFOAM.so"
#1  Foam::error::abort() in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libOpenFOAM.so"
#2  Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie, 8>, 8>, Foam::sensibleEnthalpy>::T(double, double, double, double (Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie, 8>, 8>, Foam::sensibleEnthalpy>::*)(double, double) const, double (Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie, 8>, 8>, Foam::sensibleEnthalpy>::*)(double, double) const, double (Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie, 8>, 8>, Foam::sensibleEnthalpy>::*)(double) const) const in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libfluidThermophysicalModels.so"
#3  Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::polynomialTransport<Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie, 8>, 8>, Foam::sensibleEnthalpy>, 8> > >::calculate() in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libfluidThermophysicalModels.so"
#4  Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::polynomialTransport<Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie, 8>, 8>, Foam::sensibleEnthalpy>, 8> > >::correct() in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libfluidThermophysicalModels.so"
#5 
 in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/bin/buoyantPimpleFoam"
#6  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7 
 in "/home/shorty/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/bin/buoyantPimpleFoam"
Abgebrochen (Speicherabzug geschrieben)



Tobi November 7, 2013 11:23

Hi Joachim,

I know that the PIMPLE solver is a combination of PISO + SIMPLE. But your hint makes sence.

To your suggestion to have a look at the tutorials.
In the incompressible solver there are given the relaxation factors but always no underrelaxation. The factors always set to 1. In all other tutorials (used PIMPLE) its the same.

But as I said befor your hint makes sence to make nOuterCorrectors = 20 or bigger to resolve the underrelaxation.


I will give it a try.

Tobi November 7, 2013 11:35

Hi all,

there is something strange in my simulation.
After changing the fvSolution with underrelaxation and using nOuterCorrections you can see that p_rgh is divergating:

Code:

Starting time loop

Courant Number mean: 6.92740348560543e-07 max: 0.000485035005140737
deltaT = 1.1999904000768e-05
Time = 1.1999904000768e-05

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
PIMPLE: iteration 1
DILUPBiCG:  Solving for Ux, Initial residual = 0.000227906917869276, Final residual = 8.00197958041733e-15, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.000242870336814764, Final residual = 5.81998985128184e-15, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.0478932507424256, Final residual = 1.49170377519507e-12, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 2.84115059167819e-06, Final residual = 3.20991914926062e-15, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.498391513070369, Final residual = 0.0048072398384564, No Iterations 15
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 4.71166386208481e-11, global = -3.72967327420773e-13, cumulative = -3.72967327420773e-13
PIMPLE: iteration 2
DILUPBiCG:  Solving for Ux, Initial residual = 0.00297239339105636, Final residual = 8.87766177859976e-13, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.00322895267974367, Final residual = 7.2022976930579e-13, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.000379378167045237, Final residual = 1.64098927658491e-13, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.00583615033699652, Final residual = 5.04571824401549e-12, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.683706329213839, Final residual = 0.00636112847281219, No Iterations 3
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 4.35850102227062e-11, global = -1.00955438062397e-11, cumulative = -1.04685111336604e-11
PIMPLE: iteration 3
DILUPBiCG:  Solving for Ux, Initial residual = 0.00120007723564343, Final residual = 1.41567527398776e-13, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.00126819150460156, Final residual = 8.52119948782395e-14, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.000132513009886713, Final residual = 1.20612194921868e-13, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.999999998726388, Final residual = 1.07128788541726e-11, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.912844010131718, Final residual = 0.00372321844237935, No Iterations 25
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 1.56611538047759e-10, global = 6.42629601365956e-12, cumulative = -4.04221512000088e-12
PIMPLE: iteration 4
DILUPBiCG:  Solving for Ux, Initial residual = 0.20194298245027, Final residual = 2.76331484073829e-06, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.202183852081353, Final residual = 3.09369505797864e-06, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.011558443777556, Final residual = 2.1117721551109e-07, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.999999988990808, Final residual = 2.34718589851968e-08, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.998398747386878, Final residual = 0.00508283293858129, No Iterations 22
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0.000223240394694745, global = 1.23595272869451e-05, cumulative = 1.235952324473e-05
PIMPLE: iteration 5
DILUPBiCG:  Solving for Ux, Initial residual = 0.471230394911473, Final residual = 0.025384850908797, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.473116888057838, Final residual = 0.0265424633310726, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.00122668676570402, Final residual = 0.000118580949836749, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.999995067819933, Final residual = 0.0405102898366022, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.989682031159005, Final residual = 408.300070365686, No Iterations 1000
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = -1057.20006941247, global = -1.28054489666432, cumulative = -1.28053253714107
PIMPLE: iteration 6
DILUPBiCG:  Solving for Ux, Initial residual = 0.381749758427118, Final residual = 0.0226744526047933, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.388689320231996, Final residual = 0.0258482539592854, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.0150666652678197, Final residual = 9.55394848855047e-05, No Iterations 2
DILUPBiCG:  Solving for h, Initial residual = 0.999999999998639, Final residual = 0.0746556981472783, No Iterations 1


--> FOAM FATAL ERROR:
Maximum number of iterations exceeded


Tobi November 7, 2013 11:50

If someone what to have a look at the case you can download it here:

www.holzmann-cfd.de/upload/case_schichtspeicher.tar.gz


Regards Tobi

jherb November 7, 2013 12:47

Add the following line to your thermophysicalProperties:
Code:

dpdt no;
see: http://www.openfoam.org/version2.2.0/thermophysical.php
Quote:

Pressure-work in Enthalpy Equations

Under certain conditions it is preferable to solve for enthalpy but without including the pressure-work term (dpdt), e.g. when solving steady-state gaseous flow. An optional dpdt switch is available in the thermophysicalProperties file that will deactivate the pressure-work term if set to no; by default, it is set to yes.
dpdt no;

Example vertical channel -
$FOAM_TUTORIALS/lagrangian/LTSReactingParcelFoam/verticalChannel
Then your case is running (with the "vanilla" buoyantPimpleFoam solver). Here is my fvSolution file which I also changed (nNonOrthogonalCorrectors, the values of the relaxationFactors) but which might also run with your settings:

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.2.2                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    "rho.*"
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance      1e-6;
        relTol          0;
    }

    p_rgh
    {
        solver          GAMG;
    tolerance    1e-06;
    relTol        0.01;
   
        smoother    GaussSeidel;
    cacheAgglomeration true;
    nCellsInCoarsestLevel 10;
    agglomerator faceAreaPair;
    mergeLevels    1;
    }

    p_rghFinal
    {
        $p_rgh;
        relTol          0;
    }

    "(U|h|e|k|epsilon|R)"
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance      1e-6;
        relTol          0.1;
    }

    "(U|h|e|k|epsilon|R)Final"
    {
        $U;
        relTol          0;
    }
}

PIMPLE
{
    momentumPredictor yes;
    nOuterCorrectors 20;
    nCorrectors    1;
    nNonOrthogonalCorrectors 2;

}
relaxationFactors
{
    fields
    {
        rho            0.2;
        "p_rgh*"          0.2;
    }
    equations
    {
        "(h|e)*"        0.2;
        "T*"              0.2;
        "U*"              0.2;
        "(k|omega)" 0.2;
    }
}
// ************************************************************************* //

Quote:

Originally Posted by Tobi (Post 461042)
If someone what to have a look at the case you can download it here:

www.holzmann-cfd.de/upload/case_schichtspeicher.tar.gz


Regards Tobi


Tobi November 7, 2013 13:21

Hi Joachim,


thanks for having a look at the case.
Its working ? On my computer its not working :(

I changed the fvSolution to yours and added the additionally line in the thermodynamics to switch the pressure-work off.

I did not pass the first iteration
Code:

Starting time loop

Courant Number mean: 6.92740348560565e-07 max: 0.000485035005140737
deltaT = 1.1999904000768e-05
Time = 1.1999904000768e-05

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
PIMPLE: iteration 1
DILUPBiCG:  Solving for Ux, Initial residual = 8.42413507755248e-05, Final residual = 3.54729103609964e-13, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 9.21378139634789e-05, Final residual = 1.82525530651333e-13, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.0187168161980647, Final residual = 6.06353742754268e-11, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 2.51634465379983e-05, Final residual = 1.56279104603086e-12, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.580699975182104, Final residual = 0.00478720965181613, No Iterations 12
GAMG:  Solving for p_rgh, Initial residual = 0.334415330256829, Final residual = 0.00194091937705147, No Iterations 4
GAMG:  Solving for p_rgh, Initial residual = 0.00898117679195753, Final residual = 7.41856296605531e-05, No Iterations 25
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 4.77991013424088e-13, global = 7.57329170739056e-16, cumulative = 7.57329170739056e-16
PIMPLE: iteration 2
DILUPBiCG:  Solving for Ux, Initial residual = 0.000680942944125076, Final residual = 1.76114642617064e-10, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.000790443785879614, Final residual = 2.74873946883088e-11, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.00892150262682482, Final residual = 3.51531774000921e-11, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.000930309879599932, Final residual = 1.85820310760487e-10, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.638129166520357, Final residual = 0.00461673233068237, No Iterations 12
GAMG:  Solving for p_rgh, Initial residual = 0.276067203051502, Final residual = 0.00160361243232873, No Iterations 4
GAMG:  Solving for p_rgh, Initial residual = 0.00626050873130121, Final residual = 5.55945635793244e-05, No Iterations 26
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 4.17070327305022e-13, global = 7.55545489361245e-16, cumulative = 1.5128746601003e-15
PIMPLE: iteration 3
DILUPBiCG:  Solving for Ux, Initial residual = 0.0011395760233973, Final residual = 2.3652677798002e-10, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.00131451841255039, Final residual = 3.5459694893589e-11, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.00211693777561587, Final residual = 5.12024918394817e-11, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.00157011429103543, Final residual = 2.23495757487066e-10, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.582881869836832, Final residual = 0.0047754812909206, No Iterations 11
GAMG:  Solving for p_rgh, Initial residual = 0.187053430058256, Final residual = 0.00122013761404655, No Iterations 4
GAMG:  Solving for p_rgh, Initial residual = 0.00460434224989363, Final residual = 3.04689519445376e-05, No Iterations 25
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 2.26499270303041e-13, global = 7.51819694696299e-16, cumulative = 2.2646943547966e-15
PIMPLE: iteration 4
DILUPBiCG:  Solving for Ux, Initial residual = 0.00134051101572924, Final residual = 2.31123511653502e-10, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.00154057920561374, Final residual = 3.37560804094569e-11, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.00167728822715795, Final residual = 6.05329331640972e-11, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.00386886101388262, Final residual = 7.3395771670127e-10, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.428119251009807, Final residual = 0.00330107855087453, No Iterations 10
GAMG:  Solving for p_rgh, Initial residual = 0.102997075578967, Final residual = 0.000913027858903973, No Iterations 4
GAMG:  Solving for p_rgh, Initial residual = 0.00305980243329896, Final residual = 1.69264833389649e+22, No Iterations 1000
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 4575673.39169354, global = 0.999999960825977, cumulative = 0.999999960825979
PIMPLE: iteration 5
DILUPBiCG:  Solving for Ux, Initial residual = 0.119374031126277, Final residual = 0.00177263203267028, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.100299258671754, Final residual = 0.00143605435012423, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.00310684451551815, Final residual = 7.37944329478499e-05, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 1, Final residual = 0.0751911356351347, No Iterations 15
[1]
[1]
[1] --> FOAM FATAL ERROR:
[1] Maximum number of iterations exceeded
[1]
[1]    From function thermo<Thermo, Type>::T(scalar f, scalar T0, scalar (thermo<Thermo, Type>::*F)(const scalar) const, scalar (thermo<Thermo, Type>::*dFdT)(const scalar) const, scalar (thermo<Thermo, Type>::*limit)(const scalar) const) const
[1]    in file /home/shorty/OpenFOAM/OpenFOAM-2.2.x/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 76.
[1]
FOAM parallel run aborting


I did not change the standard OpenFOAM solver!

jherb November 7, 2013 14:51

The only other change I made was that I run the case on 6 processors in parallel (as specified in your decompseParDict). Here are all changes:
Code:

diff -uBbwr case_schichtspeicher/constant/thermophysicalProperties case_schichtspeicher_new/constant/thermophysicalProperties
--- case_schichtspeicher/constant/thermophysicalProperties      2013-11-07 17:35:53.000000000 +0100
+++ case_schichtspeicher_new/constant/thermophysicalProperties  2013-11-07 18:38:24.942474560 +0100
@@ -26,6 +26,8 @@
    energy          sensibleEnthalpy;
 }

+dpdt off;
+
 mixture
 {
    specie
Only in case_schichtspeicher_new: log
diff -uBbwr case_schichtspeicher/system/controlDict case_schichtspeicher_new/system/controlDict
--- case_schichtspeicher/system/controlDict    2013-11-07 17:35:52.000000000 +0100
+++ case_schichtspeicher_new/system/controlDict 2013-11-07 20:37:36.257611022 +0100
@@ -27,9 +27,9 @@

 deltaT          0.00001;

-writeControl    adjustableRunTime;
+writeControl    timeStep;

-writeInterval  0.5;
+writeInterval  1;

 purgeWrite      0;

diff -uBbwr case_schichtspeicher/system/fvSolution case_schichtspeicher_new/system/fvSolution
--- case_schichtspeicher/system/fvSolution      2013-11-07 17:35:52.000000000 +0100
+++ case_schichtspeicher_new/system/fvSolution  2013-11-07 18:32:27.697339449 +0100
@@ -64,22 +64,22 @@
    momentumPredictor yes;
    nOuterCorrectors 20;
    nCorrectors    1;
-    nNonOrthogonalCorrectors 0;
+    nNonOrthogonalCorrectors 2;

 }
 relaxationFactors
 {
    fields
    {
-        rho            0.5;
-        "p_rgh*"          0.5;
+        rho            0.2;
+        "p_rgh*"          0.2;
    }
    equations
    {
-        "(h|e)*"        0.5;
-        "T*"              0.5;
-        "U*"              0.5;
-        "(k|omega)" 0.5;
+        "(h|e)*"        0.2;
+        "T*"              0.2;
+        "U*"              0.2;
+        "(k|omega)" 0.2;
    }
 }
 // ************************************************************************* //

I checked again and it also runs as a single process.
My OpenFOAM version is the commit 9f19321c01ca1e30d339b48eef3f70f5534ca7f4 from the 2.2.x branch at github.

And here the log (single process) until I stopped the run with CTRL+C:
Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.2.x                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.2.x-221db2718bbb
Exec  : buoyantPimpleFoam
Date  : Nov 07 2013
Time  : 20:29:13
Host  : "lincl-gar99"
PID    : 7556
Case  : /fsgarwork/hej/OpenFOAM/hej-2.2.x/run/case_schichtspeicher_new
nProcs : 1
sigFpe : Floating point exception trapping - not supported on this platform
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


Reading g
Reading thermophysical properties

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

Reading field U

Reading/calculating face flux field phi

Creating turbulence model

Selecting turbulence model type RASModel
Selecting RAS turbulence model laminar
Calculating field g.h

Reading field p_rgh

Creating field dpdt

Creating field kinetic energy K

No finite volume options present

Radiation model not active: radiationProperties not found
Selecting radiationModel none
Courant Number mean: 6.92740348560595e-07 max: 0.000485035005140766

PIMPLE: no residual control data found. Calculations will employ 20 corrector loops


Starting time loop

Courant Number mean: 6.92740348560595e-07 max: 0.000485035005140766
deltaT = 1.1999904000768e-05
Time = 1.1999904000768e-05

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
PIMPLE: iteration 1
DILUPBiCG:  Solving for Ux, Initial residual = 9.1163630481814e-05, Final residual = 5.1193175231975e-16, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 9.71490848695474e-05, Final residual = 3.72481419404164e-16, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.0187538865453022, Final residual = 9.35541487983718e-14, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 1.76831741796161e-05, Final residual = 2.67228746299042e-15, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.642251839912398, Final residual = 0.00606170016183952, No Iterations 12
GAMG:  Solving for p_rgh, Initial residual = 0.263340985713119, Final residual = 0.00128423498480519, No Iterations 5
GAMG:  Solving for p_rgh, Initial residual = 0.0094694014915167, Final residual = 9.38713762319944e-05, No Iterations 10
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 7.35784709563305e-13, global = -1.85799499346502e-14, cumulative = -1.85799499346502e-14
PIMPLE: iteration 2
DILUPBiCG:  Solving for Ux, Initial residual = 0.000686775855395583, Final residual = 7.14396564266084e-15, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.000794366042970502, Final residual = 7.67124530401523e-15, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.00895359057081986, Final residual = 3.06238604879054e-14, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.000858241068750189, Final residual = 2.21595842009871e-13, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.684628929599244, Final residual = 0.00600288778007521, No Iterations 12
GAMG:  Solving for p_rgh, Initial residual = 0.221360640023605, Final residual = 0.00215099578466949, No Iterations 2
GAMG:  Solving for p_rgh, Initial residual = 0.00588179229227761, Final residual = 4.38185421689043e-05, No Iterations 10
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 4.07269703829333e-13, global = -2.36291161416501e-14, cumulative = -4.22090660763003e-14
PIMPLE: iteration 3
DILUPBiCG:  Solving for Ux, Initial residual = 0.00113985058441466, Final residual = 3.39453599622536e-14, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.00131143105708394, Final residual = 2.83695907589603e-14, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.00213051004644595, Final residual = 4.87634302488784e-14, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.00131987080423691, Final residual = 2.07612675430487e-12, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.619999889569158, Final residual = 0.00601747915483503, No Iterations 11
GAMG:  Solving for p_rgh, Initial residual = 0.158771748997878, Final residual = 0.00151027382652094, No Iterations 5
GAMG:  Solving for p_rgh, Initial residual = 0.00554752021932156, Final residual = 4.77057661398407e-05, No Iterations 8
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 4.04720483404779e-13, global = -2.17775905294083e-14, cumulative = -6.39866566057086e-14
PIMPLE: iteration 4
DILUPBiCG:  Solving for Ux, Initial residual = 0.00134457549675224, Final residual = 5.15202105577183e-14, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.00154116265898411, Final residual = 4.27055662165159e-14, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.00168344966711099, Final residual = 4.73616888210978e-14, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.0030725107370483, Final residual = 6.84440257652529e-13, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.463912159501019, Final residual = 0.00412087485939903, No Iterations 9
GAMG:  Solving for p_rgh, Initial residual = 0.095802803028836, Final residual = 0.000450164304916792, No Iterations 6
GAMG:  Solving for p_rgh, Initial residual = 0.00379183328240838, Final residual = 3.20874453068772e-05, No Iterations 14
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 2.33338002294485e-13, global = -7.05884179281619e-15, cumulative = -7.10454983985248e-14
PIMPLE: iteration 5
DILUPBiCG:  Solving for Ux, Initial residual = 0.00132358885145769, Final residual = 5.02572591500388e-14, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.00151469150052342, Final residual = 4.27040369829544e-14, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.00309141934215543, Final residual = 4.73606704650387e-14, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.00423053333647794, Final residual = 5.31883164969322e-13, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.31553478013289, Final residual = 0.00242434318098542, No Iterations 8
GAMG:  Solving for p_rgh, Initial residual = 0.0375850916881401, Final residual = 0.000280647329191612, No Iterations 6
GAMG:  Solving for p_rgh, Initial residual = 0.0024286729121287, Final residual = 2.36607945170241e-05, No Iterations 7
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 1.40641933350117e-13, global = -6.71637389855192e-15, cumulative = -7.77618722970767e-14
PIMPLE: iteration 6
DILUPBiCG:  Solving for Ux, Initial residual = 0.00114933316427106, Final residual = 3.52188561423197e-14, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.00131541601380186, Final residual = 3.10533766890295e-14, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.00302926592587962, Final residual = 1.82377683537736e-14, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.00457292206305569, Final residual = 4.9050421883915e-13, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.207251334185455, Final residual = 0.00140326652548671, No Iterations 8
GAMG:  Solving for p_rgh, Initial residual = 0.0150022362729806, Final residual = 0.000107645936085827, No Iterations 6
GAMG:  Solving for p_rgh, Initial residual = 0.00162956850473228, Final residual = 9.01740404987871e-06, No Iterations 6
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 4.48392766489955e-14, global = -1.26739448691108e-15, cumulative = -7.90292667839878e-14
PIMPLE: iteration 7
DILUPBiCG:  Solving for Ux, Initial residual = 0.000903791946432484, Final residual = 1.68167675426977e-14, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.00103572270814686, Final residual = 1.55461471360026e-14, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.00227116122272187, Final residual = 6.36529643342747e-14, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.00431659166765035, Final residual = 6.52883734499076e-13, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.155353314726842, Final residual = 0.0012535018150181, No Iterations 10
GAMG:  Solving for p_rgh, Initial residual = 0.0393566739412764, Final residual = 0.00021399861689955, No Iterations 6
GAMG:  Solving for p_rgh, Initial residual = 0.00204648560880461, Final residual = 1.69133035163225e-05, No Iterations 7
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 7.28222153789903e-14, global = 4.14777380999866e-15, cumulative = -7.48814929739891e-14
PIMPLE: iteration 8
DILUPBiCG:  Solving for Ux, Initial residual = 0.000656461251872167, Final residual = 4.68091222293737e-15, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.000753363951284882, Final residual = 4.56550326819808e-15, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.00135864839506408, Final residual = 7.11696732449413e-14, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.00372942778773862, Final residual = 6.89130623295454e-13, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.180962310789521, Final residual = 0.00160395784679058, No Iterations 10
GAMG:  Solving for p_rgh, Initial residual = 0.0476639702954349, Final residual = 0.000236999978140721, No Iterations 7
GAMG:  Solving for p_rgh, Initial residual = 0.00250092661516854, Final residual = 1.80658102856342e-05, No Iterations 8
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 6.81750621896981e-14, global = 2.06687052300283e-15, cumulative = -7.28146224509863e-14

...

PIMPLE: iteration 20
DILUPBiCG:  Solving for Ux, Initial residual = 8.45302689107386e-05, Final residual = 2.55448166154299e-13, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 8.91296100181636e-05, Final residual = 1.53097949219376e-13, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 1.30213145200845e-05, Final residual = 4.61166001820522e-14, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.000412508974183904, Final residual = 2.36980416126873e-11, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.919292093709393, Final residual = 0.0046168991139576, No Iterations 3
GAMG:  Solving for p_rgh, Initial residual = 0.0982067389495213, Final residual = 0.000599694904119355, No Iterations 8
GAMG:  Solving for p_rgh, Initial residual = 0.0185352617464535, Final residual = 5.87076693520767e-07, No Iterations 30
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 2.5545981302749e-15, global = -8.3055810216029e-17, cumulative = -3.18310651239291e-14
ExecutionTime = 935.46 s  ClockTime = 939 s

Courant Number mean: 1.43623019227783e-06 max: 0.0010605794458006
deltaT = 2.4882045429521e-05
Time = 8.92959320643111e-05

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
PIMPLE: iteration 1
DILUPBiCG:  Solving for Ux, Initial residual = 0.000645140198227976, Final residual = 4.88850257396712e-14, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.000725049928641916, Final residual = 4.57045281358977e-14, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.000138206854662912, Final residual = 3.66943814316356e-14, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.00018004401459, Final residual = 7.01266999185591e-13, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.979818275773936, Final residual = 0.00645209010331692, No Iterations 4
GAMG:  Solving for p_rgh, Initial residual = 0.0316252767907005, Final residual = 0.000254600336052926, No Iterations 6


Tobi November 8, 2013 07:38

Hi,

my fault was the entry in the thermodynamics...
Code:

dpdt    no;  // wrong
dpdt    off;  // correct

Thanks for your help!
Regards Tobi

jherb November 8, 2013 07:50

Now I am really confused:
off or no shouldn't matter.

But it should read dpdt not dtdp.

Quote:

Originally Posted by Tobi (Post 461188)
Hi,

my fault was the entry in the thermodynamics...
Code:

dtdp    no;  // wrong
dtdp    off;  // correct

Thanks for your help!
Regards Tobi


Tobi November 8, 2013 08:17

Hi,

that was a mistake I made. I corrected it in the last post.
That "no" "false" "off" should be the same is correct. I made any other strange mistake that I can not say at the moment. Maybe I wrote dtdp instead of dpdt in the thermodynamics ?!


Thanks for your help. Now everything is working.
Regards
Tobi

jherb November 8, 2013 08:29

Output dictionary files into log
 
There is a useful debug switch in the global controlDict:
Code:

InfoSwitches
{
    writePrecision  6;
    writeJobInfo    0;
    writeDictionaries 1;

    // Allow case-supplied C++ code (#codeStream, codedFixedValue)
    allowSystemOperations  0;
}

This global controlDict has to be copied from $WM_PROJECT_DIR/etc/ to $HOME/.OpenFOAM/2.2.x (or what ever version you use). Then make the changed marked in bold font above. All dictionary files willl be printed to STDOUT whenever they are (re)read. This is very useful if you want to know which settings you really used for a simulation.

BernhardS January 10, 2014 08:32

Hi Tobi,

I have a similar application and want to study the degradation of the stratification in the storage tank. I have initialized a temperature profile and want to see how the heat loss and the convective mixing currents at the wall affect the stratification under no-flow conditions. My case works well with buoyantBoussinesqPimpleFoam. Now I want to run it with buoyantPimpleFoam because I want use chtMultiRegion later. The simulation stops after a couple of iterations due to pressure problems.

Could you please summarize your steps?
- Are you using now the solver with the changed createFields.H and have you initialized p or p_rgh?
- What boundary conditions are using for p and p_rgh?
- I have seen that you are using GAMG for the pressure, while this solver works quite good for my incompressible case, it does not work with buoyantPimpleFoam.
- Could you post your fvSolution and fvScheme?

I have also disabled dpdt and use polynomials in the thermophysical properties.

I tried to download your zip file but it is not available anymore.

Thanks and best regards

Bernhard

Tobi January 13, 2014 01:24

Dear Bernhard,

I think in your case it is possible to start with your steady-state solution, arent you?

Can you give me a hint why you have to use buoyantPimpleFoam befor using cht?

How are your Settings of the fvSolution / pimple algorithm and your Relaxation factors?

What about your schemes?

Is is a forced or buoyancy driven flow?

Regards Tobi

BernhardS January 13, 2014 07:52

2 Attachment(s)
It is a buoyancy-driven case, the geometry is a cylinder as wedge with upper, lower and outer wall. There is no inlet or outlet. I use setFields and funkySetFields to initialize a temperature profile so that the upper region is 823 K and the lower 563 K and a transition zone in between (my fluid is molten salt). I use groovyBC for the outer wall to apply a variable gradient. The aim is to investigate the influence of the wall currents caused by the heat loss on the stratification. The result for the incompressible case is looking like that.
Attachment 27918

Attachment 27919

If I switch now to buoyantPimpleFoam and make the necessary changes for the BC's the simulation is not really running (only for some iterations). I am using fixedFluxPressure for p_rgh (for the walls) and calculated for the p. I tried to initialize a hydrostatic pressure for p with funkySetField but it does not help. While I was using a linearUpwind Scheme in the incompressible case for U and T, I have set all div schemes to Gauss upwind for the buoyantPimpleFoam case. I am using further a lowRe turbulence model. Increasing the number of correctors did not really help.

This is my fvSolution file:
Code:

solvers
{
    "rho.*"
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance      1e-6;
        relTol          0;
    }
   
            p_rgh
    {
        solver          GAMG;
        tolerance        1e-8;
        relTol          0.01;

        smoother        DICGaussSeidel;

        cacheAgglomeration true;
        nCellsInCoarsestLevel 10;
        agglomerator    faceAreaPair;
        mergeLevels      1;
    }

    p_rghFinal
    {
        $p_rgh;
        relTol          0;
    }

    "(U|h|e|k|epsilon|R)"
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance      1e-8;
        relTol          0.1;
    }

    "(U|h|e|k|epsilon|R)Final"
    {
        $U;
        relTol          0;
    }
}

PIMPLE
{
    momentumPredictor yes;
    nOuterCorrectors 1;
    nCorrectors    2;
    nNonOrthogonalCorrectors 0;
}

and these are the thermophysical properties
Code:

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


mixture
{

    specie
    {
        nMoles          1;
        molWeight      91.4;
    }
    equationOfState
    {
        rhoCoeffs<8>    ( 2263.7234 -0.636 0 0 0 0 0 0 );
    }
    thermodynamics
    {
        Hf              0;
        Sf              0;
        CpCoeffs<8>    ( 1515 0 0 0 0 0 0 0 );
    }
    transport
    {
        muCoeffs<8>    ( 0.00163 0 0 0 0 0 0 0 );
        kappaCoeffs<8>  ( 0.522  0 0 0 0 0 0 0 );
    }
}

dpdt    off;

So far, to keep it as simple as possible, only the density depends on the temperature.
The fvSchemes are quite simple
Code:

ddtSchemes
{
    default        Euler;
}

gradSchemes
{
    default        Gauss linear;
}

divSchemes
{
    default        none;
    div(phi,U)      Gauss upwind;
    div(phi,K)      Gauss upwind;
    div(phi,h)      Gauss upwind;
    div(phi,k)      Gauss upwind;
    div(phi,epsilon) Gauss upwind;
    div(phi,omega) Gauss upwind;
    div((muEff*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
      default        Gauss linear corrected;
}


interpolationSchemes
{
    default        linear;
}

snGradSchemes
{
    default        corrected;
}

fluxRequired
{
    default        no;
    p_rgh          ;
}

I tried a lot of settings but the pressure blows up everytime.
However, if I change the patch type for the upper boundary (the upper face area of the cylinder) from wall to patch and use an outletInlet BC for U instead of a no-slip condition and a fixedValue or totalPressure for the p_rgh the simulation is running. I dont know if these BCs are suitable to treat the upper boundary as an opening representing a free surface if the storage is not completely full.

While the GAMG solver for the pressure was not working at all for the case with only walls as boundaries, it is faster than the PCG solver with the top patch as opening.

I am using buoyantPimpleFoam to check the required settings before I switch to cht.

I would be thankful for some hints.

Tobi January 13, 2014 15:07

Hi,

1. your controlDict
2. fvSolution - was that all? Did you not use underrelaxation?

Regards Tobi

BernhardS January 14, 2014 07:12

1 Attachment(s)
Hi Tobi,

thats my ControlDict
Code:

libs (
    "libOpenFOAM.so"
    "libcompressibleRASModels.so"
    "libgroovyBC.so"
      );

application    buoyantPimpleFoam;


startFrom      latestTime;

stopAt          endTime;

endTime        28800;

deltaT          0.001;

writeControl    adjustableRunTime;

writeInterval  10;//300;

purgeWrite      0;

writeFormat    ascii;

writePrecision  6;

writeJobInfo    0;

writeDictionaries 1;

writeCompression off;

timeFormat      general;

timePrecision  10;

runTimeModifiable true;

adjustTimeStep  yes;

maxCo          0.1;

maxDeltaT      0.1;

Even adding relaxation factors and increasing the number of correctors does not help
Code:

PIMPLE
{
    momentumPredictor yes;
    nOuterCorrectors 20;
    nCorrectors    3;
    nNonOrthogonalCorrectors 1;
}

relaxationFactors
{
    fields
    {
        rho            0.05;
        p_rgh          0.1;
    }
    equations
    {
        "(h|e)"        0.1;
        T              0.1;
        U              0.1;
        "(k|epsilon)" 0.1;
    }
}

I have the feeling that the p_rgh BCs are not suitable. I am using fixedFluxPressure for all the wall boundaries similar to the hotRoom tutorial. I think I have to change the BC or even the patch type for the top face of the cylinder.

I've attached my case, if you want to have a look, it contains an Allrun script which does more or less everything such as initializing pressure and temperature by funkySetFiels. The parallel configuration uses 4 processors.

Maybe you can have a look.

Thanks

Bernhard

Tobi January 14, 2014 12:51

Hi Bernhard,

1. your mesh is not okay for a rotation 2d case:

Code:

Checking geometry...
    Overall domain bounding box (0 0 -0.0436194) (0.999048 2 0.0436194)
    Mesh (non-empty, non-wedge) directions (1 1 0)
    Mesh (non-empty) directions (1 1 1)
    Wedge front with angle 2.5 degrees
 ***Wedge patch front not planar. Point (0.229781 0 0.0100325) is not in patch plane by 3.97086e-08 meter.

This should be the first point to clear.


2. your pressure gradient is 100000 Pa to 89.4 Pa ? That makes no sence to me :)

3. why do you use a turbulence model :) ?

4. what fluid do you have?

Regards Tobi

BernhardS January 14, 2014 14:49

1 Attachment(s)
Thanks for the hint, I actually thought that I have checked the mesh but I found a little mistake in the blockMeshDict, the z-points for all the arcs were wrong. After the change the mesh passed checkMesh, however, after executing ./Allrun and checking the mesh again I had the same error, so I removed the renumberMesh -overwrite and now it also passes checkMesh after Allrun. Is seems the renumberMesh is mixing something up.
Anyway that is the new mesh file. Attachment 27949
I have initialized p by calculating the hydrostatic pressure with the average density of my fluid (1822 kg m-3). The density is 1740 kg m-3 in the upper region of the storage at 550 °C and 1905 kg m-3 at 290°C in the lower region.
With a storage height of 2 m, I would expect a pressure of approx. 35750 Pa, what is shown in ParaView if I have a look at cell center values, if I switch to interpolated values, the values I have specified for the BCs of p are mixing that up. So I have manually set the values for top (0 Pa) and bottom (35747.64 Pa) and the value for the side wall to 0??? What should be the inital value for the side wall? I probably have to restructure my Allrun script and use $internalField.

My fluid is molten salt, it is a heat transfer fluid and heat storage medium used in solar thermal power plants, withstanding temperatures upto 600 °C.

I have found some literature for water storages at stand-by conditions and there was a good agreement between numerical simulation (with low-Re model) and experimental data. Thats more or less the reason for the turbulence model.

I will check if the changes in p have some effect...


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