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

Natural convection boundary layer flow

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 22, 2020, 12:40
Default Natural convection boundary layer flow
  #1
Member
 
Alex
Join Date: May 2019
Posts: 36
Rep Power: 6
Sedullo is on a distinguished road
Hello everyone, I would like to simulate the boundary layer flow created by natural convection. My scope is to make a 2D simulation of a vertical hot wall using BuoyantBoussinesqPimplefoam. In my simulation I can never see the boundary layer, all the air in the domain is moving upwards, instead I would like to see only the air in the boundary layer moving upwards, and the rest should be at zero velocity. I attached the case folder in case you want to help me to address which my problem is. I think that the problem could be:

  1. A mistake in the BC, very likely in p_rgh
  2. A mistake in the settings of blockMesh
  3. A mistake in the controlDict settings
  4. Something else

My main issue was to find the right BC for this problem, I litterally tried to guess, because I could not find anything helpful around.
If any of you know how to set the BC for this kind of problem, it would be already a great help.
Attached Files
File Type: zip vertical_wall.zip (172.2 KB, 14 views)
Sedullo is offline   Reply With Quote

Old   June 23, 2020, 04:31
Default
  #2
Member
 
Alex
Join Date: May 2019
Posts: 36
Rep Power: 6
Sedullo is on a distinguished road
Here I post the BC settings, I am quite sure that the problem is here but I do not know where. The shape of the domain is a sort of square, up and down is an open face for output and input, on the left side is also open to simulate the atmosphere, on the center of the right side there is the hot wall, and above and below it there should still be atmosphere.

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

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

internalField   uniform 0;

boundaryField
{
    hotWall
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }

    atmosphere
    {
        type            zeroGradient;   
    }

    inlet
    {
        type            totalPressure;
        p0              uniform 0;      
    }


    outlet
    {
        type            totalPressure;
        p0              uniform 0;     
    }

    //#includeEtc "caseDicts/setConstraintTypes"
}


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

dimensions      [0 0 0 1 0 0 0];

internalField   uniform 300;

boundaryField
{
    hotWall
    {
        type            fixedValue;
        value           uniform 301;
    }
    
    atmosphere
    {
       type            fixedValue;
        value           uniform 300;
    }
     
    inlet
    {
       type            fixedValue;
        value           uniform 300;
    }

    outlet
    { 
        type            fixedValue;
        value           uniform 300;
    }

   // #includeEtc "caseDicts/setConstraintTypes"
}

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

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

internalField   uniform (0 0 0);

boundaryField
{
    hotWall
    {
        type             fixedValue;
        value uniform    (0 0 0);
    }

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

    inlet
    {
        type            zeroGradient;  
    }


    outlet
    {
        type            inletOutlet; 
        value           $internalField;
        inletValue      uniform (0 0 0);
    }



   // #includeEtc "caseDicts/setConstraintTypes"
}

// ************************************************************************* //
Sedullo is offline   Reply With Quote

Old   July 1, 2020, 15:14
Default
  #3
Senior Member
 
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 313
Rep Power: 15
agustinvo is on a distinguished road
Hello Sedullo,


I have a bit of experience running this flow. I need some information
  • Do you have an estimation of your y+ (I see you use kEpsilon, and Jayatilleke WF)? I'd prefer to use a low Re k-epsilon model, or k-w
  • Can you attach some flow field pictures?
  • Is you idea to perform URANS, or move later on to LES/DNS? One of the problems I found during my simulations was caused by the inlet condition you have
  • Reduce the maximum Courant number (it is 2D, the smulation should go fast anyway)
  • Check the numerical schemes
  • The outlet temperature BC should be zeroGradient, otherwise the fluid cannot pass through.
  • I must check my pressure BC
agustinvo is offline   Reply With Quote

Old   July 2, 2020, 09:56
Default
  #4
Member
 
Alex
Join Date: May 2019
Posts: 36
Rep Power: 6
Sedullo is on a distinguished road
Hello agustinvo,

Thenk you very much for the reply. My goal is to run a laminar flow, so I just set "laminar" in the turbulenceProperties and paid attention to keep the Grashof number in the laminar range.
I attached the temperature field and the velocity vectors field. But I see two problems:
  1. In the temperature field, it seems like the hot air cannot pass the outlet, and it remains inside the domain.
  2. In the velocity vectors plot, I see the creation of a sort of circulation in front of the hot wall.

