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

Simulation of a chimney with heat in open atmosphere

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

Like Tree2Likes
  • 1 Post By mAlletto
  • 1 Post By Jurado

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 7, 2020, 08:50
Default Simulation of a chimney with heat in open atmosphere
  #1
New Member
 
Jurado
Join Date: Nov 2017
Posts: 22
Rep Power: 5
Jurado is on a distinguished road
Good afternoon,


I am an phd student in machine learning and CFD. I am trying to model a chimney in an neutral open atmosphere with hot areas on top of the chimney. However, I cannot get my head around it and all my trial have unfortunately failed.


I used the buoyantPimpleFoam from openFoam-6 from openFoam.org to try to simulate it. I think the issue reside in the boundary conditions, especially the ones for pressure and p_rgh. I initiate the pressure on the whole domain with a setField using the equation for isotherm atmosphere.


To present more precisely my case, here are some images to present it in the attached files

My simulation domain is a cube, with a face for :

Inlet
Two sides with symmetry
A groud
An outlet
A roof that I have tried as an outlet and symmetry, both failing


Because of the size of this simulation being too big, I have made a simplified case with a rectangular chimney that shows the same issues that I share in the attached files aswell as images of the geometry. there seem to be a problem at some point a vortex start to create itself behind the chimney and then the whole domain start to diverge


Here is also my 0 files:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#include        "include/initialConditions"

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (1 0 0);

boundaryField
{

    // inlet air

     inletAir
    {
        type            atmBoundaryLayerInletVelocity;
        #include        "include/ABLConditionsInlet"
    }

    // symmetry

     symmetryRight
    {
        type            symmetry;
    }

     symmetryLeft
    {
        type            symmetry;
    }

    // solid surface

     wallGround
    {
        type            uniformFixedValue;
        uniformValue    (0 0 0);
        value           uniform (0 0 0);
    }

     chimney
    {
        type            uniformFixedValue;
        uniformValue    (0 0 0);
        value           uniform (0 0 0);
    }

     hot_area
    {
        type            uniformFixedValue;
        uniformValue    (0 0 2);
        value           uniform (0 0 2);
    }

    // outlet

     symmetryRoof
    {
        type            symmetry;
//type                freestreamVelocity;    
//freestreamValue    uniform (3.15251 0 0);
    }

     outletPolAir
    {
        type            freestreamVelocity;
    freestreamValue    uniform (1 0 0);
    }

}


// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    location    "0";
    object      T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 1 0 0 0];

internalField   uniform 293;

boundaryField
{

    // inlet air
    
  inletAir
  {
        type            fixedValue;
    value            uniform 293;
  }

    // symmetry

  symmetryRight
  {
        type            symmetry;
  }

  symmetryLeft
  {
        type            symmetry;
  }

    // solid surface

  wallGround
  {
        type            fixedValue;
    value            uniform 293;
  }

  chimney
  {
          type            zeroGradient;
  }

  hot_area
  {
        type            fixedValue;
    value            uniform 343;
  }

    // outlet

  symmetryRoof
  {

    type        symmetry;
//        type            fixedValue;
//        value            uniform 293;
  }

  outletPolAir
  {
          type            zeroGradient;
  }
}


// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    location    "0";
    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 101325;

boundaryField
{

    // inlet air

    inletAir
    {
        type            zeroGradient;
    }

    // symmetry

    symmetryRight
    {
        type            symmetry;
    }

    symmetryLeft
    {
        type            symmetry;
    }

    // solid surface

    wallGround
    {
        type            zeroGradient;
    }
     chimney
    {
        type            zeroGradient;
    }
     hot_area
    {
        type            zeroGradient;
    }

    // outlet

    symmetryRoof
    {
    type        symmetry;
//      type            fixedValue;
//    value        uniform 101203;    
    }

    outletPolAir
    {
        type            fixedFluxPressure;      
    }

}


// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 101325;

