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

Buoyantboussinesq simpleFoam residuals problem

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 16, 2015, 06:11
Default Buoyantboussinesq simpleFoam residuals problem
  #1
Member
 
Naresh Yathuru
Join Date: Feb 2015
Posts: 66
Rep Power: 9
Naresh yathuru is on a distinguished road
Hi foamers,

I m simulating a room with a inlet and outlet and a rectangular patch called lighting on the ceiling and cube inside the room.
As a first basic simulation I wanted to specify heat flux boundary condition for the patch and temperature to the inlet air and velocity at the inlet pressure at outlet by pressure i mean (p_rhg) as p is calculated at the outlet.

problem:
1. i did a couple of simulation but in both the simulations i get a huge fluctuatioin in the residuals graph. i have attached the picture below.
I m attaching my fvscheme and fvsoluion here :

FV scheme

ddtSchemes
{
default steadyState;
}

gradSchemes
{
default leastSquares; // it was Gauss linear
}

divSchemes
{
default none;
div(phi,U) bounded Gauss linearUpwind grad(U); // was bounded Gauss upwind which is first order but linearupwind is second order
//div(phi,U) bounded Gauss upwind;
div(phi,k) bounded Gauss upwind;
div(phi,T) bounded Gauss linearUpwind grad(T);
//div(phi,T) bounded Gauss upwind;
div(phi,epsilon) bounded Gauss upwind;
div(phi,omega) bounded Gauss upwind;
div(phi,R) bounded Gauss upwind;
div(R) Gauss linear;
div(phi,nuTilda) bounded Gauss upwind;
div((nuEff*dev(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
default Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p_rgh ;
}


// ************************************************** *********************** //
FV solution:
solvers
{
p_rgh
{
solver PCG;
preconditioner DIC;
tolerance 1e-8;
relTol 0.001;
}

"(U|T|k|epsilon|omega|R)"
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-8; // before 1e-05
relTol 0.001;
}
}

SIMPLE
{
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;

/*residualControl
{
p_rgh 1e-2;
U 1e-4;
T 1e-2;

// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}*/
}

relaxationFactors
{
fields
{
p_rgh 0.3; //before it was 0.7
}
equations
{
U 0.7; // before it was 0.3
T 0.5;
"(k|epsilon|omega|R)" 0.7;
}
}

sorry for the long question.

Additionally i didnot get the correct results for the simulation.

could someone please enlighten me.

thankyou

With Regards,
Naresh Yathuru
Attached Images
File Type: jpg Bildschirmfoto-5.jpg (28.9 KB, 32 views)
Naresh yathuru is offline   Reply With Quote

Old   March 16, 2015, 09:33
Default
  #2
Member
 
Thiago Parente Lima
Join Date: Sep 2011
Location: Diamantina, Brazil.
Posts: 54
Rep Power: 12
thiagopl is on a distinguished road
Hi Naresh Yathuru,

It seems that you didn't achieve convergence for your problem. So instead of posting fvSolutions and fvSchemes, it would be better to post your boundary conditions. I suggest you to use the 1st order upwind scheme for the divergence therms unless you achieve convergence.

You may use [ code] text [ /code] (without spaces) when posting pieces of code.

Regards,
__________________
Fields of interest: Heat transfer; Convection heat transfer; Conjugate heat transfer.
thiagopl is offline   Reply With Quote

Old   March 17, 2015, 03:52
Default
  #3
Member
 
Naresh Yathuru
Join Date: Feb 2015
Posts: 66
Rep Power: 9
Naresh yathuru is on a distinguished road
Thank you so much thiago. I think my alphat,epsillon,k,nu,Omega B.C are fine. could you please have a look at my p, p-rgh, u, T

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    inlet
    {
        type            zeroGradient;
        
    }

    outlet
    {
        type            fixedValue;
        value           uniform 0; //before $internalField;
    }

    sideandfloorwalls
    {
        type            calculated;
        value           $internalField;
    }
    innercube
    {
        type            calculated;
        value           $internalField;
    }
    lightingwall
    {
        type            calculated;
        value           $internalField;
    }
    roof
    {
        type            calculated;// before it was calculated;
        value           $internalField;
    }
}

//
This is my p-rgh

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    inlet
    {
        type            zeroGradient;
        //rho             rhok;
        //value           uniform 0;
    }

    outlet
    {
        type            fixedValue;
        value           uniform 0;
    }

    sideandfloorwalls
    {
        type            fixedFluxPressure;
        rho             rhok;
        value           uniform 0;
    }
    innercube
    {
        type            fixedFluxPressure;
        rho             rhok;
        value           uniform 0;
    }
    lightingwall
    {
        type            fixedFluxPressure;
        rho             rhok;
        value           uniform 0;
    }
    roof
    {
        type            fixedFluxPressure;
        rho             rhok;
        value           uniform 0;
    }
}

// ************************************************************************* //
Code:
version     2.0;
    format      ascii;
    class       volScalarField;
    object      T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 1 0 0 0];

internalField   uniform 293; //17C

