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

BC's and Convergence with buoyantBoussinesqPimpleFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 21, 2019, 17:42
Default BC's and Convergence with buoyantBoussinesqPimpleFoam
  #1
Member
 
Kellis
Join Date: Mar 2017
Posts: 39
Rep Power: 9
Kellis is on a distinguished road
Good afternoon everyone,

As a stepping stone for a more complicated project, I am attempting to simulate a heated flat plate on the ground in open air. The domain includes the heated plate (1m x 1m) at 338K, the surrounding ground (5m x 5m) at ambient temperature, 305K, and then the top and sides, which are combined into one patch. The air should be free to move in and out of the top and sides as necessary; I would expect air to be heated near the plate, begin to rise out of the top of the domain, and come in through the sides to make up for this. I am using the standard kEpsilon turbulence model, but have also tried it with turbulence off with similar results. If it matters, I am using OpenFOAM 6.

The case runs fine, but after a few timesteps, the PIMPLE algorithm no longer converges and runs for the maximum number of outer loops (currently set at 200). I have tried a number of things to fix this issue, including:
  • Tightening the tolerances on the individual solvers for U and p_rgh, down to 1E-12. This doesn't have a noticeable effect.
  • Increasing the nCorrectors from 1 up to 50. Again no noticeable effect.
  • Increasing the relaxation factors as far as possible. The case becomes unstable if they are increased too far.
The PIMPLE residualControl dictionary is set to a tolerance of 1E-06 for each variable. Is this realistically too tight to ever reach consistently?

Another thing I have noticed is that the boundary conditions have an impact on solution convergence. I've included a full sample case below, but here are the BC's for each variable:

alphat:
Code:
boundaryField
{
    "(bottom|heated)"
    {
        type            alphatJayatillekeWallFunction;
        Prt             0.85;
        value           uniform 0;
    }
    topAndSides
    {
        type            calculated;
        value           uniform 0;
    }
}
epsilon:
Code:
boundaryField
{
    "(bottom|heated)"
    {
        type            epsilonWallFunction;
        Cmu             0.09;
        kappa           0.41;
        E               9.8;
        value           uniform 0.01;
    }
    topAndSides
    {
        type            turbulentMixingLengthDissipationRateInlet;
        mixingLength    0.005;
        value           uniform 200;
    }
}
k:
Code:
internalField   uniform 0.01;

boundaryField
{
    "(bottom|heated)"
    {
        type            kqRWallFunction;
        value           uniform 0.01;
    }
    topAndSides
    {
        type            turbulentIntensityKineticEnergyInlet;
        intensity       0.05;
        value           $internalField;
    }

}
nut:
Code:
internalField   uniform 0.000005;

boundaryField
{
    "(bottom|heated)"
    {
        type            nutkWallFunction;
        value           uniform 0;
    }
    topAndSides
    {
        type            inletOutlet;
        inletValue      $internalField;
        value           $internalField;
    }
}
p_rgh:
Code:
internalField   uniform 0;

boundaryField
{
    "(bottom|heated)"
    {
        type            fixedFluxPressure;
        rho             rhok;
        value           $internalField;
    }
    topAndSides
    {
        type            totalPressure;
        p0              $internalField;
        value           $internalField;
    }
}
T:
Code:
internalField   uniform 305;

boundaryField
{
    bottom
    {
        type            fixedValue;
        value           uniform 305;
    }
    heated
    {
        type            fixedValue;
        value           uniform 338;
    }
    topAndSides
    {
        type            inletOutlet;
        inletValue      $internalField;
        value           $internalField;
    }
}
U:
Code:
internalField   uniform (0 0 0);

boundaryField
{
    "(bottom|heated)"
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    topAndSides
    {
        type            pressureInletOutletVelocity;
        value           uniform (0 0 0);
        inletValue      uniform (0 0 0);
    }
}
Is there anything obviously wrong with these? Most of my experience with OpenFOAM is with forced flows, not natural convection, so I relied on (what I percieved to be) similar tutorial cases to get an idea of the BC's.