boundaryField
{

    // inlet air

  inletAir
  {
        type            zeroGradient;
  }

    // symmetry

  symmetryRight
  {
      type              symmetry;
  }

  symmetryLeft
  {
      type              symmetry;
  }

    // solid surface

  wallGround
  {
        type            zeroGradient;
  }
  hot_area
  {
        type            zeroGradient;
  }
  chimney
  {
        type            zeroGradient;
  }


    // outlet

  outletPolAir
  {
      type        calculated;
      value        101325;
  }

  symmetryRoof
  {
    type        symmetry;
//      type        calculated;
//      value        95696.491;
  }

}

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

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

internalField   uniform 0;

boundaryField
{
    #include "include/ABLConditionsDomain"

    // symmetry

     symmetryRight
    {
        type            symmetry;
    }
     symmetryLeft
    {
        type            symmetry;
    }
     symmetryRoof
    {
        type            symmetry;
    }
    // solid surface

     wallGround
    {
        type            nutkAtmRoughWallFunction;
        z0              $z0Ground;
        value           uniform 0.0;
    }

     chimney
    {
        type            nutkWallFunction;
        value           uniform 0;
    }

     hot_area
    {
        type            nutkWallFunction;
        value           uniform 0;
    }

    // inlet and outlet

    ".*"
    {
        type            calculated;
        value           uniform 0;
    }
}


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

#include        "include/initialConditions"

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

internalField   uniform $turbulentKE;

boundaryField
{

    // inlet air

    inletAir
    {
        type            atmBoundaryLayerInletK;
        #include        "include/ABLConditionsInlet"
    }

    // symmetry

     symmetryRight
    {
        type            symmetry;
    }

     symmetryLeft
    {
        type            symmetry;
    }
     symmetryRoof
    {
        type            symmetry;
    }

    // solid surface

     wallGround
    {
        type            kqRWallFunction;
        value           uniform 0.0;
    }

     chimney
    {
        type            kqRWallFunction;
        value           $internalField;
    }

     hot_area
    {
        type            kqRWallFunction;
        value           $internalField;
    }

    // outlet

    ".*"
    {
        type            inletOutlet;
        inletValue      uniform $turbulentKE;
        value           $internalField;
    }
}

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

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

#include        "include/initialConditions"

internalField   uniform $turbulentEpsilon;

boundaryField
{

    // inlet air

    inletAir
    {
        type            atmBoundaryLayerInletEpsilon;
        #include        "include/ABLConditionsInlet"
    }

    // symmetry

    symmetryRight
    {
        type            symmetry;
    }
    symmetryLeft
    {
        type            symmetry;
    }
     symmetryRoof
    {
        type            symmetry;
    }

    // solid surface

    wallGround
    {
        type            epsilonWallFunction;
        Cmu             0.09;
        kappa           0.4;
        E               9.8;
        value           $internalField;
    }

     chimney
    {
        type            epsilonWallFunction;
        value           $internalField;
    }

     hot_area
    {
        type            epsilonWallFunction;
        value           $internalField;
    }

    // outlet

    ".*"
    {
        type            inletOutlet;
        inletValue      uniform $turbulentEpsilon;
        value           $internalField;
    }
}


// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    location    "0";
    object      alphat;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [1 -1 -1 0 0 0 0];

internalField   uniform 0;

boundaryField
{

    // inlet air

  inletAir
  {
    type            calculated;
    value           uniform 0;
  }

    // symmetry

  symmetryRight
  {
    type                symmetry;
  }

  symmetryLeft
  {
    type                symmetry;
  }
    // solid surface

  wallGround
  {
    type               compressible::alphatWallFunction;
    value              uniform 0;
  }

  chimney
  {
    type               compressible::alphatWallFunction;
    value              uniform 0;
  }

  hot_area
  {
    type               compressible::alphatWallFunction;
    value              uniform 0;
  }

    // outlet

  symmetryRoof
  {
    type         symmetry;
//    type           calculated;
//    value          uniform 0;
  }

  outletPolAir
  {
    type           calculated;
    value          uniform 0;
  }

}