boundaryField
{
    inlet
    {
        type            fixedValue;
        value           uniform 293.15; // 20C
    }
    outlet
    {
        type            zeroGradient;
        
    }
    sideandfloorwalls
    {
        type            zeroGradient;
        
    }
    lightingwall
    {
        //type            wallHeatFlux; 
        //heatFlux        uniform -200; 
        // This did not work for incompressible flows. I read somewhere that this B:C does not exist in OF 230
    
        type            turbulentHeatFluxTemperature;
        heatSource      flux;
        q               uniform -200; // w/m^2 // This is just a check . this would generate a surface temperature of -27 C 
        alphaEff        alphaEff;
        value           uniform 273; // place holder
       
    } 
    /*{
        type            fixedValue;
        value           uniform 323.15; // for the time being or flux 100 w/m
    }*/
    innercube
    {
        type            zeroGradient;
        //value           uniform 313.15;
    }
    roof
    {
        type            zeroGradient;
        //value           uniform 291.15;
    }
}

// ************************************************************************* //
U was initialised with potentialFoam:

Code:
dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    inlet
    {
        type            fixedValue;
        value           uniform (1 0 0);
    }

    outlet
    {
        type            zeroGradient;
    }

    sideandfloorwalls
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    innercube
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    lightingwall
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    roof
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
}

// ************************************************************************* //
FYI: yesterday i came to know that TurbulentHeatFluxTemperature boundary condition has a bug from the post of Bruno

http://www.cfd-online.com/Forums/ope...le-case-2.html

I may not be good in programming but i m good in sharing information Thats all i can contribute for OF users.

regards,
Naresh
Naresh yathuru is offline   Reply With Quote

Old   March 17, 2015, 03:56
Default
  #4
Member
 
Naresh Yathuru
Join Date: Feb 2015
Posts: 66
Rep Power: 9
Naresh yathuru is on a distinguished road
By the way i m using OF 230. i dont know if the TurbulentHeatFluxTemperature bug is fixed in OF 231.

Naresh
Naresh yathuru is offline   Reply With Quote

Old   March 17, 2015, 07:07
Default
  #5
Member
 
Thiago Parente Lima
Join Date: Sep 2011
Location: Diamantina, Brazil.
Posts: 54
Rep Power: 12
thiagopl is on a distinguished road
Hi Naresh,

Unfortunately I don't have much to contribute, but I woud suggest you to use the fixedFluxPressure as inlet BC for p_rgh (see here and here) and zeroGredient for oulet BC for p_rgh.

I don't know much about the lightingwall BC, but I suggest you to first try a fixedValue BC and see if the problem converges and then change this BC (a step by step thing )

Regards,
__________________
Fields of interest: Heat transfer; Convection heat transfer; Conjugate heat transfer.
thiagopl is offline   Reply With Quote

Old   March 17, 2015, 10:40
Default
  #6
Member
 
Naresh Yathuru
Join Date: Feb 2015
Posts: 66
Rep Power: 9
Naresh yathuru is on a distinguished road
hi thiago,

Thank for your reply. I have a very crucial question i hope you could help me. I m sorry for asking it in the same thread. I m using buoyantBoussinesqsimple Foam. i m using the turbulentHeatFluxTemperature which is not giving me the reselt i expected (image attached)
1. does the turbulentHeatFluxTemperature really has a bug to be concerned about?
If yes then i really surprised that no one found it out untill now except bruno untill nov 2014.

2. if not could u please check if my boundary conditions are correct.

as u can see from my boundar condition for temperature. the temperature cannot be greater than 293 K.

I m totally confused. where is the problem . is it because of the heatflux b.C or any other boundary condition.

I ran the same simulation in fluent the results are fine.

then i tried to simulate with temperature boundary condition for the lightingwall then every thing was fine.

3. is there another possibility to specify the heat flux B.c?

Thank you in advance,

naresh
Attached Images
File Type: jpg pic.jpg (33.2 KB, 16 views)
File Type: jpg fluent.jpg (18.9 KB, 9 views)
Naresh yathuru is offline   Reply With Quote

Old   March 20, 2015, 14:33
Default
  #7
Member
 
Thiago Parente Lima
Join Date: Sep 2011
Location: Diamantina, Brazil.
Posts: 54
Rep Power: 12
thiagopl is on a distinguished road
Hi Nares,

Answering your questions:

1. I really don't know, but is always better do use the latest versions to avoid problems with bugs already solved.

2. The suggestions I have were that of my last post. I only solved closed problems in OF, so I've never dealt with inlet or oulet BC.

3. You can use the fixedGradient BC to specify a fixed heat flux.

Regards,
__________________
Fields of interest: Heat transfer; Convection heat transfer; Conjugate heat transfer.
thiagopl is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in simpleFoam airFoil2D forceCoeffs junkie71189 OpenFOAM Running, Solving & CFD 31 March 11, 2017 21:56
simplefoam omega convergence problem simplefoam OpenFOAM Running, Solving & CFD 4 August 13, 2013 05:31
SimpleFoam For cavity Problem himanshu28 OpenFOAM 1 January 16, 2013 01:49
Problem with convergence residuals tom.j.87 Siemens 2 August 2, 2011 14:49
Stalling problem with simpleFoam on a NACA0012 Damien OpenFOAM Running, Solving & CFD 1 March 3, 2010 07:46


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