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

buoyantPimpleFoam - pressure field

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 16, 2015, 06:53
Default buoyantPimpleFoam - pressure field
  #1
New Member
 
F.F.
Join Date: Dec 2011
Posts: 8
Rep Power: 5
Fabf is on a distinguished road
Dear Foamers,

simulation case: thermal water storage which is loaded with hot fluid. Imagine a cylindrical tank with horizontal radial inlet/outlet discs near top resp. bottom.

Problem is the pressure field distribution. According to p = p_rgh + rho*gh pressure decreases correctly with height (nice explanation here. But at the bottom p equals 1e5 Pa so that there is negative pressure at the top. Since all pressure gradients are okay and density is just a function of temperature, there are no converging issues and the results are reasonable. But still, where does it come from?

My p_rgh-file:
Code:
internalField   uniform 1e5;

boundaryField
{
  "(SYMM_F|SYMM_B)"
  {
      type wedge;
    }
    "(OUTLET)"
    {
        type            prghPressure;
        rhoName         rho;
        p                uniform 1e5;
    }
    "(INLET)"
    {
        type            zeroGradient;
    }
    
      "(WALL_DIFF|WALL_DIFF_MASTER|WALL_DIFF_SLAVE|WALL_SIDE|WALL_TOP)"
    {
        type            fixedFluxPressure;
        value           $internalField;
    }
}
p-file:
Code:
internalField   uniform 1e5;

boundaryField
{
  "(SYMM_F|SYMM_B)"
    {
      type wedge;
    }
    "(OUTLET|INLET|WALL_TOP|WALL_DIFF|WALL_DIFF_MASTER|WALL_SIDE|WALL_DIFF_SLAVE)"
    {
        type            calculated;
        value           $internalField;
    }
}
I tried the following:
- change all values of p and p_rgh = 1e5 to rho*g*h with h - height of tank--> gives a pressure field close to reality (pressure at top is around 1e5Pa), but I am not really happy with that solution..
- apply a fixed pressure p_rgh=1e5 to the top wall (lid), keep U=(0 0 0) --> outflow through wall, although wall has fixed value to zero for U
- initialize with correct pressure field using funkySetFields (according to here--> same field after some timesteps
- trying different BCs.. --> same
- try setting presure reference point --> only yields for closed systems

What I am missing? From a physical point of view: internal field of p_rgh has to be around atmospheric pressure, since the hydrostatic component is applied afterwards. Also my outlet pressure has to be p_rgh=1e5Pa ..?!

my other files:
-thermophysicalProperties
Code:
thermoType	
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       polynomial;
    thermo          hPolynomial;
    equationOfState icoPolynomial;
    specie          specie;
    energy          sensibleEnthalpy;
}

dtdp = off; 
{
    specie	
    {
        nMoles          1;
        molWeight       18;
    }

    equationOfState
    {
          rhoCoeffs<8>  (-540.4680832401600000 16.7586613589465000 -0.0668647676334458 0.0001178920951103 -0.0000000809669445 0 0 0 ); 
	    
    }

    thermodynamics //f(T)
    {
        Hf              0;
        Sf              0;
        CpCoeffs<8>     (4193.0 0 0 0 0 0 0 0); 
    {
         
        muCoeffs<8>
           ( 0.260216875208536 -0.0029069831827857 0.0000122820941795 -0.0000000231946446 0.0000000000164938 0 0 0); // 
         kappaCoeffs<8>
            ( 0.596 0 0 0 0 0 0 0);
    }
    
}
fvSolution:
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       dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    "rho.*"
    {
        solver          GAMG;//PCG;
        //preconditioner  DIC;
        tolerance       1e-6;//0;
        relTol          0;
    }

    p_rgh
    {
        solver          GAMG;//PCG;   
        //preconditioner  DIC;
        tolerance       1e-6;//1e-8;
        relTol          0.01;
         smoother    GaussSeidel;
    cacheAgglomeration true;
    nCellsInCoarsestLevel 10; 
    agglomerator faceAreaPair;
    mergeLevels     1;
    }


    p_rghFinal
    {
        $p_rgh;
        relTol          0;
    }

    "(U|h|e|k|R|omega)"//"(U|h|e|k|epsilon|R)"
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-8; // 6; http://www.dicat.unige.it/guerrero/of2014b/12tipsandtricks.pdf
        relTol          0.0;//.1
    }

    "(U|h|e|k|R|omega)Final"//"(U|h|e|k|epsilon|R)Final"
    {
        $U;
        relTol          0;
    }
        omega
    {
        solver           smoothSolver;
        smoother         GaussSeidel;
        tolerance        1e-8;
        relTol           0.1;
        nSweeps          1;
    }
}