// ************************************************************************* //
For the includes:



Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/

flowVelocity         (1 0 0);
pressure             0;
turbulentKE          1.3602E-01;
turbulentEpsilon     9.3257E-04;

// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/

Uref                 3.15251;
Zref                 300;
zDir                 (0 0 1);
flowDir              (1 0 0);
z0                   0.5;
zGround              0;
value                $internalField;

// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/

z0Ground                   uniform 0.1;
z0Block                    uniform 0.01;

// ************************************************************************* //
Attached Images
File Type: jpg result_800s.jpg (77.0 KB, 24 views)
File Type: png result_300s.png (106.3 KB, 20 views)
File Type: png chimney_simplified_case.png (57.0 KB, 17 views)
File Type: png chimney_area.png (17.5 KB, 17 views)
Attached Files
File Type: gz chimney_rectangular_simplified_case.tar.gz (41.9 KB, 3 views)
Jurado is offline   Reply With Quote

Old   December 8, 2020, 05:05
Default
  #2
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 519
Rep Power: 10
mAlletto is on a distinguished road
can you include an Allrun and Allclean script in your tar file? so it is easier for other people to know what you've done
mAlletto is offline   Reply With Quote

Old   December 8, 2020, 12:48
Default
  #3
New Member
 
Jurado
Join Date: Nov 2017
Posts: 22
Rep Power: 5
Jurado is on a distinguished road
Quote:
Originally Posted by mAlletto View Post
can you include an Allrun and Allclean script in your tar file? so it is easier for other people to know what you've done

Hi mAlleto,


Thank you for your replay. I added in this message the files with two allrun, one all run to make the mesh and the other allrun to run the computation on 10 cores. I also suppressed a file that were in constant and blocking computation.


It runs on openfoam6.
Attached Files
File Type: gz chimney_rectangular_simplified_case.tar.gz (51.5 KB, 4 views)
Jurado is offline   Reply With Quote

Old   December 11, 2020, 06:08
Default
  #4
New Member
 
Jurado
Join Date: Nov 2017
Posts: 22
Rep Power: 5
Jurado is on a distinguished road
I have tested a fixed inlet with a speed of 2.3 m/s and another of 1 m/s. Both end up failing with the 1m/s needing way more time to diverge (around 600s for the 1m/s vs 100s for the 2.3 m/s).
Jurado is offline   Reply With Quote

Old   December 16, 2020, 07:49
Default
  #5
New Member
 
Jurado
Join Date: Nov 2017
Posts: 22
Rep Power: 5
Jurado is on a distinguished road
Quote:
Originally Posted by Jurado View Post
I have tested a fixed inlet with a speed of 2.3 m/s and another of 1 m/s. Both end up failing with the 1m/s needing way more time to diverge (around 600s for the 1m/s vs 100s for the 2.3 m/s).

I tried to increase the number of loop and to reduce the dt by lowering the CFL to 0.1 but still strange results.
Jurado is offline   Reply With Quote

Old   December 16, 2020, 11:50
Default
  #6
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 519
Rep Power: 10
mAlletto is on a distinguished road
What OF version are you using. I tried to run it with OF2006 but it failed.





Why did you specify a free stream value of (1 0 0)?



Code:

     outletPolAir
    {
        type            freestreamVelocity;
        freestreamValue uniform (1 0 0);
    }



Code:

    outletPolAir
    {
        type            fixedFluxPressure;
    }

What I see for the pressure boundary condition that you spesify all gradiends (fixedFluxPressure is kind of a specified gradient) did you try to specify a constant value at the outlet?
mAlletto is offline   Reply With Quote

Old   December 17, 2020, 11:19
Default
  #7
New Member
 
Jurado
Join Date: Nov 2017
Posts: 22
Rep Power: 5
Jurado is on a distinguished road
Quote:
Originally Posted by mAlletto View Post
What OF version are you using. I tried to run it with OF2006 but it failed.