Any advice is much appreciated. I've attached a full sample case below. You'll have to re-run blockMesh before you start the solver.

Thanks,
Kellis
Attached Files
File Type: gz boxTest.tar.gz (3.8 KB, 9 views)
Kellis is offline   Reply With Quote

Old   June 22, 2019, 09:39
Default
  #2
New Member
 
Cham Yang Han
Join Date: Dec 2018
Posts: 14
Rep Power: 8
cfd1609496 is on a distinguished road
For p_rgh u may try:

type fixedMean;
meanValue 1e5;
value uniform 1e5;


reference from:Natural Convection inside a open Cavity


i followed the B.C. and works quite well for my case and hope it works for you too



May i know is it not necessary to include /p for /0 case?

because as i follow the tutorial case files for buoyantBoussinesqPimpleFoam there is /p file.
cfd1609496 is offline   Reply With Quote

Old   June 26, 2019, 17:08
Default
  #3
Member
 
Kellis
Join Date: Mar 2017
Posts: 39
Rep Power: 9
Kellis is on a distinguished road
Quote:
Originally Posted by cfd1609496 View Post
For p_rgh u may try:

type fixedMean;
meanValue 1e5;
value uniform 1e5;

reference from:Natural Convection inside a open Cavity

i followed the B.C. and works quite well for my case and hope it works for you too

May i know is it not necessary to include /p for /0 case?

because as i follow the tutorial case files for buoyantBoussinesqPimpleFoam there is /p file.
Cham,

Thank you for the suggestion. Referring to the thread you linked, I tried both the fixedMean and fixedMeanOutletInlet conditions, with pressure values of both 1e5 and 0 (zero is OK for incompressible solver, right?). Unfortunately, neither of these fixed my convergence issues, and changing the meanValue from 0 to 1e5 made the cases run significantly slower. All of these combinations quickly hit the 200 iteration limit I have set on my case after a few timesteps, and never hit tolerance after that.

Another thing I've noticed is that the residuals that are output using the function object are much higher than what the residualControl tolerances are set at - sometimes by 3 orders of magnitude. I have read that this is because the final PIMPLE iteration doesn't use under-relaxation, while the previous iterations did. Is there a way to compensate for this issue? I can only raise the relaxation factors to a certain point before the simulation becomes unstable.

Thanks,
Kellis
Kellis is offline   Reply With Quote

Old   July 1, 2019, 03:33
Default
  #4
New Member
 
Cham Yang Han
Join Date: Dec 2018
Posts: 14
Rep Power: 8
cfd1609496 is on a distinguished road
Hmm, Incompressible means that the effects of pressure on the fluid density are zero or negligible. So i guess u still have to input a pressure value of atmosphere e.g. 1e5 (if thats what u are working with), and probably input it under /constant/thermophysicalProperties like:



pRef 100000;


for my case, i still input 1e5 pressure for every b.c. in /0 folder but i was told that OpenFoam worked with gauge pressure that may need pressure value 0 in /0 folder instead of 1e5...im not sure


Im sorry I dont have any idea for your 2nd query i hope this solver's issue get exposed more so that more ppl can answer our doubt.


If u like,i can email you my case file, but my solver blows up after 275s
cfd1609496 is offline   Reply With Quote

Reply

Tags
boussinesq, convergence, foam, pimple, residuals


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
Convergence in steady state simulations vs transient ones cardioCFD CFX 5 January 21, 2018 11:59
chtMultiRegionSimpleFoam: inconsistency between BCs and results Diro7 OpenFOAM Running, Solving & CFD 1 March 2, 2017 05:36
Bad convergence for flow separation in T-junction MelroseBing CFX 2 May 17, 2016 01:59
Dealing with BC's in OF 1.6 vkrastev OpenFOAM Running, Solving & CFD 5 September 4, 2012 12:58
2 Inlet Pres BC's and Out Mass Flow - Convergence SN Siemens 0 July 19, 2006 10:12


All times are GMT -4. The time now is 14:42.