CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Simulation of a chimney with heat in open atmosphere (https://www.cfd-online.com/Forums/openfoam-solving/232260-simulation-chimney-heat-open-atmosphere.html)

Simulation of a chimney with heat in open atmosphere

5 Attachment(s)
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; // ************************************************************************* //```

 mAlletto December 8, 2020 06:05

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

1 Attachment(s)
Quote:
 Originally Posted by mAlletto (Post 790070) 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.

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).

Quote:
 Originally Posted by Jurado (Post 790350) 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.

 mAlletto December 16, 2020 12:50

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?

Quote:
 Originally Posted by mAlletto (Post 790848) 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,

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".

 dlahaye December 18, 2020 04:16

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?

 mAlletto December 18, 2020 04:28

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

Quote:
 Originally Posted by dlahaye (Post 791002) 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?