I made some changes in U, T and p_rgh

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;
    object      T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 1 0 0 0];

internalField   uniform 300;

boundaryField
{
    hotWall
    {
        type            fixedValue;
        value           uniform 310;
    }
    
    atmosphere
    {
       type            zeroGradient; 
    }
     
    inlet
    {
        type           fixedValue;
        value           uniform 300;
    }

    outlet
    { 
        type           zeroGradient;
    }

   // #includeEtc "caseDicts/setConstraintTypes"
}

// ************************************************************************* //
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       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform (0 0 0);

boundaryField
{
    hotWall
    {
       type            noSlip;
       
    }

    atmosphere
    {
        type            slip; 
    }
  

    inlet
    {
        type            outletInlet;
	outletValue	uniform (0 0 0);
        value           uniform (0 0 0);
    }


    outlet
    {

	type            inletOutlet;
	inletValue	uniform (0 0 0);
        value           uniform (0 0 0);
    }



   // #includeEtc "caseDicts/setConstraintTypes"
}

// ************************************************************************* //
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;
    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 1e5;

boundaryField
{
    hotWall
    
    
         
        //type              zeroGradient; 
    

       // type            fixedFluxPressure;
       // rho             rhok;
       // value           uniform 0;
   
     {
        type            fixedFluxPressure;
        value           uniform 1e5;
     }

    atmosphere
    {
       type            fixedFluxPressure;
       value           uniform 1e5;
    }


    inlet
    {
       type            fixedFluxPressure;
       value           uniform 1e5;
    }


    outlet
    {
       type              totalPressure;
	p0		uniform 1e5;
	//value           $internalField;

    }


    //#includeEtc "caseDicts/setConstraintTypes"
}

// ************************************************************************* //
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      [0 2 -1 0 0 0 0];

internalField   uniform 0;

boundaryField
{

    inlet
    {
        type calculated;
        value uniform 0;
    }

    outlet
    {
        type calculated;
        value uniform 0;
    }


    atmosphere
    {
        type calculated;
        value uniform 0;
    }

    hotWall
    {
        type            alphatJayatillekeWallFunction;
        Prt             0.85;
        value           $internalField;
    }



    #includeEtc "caseDicts/setConstraintTypes"
}

// ************************************************************************* //
Attached Images
File Type: jpg temperature.jpg (18.4 KB, 48 views)
File Type: jpg vectors.jpg (47.3 KB, 40 views)
Attached Files
File Type: zip vertical_wall_6_copy.zip (8.3 KB, 10 views)
Sedullo is offline   Reply With Quote

Old   July 2, 2020, 13:31
Default
  #5
Senior Member
 
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 313
Rep Power: 15
agustinvo is on a distinguished road
Hi,


there is a recirculation as fluid cannot go out.