PIMPLE
{
    momentumPredictor yes;
    nOuterCorrectors 50;//1
    nCorrectors     2;//2
    nNonOrthogonalCorrectors 2;//20;//0;
    //pRefPoint (5,39 1.79 0);
    //pRefValue 1e5;;
    residualControl
{
        p_rgh
        {
            tolerance 1e-03;
            relTol 0;
            absTol 0;
        }
}
}

relaxationFactors
{
    fields
    {
        p               0.3; //0.3
	"p_rhg*"		0.3;//0.3
	rho		0.7;
    }
    equations
    {
        "U*"               0.7; //0.7
        "T*"               0.7; //0.7
        "(h|e)"		0.7; //0.7
        k               0.7; //0.7
        omega           0.7; //0.7
    }
}
fvSchemes:
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       dictionary;
    location    "system";
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default         Euler;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    default         none;
    div(phi,U)      Gauss upwind;
    div(phi,h)      Gauss upwind;
    div(phi,e)      Gauss upwind;
    div(phi,k)      Gauss upwind;
    //div(phi,epsilon) Gauss upwind;	k-E Modell
    div(phi,omega)  bounded Gauss upwind;
    div(phi,R)      Gauss upwind;
    div(phi,K)      Gauss linear;
    div(phi,Ekp)    Gauss linear;
    div(R)          Gauss linear;
    //(div((muEff*dev2(T(grad(U))))) Gauss linear;  k-E Modell
    div((muEff*dev2(T(grad(U))))) Gauss linear;  
    div(phiv,p) Gauss upwind p; 	
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

fluxRequired
{
    default         no;
    p_rgh;
}


// ************************************************************************* //

Thanks in advance!
Attached Images
File Type: jpg p_Field.jpg (16.6 KB, 9 views)
File Type: jpg p_rgh_Field.jpg (16.3 KB, 9 views)
Fabf is offline   Reply With Quote

Old   February 16, 2015, 18:51
Default
  #2
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: Amherst, MA USA - San Diego, CA USA
Posts: 280
Rep Power: 9
kmooney is on a distinguished road
For most of the incompressible formulations in OpenFOAM you'll always see the pressure term inside of a gradient operator in all of the transport and intermediate solution equations. What this means is that the absolute value of pressure could really be anything as you're always solving for grad(p), not p.

The pressure reference point you mentioned would be required for cases where you don't have a dirchlet BC set for pressure, and thus pinning it to some unique solution.

In your case having a negative pressure doesn't really mean anything, you can likely arbitrarily change the outlet pressure value to what ever you like and still get the same flow field.

I hope that helps!
Kyle
kmooney is offline   Reply With Quote

Old   February 17, 2015, 05:02
Default
  #3
New Member
 
F.F.
Join Date: Dec 2011
Posts: 8
Rep Power: 5
Fabf is on a distinguished road
Perfect. So there is nothing I have to worry about.

I will just change the outlet pressure to p_atmo+rho*g*h_total to adjust the entire field and then everything looks nice.

Thanks!
Fabf is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pressure Outlet Guage pressure Mohsin FLUENT 34 January 12, 2012 06:45
Pressure BC for combustion chamber Giuki FLUENT 1 July 19, 2011 11:35
custom pressure field at the faces Souviktor FLUENT 0 April 3, 2009 08:09
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51
How to get Pressure field from velocity field qunwuhe@hotmail.com Main CFD Forum 4 October 14, 2007 07:38


All times are GMT -4. The time now is 11:37.