Why did you specify a free stream value of (1 0 0)?



Code:

     outletPolAir
    {
        type            freestreamVelocity;
        freestreamValue uniform (1 0 0);
    }

Code:

    outletPolAir
    {
        type            fixedFluxPressure;
    }
What I see for the pressure boundary condition that you spesify all gradiends (fixedFluxPressure is kind of a specified gradient) did you try to specify a constant value at the outlet?



Hello mAlletto,

Thank you for your reply.


It is strange that it does not work for you, the version with the allrun works perfectly on my PC, probably an issue with openFoam version. The version I use is openfoam 6 from openfoam.org.


I tried several condition for the output pressure like uniformHydrostaticPressure, calculated, totalPressure, freeStreamPressure but none worked. fixedFluxPressure seemed to be the one giving the "best result".
Jurado is offline   Reply With Quote

Old   December 18, 2020, 03:16
Default
  #8
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 329
Blog Entries: 1
Rep Power: 10
dlahaye is on a distinguished road
How does your case differ from the tutorial ./heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom ?

Can you set up a 2D version allowing more comfortable test run in an initial stage of the project?

Does simpleFoam run on your 2D case?
dlahaye is offline   Reply With Quote

Old   December 18, 2020, 03:28
Default
  #9
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 519
Rep Power: 10
mAlletto is on a distinguished road
I saw you had a wall function for espilon at you inlet of the hot air. For k the same.



I suggest you to do the following:




1) Make a 2D flat plate case where you apply youre B.C at the inlet, outlet and symmetry to test if you setup works in this case. If not, than you have something fundamentally wrong.


2) Make a 2D flat plate case with a patch at bottom where you introduce the hot air


3) Make a 2D case with a chimney


4) Now you can go to 3D


Increasing the complexity of your problem step by step helps you to understand the problem better and reduces the amount of errors you make. Furthermore you find errors more quickly. From my experience you get to your final result a lot faster since you avoid time consuming error search and waiting for the simulation to end.



By the way, you do not need a transient solver. Your problem is steady and you can use a steady state solver.


To test your setup use a very small mesh where the simulation runs through in a few seconds/minutes. This speeds up your search for the error a lot. It should run on one cpu not on 10...



Best


Michael
dlahaye likes this.
mAlletto is offline   Reply With Quote

Old   December 18, 2020, 07:35
Default
  #10
New Member
 
Jurado
Join Date: Nov 2017
Posts: 22
Rep Power: 5
Jurado is on a distinguished road
Quote:
Originally Posted by dlahaye View Post
How does your case differ from the tutorial ./heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom ?

Can you set up a 2D version allowing more comfortable test run in an initial stage of the project?

Does simpleFoam run on your 2D case?



Thanks both for the reply



My first trial was with this case boundary condition and it worked when the roof is not high. When the roof start reaching the hundred of meters the issue start appearing. My guess is that when the height is small the difference in pressure between the roof and ground is small. However when we start reaching high heights it is not longer the case and it makes the computation fail.


I will set up a 2D version as mAlleto said to ease the trials. I will come back to post it once I am done.
dlahaye likes this.
Jurado is offline   Reply With Quote

Reply

Tags
aerolics, chimney, neutral condition, open atmosphere, thermal

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
Some questions about flow boiling simulation in Fluent beastieboys6 FLUENT 8 November 20, 2017 23:47
[OpenFOAM.org] Patches to compile OpenFOAM 2.2 on Mac OS X gschaider OpenFOAM Installation 136 October 10, 2017 17:25
[swak4Foam] groovyBC in openFOAM-2.0 for parabolic velocity bc ofslcm OpenFOAM Community Contributions 25 March 6, 2017 10:03
Error - Solar absorber - Solar Thermal Radiation MichaelK CFX 12 September 1, 2016 05:15
SparceImage v1.7.x Issue on MAC OS X rcarmi OpenFOAM Installation 4 August 14, 2014 06:42


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