Please take a look into this
  • Temperature: set the atmosphere to 300K as well (if you're far enough from the wall all the fluid should be at this T).
  • Velocity: when you set the atmosphere with slip conditions you force the fluid to enter through the bottom and go out through the top. What about the fluid that stays? I'd choose zeroGradient at this stage.
  • Pressure: are you using buoyantBoussinesq...? I used for p_rgh fixedFluxPressure at the wall and atmosphere, and zeroGradient at the outlet. I do not set any value for fixedFluxPressure
  • alphat: if you are running at the laminar mode you should worry about. I would set everywhere zeroGradient except at the wall.
  • What is you y+? Do you use low Reynodls models?
agustinvo is offline   Reply With Quote

Old   July 3, 2020, 09:59
Default
  #6
Member
 
Alex
Join Date: May 2019
Posts: 36
Rep Power: 6
Sedullo is on a distinguished road
Hi,

I took a look to all the points listed but I still have some questions, because the model is not working well yet:
  • I set the velocity BC as zeroGradient for atmosphere, what about inlet and outlet? Are the settings ok?
  • I am using buoyantBoussinesqPimpleFoam but honestly I do not know if the Simple one would be better. I set p_rgh fixedFluxPressure at the wall and atmosphere, and zeroGradient at the outlet, but what about the inlet?¨
  • What setting is good for alphat at the wall considering that my flow is laminar?
  • In the turbulenceProperties I set the simulation type as "laminar", so I am not using any turbulence model, thus I do not know my y+ either. Anyway I am not sure if this choice is correct, probably I should choose a turbulence model even if my flow is laminar.

You told me that you worked on this problem already, can you find your case folder? It would be a big help for me.
Thanks for the help
Sedullo is offline   Reply With Quote

Old   July 3, 2020, 15:27
Default
  #7
Senior Member
 
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 313
Rep Power: 15
agustinvo is on a distinguished road
Hi Sedullo,


here you have an article where I discuss about this topic. My computational domain differs from yours at the leading edge of the plate. I add a volume below the plate to ensure there is flow coming from the bottom. By doing this I sensure the growing of the boundary layer.


In my case I did LES, so I went into unsteady simulations. This is why I asked you about
  • What is the objective of the simulation? What do you want to see?
  • Is enough with a steady simulation, or you need to perform unsteady simulations?
  • The y+ you can check it, independently of using or not any turbulence models (this is a criterion on DNS meshes too)
agustinvo is offline   Reply With Quote

Old   July 8, 2020, 07:46
Default
  #8
Member
 
Alex
Join Date: May 2019
Posts: 36
Rep Power: 6
Sedullo is on a distinguished road
Hi,

Sorry for the late answer, I read your paper and it is really interesting for the purpose of my reasearch. My objective is to simulate the natural convection boundary layer with laminar flow of a flat vertical wall and then plot how the Nusselt number is varying along the wall, afterwards I should build another vertical wall but this time not flat but wavy, and do the same. At the end I will compare the two plots to see which has "better" Nusselt Number.

Honestly I am quite new in CFD and I do not know if a steady or a transient simulation is good for my purpose.

I will work later on the analysis of the Nusselt Number, my first goal is to simulate the boundary layer flow.

Whatever suggestion you have for the setting up of the domain and of the boundary conditions is very very welcome.

My main questions that I could not understand from your paper are:
  • A 2D domain could be enough? because I saw that your domain in the paper was huge, seems millions of cells, and I am afraid it costs so much time to compute.
  • I do not understand yet how to set the boundary condition for Inlet and Outlet for U and p_rgh.
  • Since my goal is to observe this phenomena in laminar flow, do you think is really necessary to set a LES simulation? I am still afraid it costs a lot of time, and if there is a faster way to simulate this phenomena would be better.

Thank you so much for the help
Sedullo is offline   Reply With Quote

Old   July 22, 2020, 15:57
Default
  #9
Member
 
Alex
Join Date: May 2019
Posts: 36
Rep Power: 6
Sedullo is on a distinguished road
Hi agustinvo, honestly my knowledge of OpenFOAM is limited, I am not able to calculcate Nusselt Number as you suggested.

At the moment I used the wallheatflux utility because I thought that in some way I could get Nusselt from there, but I do not know yet how to use this results.

I have a couple of question:
  1. To calculate the nusselt number I need to know the thermal conductivity, where can I read or change this value? I am using buoyanyPimpleFoam and I guess it is somewhere in the thermophysical properties, please help me.
  2. I need to study my problem at different Grashof number, how do you suggest to control this value? I tried first changing the dynamic viscosity in the thermophysical properties, but then I was afraid that this culd affect in some way the thermal conductivity. Then I reduced a lot the length of the wall but in this way the simulation or crashes or give results that do not make sense.

Please let me know what you think
Sedullo is offline   Reply With Quote

Reply


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
Wind turbine simulation Saturn CFX 58 July 3, 2020 01:13
Natural convection boundary layer simulation over a heated vertical plate camel OpenFOAM Running, Solving & CFD 1 May 9, 2017 00:27
BC Natural Convection Boundary Layer dodobenq OpenFOAM Pre-Processing 9 November 6, 2015 03:17
Tracing the boundary layer development over a flat surface in natural convection Arvin FLUENT 5 October 14, 2013 02:18
Natural convection - Inlet boundary condition max91 CFX 1 July 29, 2008 20:28


All times are GMT -4. The time now is 23:04.