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

Hydrostatic Pressure in a cube

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 25, 2012, 07:20
Default Hydrostatic Pressure in a cube
  #1
New Member
 
Join Date: Oct 2012
Posts: 14
Rep Power: 13
andreas is on a distinguished road
Dear Foamers,

I would like to understand how to implement hydrostatic pressure on a wall. I am a beginner with OF.

For that, I created a simple cube mesh:
Code:
convertToMeters 1;

vertices
(
    (0 0 0)
    (0 0 1)
    (0 1 1)
    (0 1 0)
    (1 0 0)
    (1 0 1)
    (1 1 1)
    (1 1 0)
);

blocks
(
    hex (0 1 2 3 4 5 6 7) (40 40 40) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
    walls
    {
        type wall;
        faces
        (
            (0 1 2 3)
            (4 5 6 7)
        (4 0 1 5)
        (5 6 2 1)
        (7 6 2 3)
        (4 7 3 0)
        );
    }
);
I want the hydrostatic pressure, so I used buoyantPressure for p:

Code:
dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{

    walls
    {
        type            buoyantPressure;
    value        uniform 0;
    }


}
The velocity type is pressureInletVelocity and the value is uniform(0 0 0).

I also created a g folder in "constant":

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       uniformDimensionedVectorField;
    location    "constant";
    object      g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -2 0 0 0 0];
value           ( 0 0 -9.81 );
The fluid is not supposed to move since it is a closed cube.
I don't know exactly what solver should I use but it seems that pisoFoam is ok.

So here is the fvSolution:

Code:
solvers
{
    p
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-06;
        relTol          0;
    }

    U
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-05;
        relTol          0;
    }
}

PISO
{
    nCorrectors     2;
    nNonOrthogonalCorrectors 0;
    pRefCell        0;
    pRefValue       0;
}
And for the fvSchemes, I used an existing one:

Code:
ddtSchemes
{
    default         Euler;
}

gradSchemes
{
    default         Gauss linear;
    grad(p)         Gauss linear;
}

divSchemes
{
    default         none;
    div(phi,U)      Gauss linear;
}

laplacianSchemes
{
    default         none;
    laplacian(nu,U) Gauss linear corrected;
    laplacian((1|A(U)),p) Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
    interpolate(HbyA) linear;
}

snGradSchemes
{
    default         corrected;
}

fluxRequired
{
    default         no;
    p               ;
}
Here are the TransportProperties:
Code:
nu              nu [ 0 2 -1 0 0 0 0 ] 0.01;
transportModel    Newtonian;
Here is the terminal response:
Code:
--> FOAM FATAL IO ERROR: 
keyword div((nuEff*dev(T(grad(U))))) is undefined in dictionary "/home/ubuntu/openfoam/simu/cube/system/fvSchemes::divSchemes"
I don't know what model should I use for div((nuEff*dev(T(grad(U))))?
Or maybe it is a wrong solver for a simple case like that?
Thank you for your help!
andreas is offline   Reply With Quote

Old   November 25, 2012, 15:53
Default
  #2
Member
 
Florian
Join Date: Nov 2009
Posts: 59
Rep Power: 16
Horus is on a distinguished road
I don't know if pisoFoam is right solver for this kind of problem.

For the error message you posted, simple add this expression to the divSchemes dictionary or set a default entry, e.g.
Code:
divSchemes 
{     
    default         Gauss linear;
    div(phi,U)      Gauss linear;
    div((nuEff*dev(T(grad(U))))) Gauss linear;
 }
Horus is offline   Reply With Quote

Old   November 26, 2012, 03:42
Default
  #3
New Member
 
Join Date: Oct 2012
Posts: 14
Rep Power: 13
andreas is on a distinguished road
Thank you for your answer!

I added that line in the fvSchemes, as well as the
Code:
laplacian(nuEff,U)    Gauss linear corrected;
in the laplacianSchemes.

Still, the terminal doesn't find the "g" folder:
Code:
--> FOAM FATAL ERROR: 

    request for uniformDimensionedVectorField g from objectRegistry region0 failed
    available objects of type uniformDimensionedVectorField are

0
(
)
Where is the objectRegistry region0?
I tried to copy/paste the g in all the folders (0,constant,system) still doesn't work.

Thanks for your help!
andreas 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
Pressure Outlet Guage pressure Mohsin FLUENT 36 April 29, 2016 17:16
vof + hydrostatic pressure ariorus FLUENT 0 August 7, 2009 10:57
Does star cd takes reference pressure? monica Siemens 1 April 19, 2007 11:26
hydrostatic pressure in bouyant flow Atit CFX 3 May 31, 2006 07:38


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