CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Buoyancydriven cavity flow (

anita March 12, 2008 11:40

Hi, I try to simulate a buo

I try to simulate a buoyancy-driven cavity flow like the example in "Computational Methods for Fluid Dynamics".
It is a square with adiabatic walls on the upper and lower side, a hot wall on the right side and a cold wall on left side. I define the temperature hot = 293 K, cold = 253 K and default 273 K.

The problem is that after starting the buoyantSimpleFoam solver there is an error.

Does somebody has a suggestion where the problem could be? I used the hotRoom-tutorial as basis.
I only changed turbulence model to laminar. Also with the k-epsilon modell there is the same problem.


Here is the log:

Exec : buoyantSimpleFoam . buoyancydriven32
Date : Mar 12 2008
Time : 16:26:08
Host : st31
PID : 25414
Root : /home/kienzani/OpenFOAM/kienzani-1.4.1/run/ownTests/ExamplesBook
Case : buoyancydriven32
Nprocs : 1
Create time

Create mesh for time = 0

Reading environmentalProperties
Reading thermophysical properties

Selecting thermodynamics package hThermo<puremixture<consttransport<speciethermo<hc onstthermo<perfectgas>>>>>
Reading field U

Reading/calculating face flux field phi

Creating turbulence model

Selecting turbulence model laminar
Calculating field g.h

Creating field pd

Starting time loop

Time = 1

DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 9.69948e-07, No Iterations 5
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 1.36774e-06, No Iterations 5
#0 Foam::error::printStack(Foam: in "/home/kienzani/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/"
#1 Foam::sigFpe::sigFpeHandler(int) in "/home/kienzani/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/"
#2 Uninterpreted: [0xffffe420]
#3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/home/kienzani/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/"
#4 Foam::tmp<foam::geometricfield<double,> > Foam::operator/<foam::fvspatchfield,>(Foam::GeometricField<double ,> const&, Foam::tmp<foam::geometricfield<double,> > const&) in "/home/kienzani/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/buoyantSi mpleFoam"
#5 main in "/home/kienzani/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/buoyantSi mpleFoam"
#6 __libc_start_main in "/lib/"
#7 Foam::regIOobject::readIfModified() in "/home/kienzani/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/buoyantSi mpleFoam"

aksouh_med March 16, 2008 09:54

Hi Anita, I have the same pro
Hi Anita,
I have the same problem, but for my problem is just 3d, and I have some results but I think that it didn't I had the errors message like :

Time = 139

Lookup gradScheme for grad(U)
Lookup divScheme for div((muEff*dev2(grad(U).T())))
Lookup laplacianScheme for laplacian(muEff,U)
Lookup divScheme for div(phi,U)
Lookup gradScheme for grad(rho)
Lookup gradScheme for grad(pd)
DILUPBiCG: Solving for Ux, Initial residual = 0.249057, Final residual = 1.70173e-06, No Iterations 5
DILUPBiCG: Solving for Uy, Initial residual = 0.0185925, Final residual = 4.28971e-06, No Iterations 4
DILUPBiCG: Solving for Uz, Initial residual = 0.104714, Final residual = 1.6076e-06, No Iterations 5
Lookup interpolationScheme for interpolate(rho)
Lookup interpolationScheme for interpolate(p)
Lookup interpolationScheme for interpolate(rho)
Lookup laplacianScheme for laplacian(alphaEff,h)
Lookup divScheme for div(phi,h)
DILUPBiCG: Solving for h, Initial residual = 0.00378344, Final residual = 2.23355e-06, No Iterations 3
Lookup interpolationScheme for interpolate((rho*U))
Lookup snGradScheme for snGrad(rho)
Lookup interpolationScheme for interpolate(((rho*gh)*(1|A(U))))
Lookup laplacianScheme for laplacian((rho*(1|A(U))),pd)
DICPCG: Solving for pd, Initial residual = 0.332361, Final residual = 9.81432e-09, No Iterations 429
Lookup fluxRequired for pd
time step continuity errors : sum local = 8.58238e-08, global = -1.04862e-18, cumulative = 3.09173e-18
Lookup gradScheme for grad(rho)
Lookup gradScheme for grad(pd)
rho max/min : 1.20886 1.20063
ExecutionTime = 11054.2 s ClockTime = 11061 s

Anita try to change yr laminar model to turbulence model, but for low Reynolds number, like "LaunderSharmaKE'

so for me my questions are :
1- I don't know if I should change the interpolation scheme, and if there is the case which the good scheme for my problem?
2- I know that my problem is the heat transfer, so for the density, I have the boussinesq density in order to create flow between the cold and hot wall, but I dont know where can I find the boussinesq equation fo density.

thank you very much for your help.

aksouh_med March 16, 2008 10:14

Sorry, but I forgot to sent y
but I forgot to sent you my fvScheme file :

default steadyState;

default Gauss linear;

default none;
div(phi,U) Gauss upwind;
div(phi,h) Gauss upwind;
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div(phi,R) Gauss upwind;
div(R) Gauss linear;
div((muEff*dev2(grad(U).T()))) Gauss linear;

default none;
laplacian(muEff,U) Gauss linear corrected;
laplacian((rho*(1|A(U))),pd) Gauss linear corrected;
laplacian(alphaEff,h) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
laplacian(DREff,R) Gauss linear corrected;

default linear;

default corrected;

default no;

Thanks for all
Best regards

anita March 26, 2008 11:24

Hi, now the solver is worki

now the solver is working correct. I had initialized pressure with zero. After changing to 10000 calculation worked fine.

The new problem is that residual of U is falling the first 2500 slowly until below 0.001. Than it rises until 0.1. Afterwards it is nearly constant. Pressure residual does not even fall below 0.01.

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