CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   not outflow at outlet in interFoam (http://www.cfd-online.com/Forums/openfoam/79714-not-outflow-outlet-interfoam.html)

deniggo September 1, 2010 06:25

not outflow at outlet in interFoam
 
Hi,
I've a simple square geometry with a irregular (up-and down) bottom. BC are inlet, outlet, top-atmosphere and walls in interFoam laminar. The model runs but not with my expected results. The problem is, that there's no outflow at the outlet. Looks like a closed wall, liquid (aplha1) is bouncing backwards.
checkMesh is OK.
My BC:

p_rgh:

inlet
{ type zeroGradient; } outlet { type fixedValue; value uniform 0; }

U:

inlet
{ type fixedValue; value uniform (0.5 0 0); } outlet { type zeroGradient; }

alpha1:

inlet { type fixedValue; value uniform 1; } outlet { type inletOutlet; inletValue uniform 0; value uniform 0; }
Thanks for help,

Nico

sega September 2, 2010 02:50

Quote:

Originally Posted by deniggo (Post 273599)
alpha1:

inlet { type fixedValue; value uniform 1; } outlet { type inletOutlet; inletValue uniform 0; value uniform 0; }

I think you force alpha1 to be zero at the outlet with this condition.
I would suggest you use zeroGradient for the outlet of alpha1.

deniggo September 2, 2010 03:02

Thanks for your answer,
setting alpha1 on zeroGradient was my step before. The model runs only 1-2 seconds and this error message occurs:

MULES: Solving for alpha1
#0 Foam::error::printStack(Foam::Ostream&) in "/home/trauth/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libOpenFOAM.so" #1 Foam::sigFpe::sigFpeHandler(int) in "/home/trauth/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libOpenFOAM.so" #2 in "/lib64/libc.so.6"
#3 void Foam::MULES::limiter<Foam::geometricOneField, Foam::zeroField, Foam::zeroField>(Foam::Field<double>&, Foam::geometricOneField const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::zeroField const&, Foam::zeroField const&, double, double, int) in "/home/trauth/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libfiniteVolume.so"
#4 void Foam::MULES::explicitSolve<Foam::geometricOneField , Foam::zeroField, Foam::zeroField>(Foam::geometricOneField const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::zeroField const&, Foam::zeroField const&, double, double) in "/home/trauth/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libfiniteVolume.so"
#5 Foam::MULES::explicitSolve(Foam::GeometricField<do uble, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, double, double) in "/home/trauth/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libfiniteVolume.so"
#6 in "/home/trauth/OpenFOAM/OpenFOAM-1.7.0/applications/bin/linux64GccDPOpt/interFoam"
#7 __libc_start_main in "/lib64/libc.so.6"
#8 at /usr/src/packages/BUILD/glibc-2.11.2/csu/../sysdeps/x86_64/elf/start.S:116
Gleitkomma-Ausnahme



Any idea what could be the reason?

Thanks

sega September 2, 2010 11:23

Hm, this is strange indeed.
It concerns the MULES solver for solving the VOF-equation.

I would suggest you to re-check everything converning alpha1 including boundaries and initial condition.

santiagomarquezd September 2, 2010 22:53

Can you post a little pic about the geometry?

Bye.

deniggo September 3, 2010 03:54

1 Attachment(s)
Here's my geometry.
- Inlet on the left, outlet on the right side, both bc are only in the lower part of the sidewalls.
- The top boundary is set as atmosphere.
- Bottom, front, and backside are walls.

The Mesh is coarse, maybe refinement would lead to better results?!
Thanks for your help.

Nico

[IMG]file:///home/trauth/Dokumente/Graphics/geo.jpg[/IMG]

sega September 3, 2010 04:08

Quote:

Originally Posted by deniggo (Post 273851)
Here's my geometry.
- Inlet on the left, outlet on the right side, both bc are only in the lower part of the sidewalls.

How do you tell OpenFOAM to do that?

Quote:

Originally Posted by deniggo (Post 273851)
The Mesh is coarse, maybe refinement would lead to better results?!

A hexahedronal mesh can lead to better results.

How does your initialisation of alpha1 look like?

deniggo September 3, 2010 04:33

Quote:

Originally Posted by sega (Post 273852)
How do you tell OpenFOAM to do that?

I've defined boundaries in blender and engrid before.

0/alpha1, in this case OF crashes after 1.78 sec.

right and left are the sidewalls above inlet and outlet.

Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    location    "0";
    object      alpha1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    right
    {
        type            zeroGradient;
    }
    inlet
    {
        type            fixedValue;
        value          uniform 1;
    }
    outlet
    {
        type            zeroGradient;
    }
    front
    {
        type            zeroGradient;
    }
    back
    {
        type            zeroGradient;
    }
    top
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value          uniform 0;
    }
    bottom
    {
        type            zeroGradient;
    }
    left
    {
        type            zeroGradient;
    }
}

0/alpha1 in this case OF runs, but outlet is closed. outlet is set to inletOutlet
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    location    "0";
    object      alpha1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    right
    {
        type            zeroGradient;
    }
    inlet
    {
        type            fixedValue;
        value          uniform 1;
    }
    outlet
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value          uniform 0;
    }
    front
    {
        type            zeroGradient;
    }
    back
    {
        type            zeroGradient;
    }
    top
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value          uniform 0;
    }
    bottom
    {
        type            zeroGradient;
    }
    left
    {
        type            zeroGradient;
    }
}


santiagomarquezd September 3, 2010 08:14

Hello Nico, first settings appear to be correct, except for:

Quote:

top
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
I think is better to user zeroGradient too over there. I would use inletOutlet for U in atmo. Can you post your U and p dicts for /0 and the initialization?

A little shortcut to start with this problem is to put a wall on the top (atmosphere) and to use inletOutlet in the top part of the inlet to ensure air entrance.

Regards.

deniggo September 3, 2010 09:26

Hello Santiago,

Here my 0/U:
I guess pressureInletOutletVelocity equates almost to inletOutlet.
Code:

FoamFile
{
    version    2.0;
    format      binary;
    class      volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform (0 0 0);

boundaryField
{
    right
    {
        type  fixedValue;
        value uniform (0 0 0);
    }
    inlet
    {
        type  fixedValue;
        value uniform (0.5 0 0);
    }
    outlet
    {
        type zeroGradient;
    }
    front
    {
        type  fixedValue;
        value uniform (0 0 0);
    }
    back
    {
        type  fixedValue;
        value uniform (0 0 0);
    }
    top
    {
        type inletOutlet;
            inletValue uniform (0 0 0);
            value uniform (0 0 0);

        //before:
        //type  pressureInletOutletVelocity;
        //value  uniform (0 0 0);
    }
    bottom
    {
        type  fixedValue;
        value uniform (0 0 0);
    }
    left
    {
        type  fixedValue;
        value uniform (0 0 0);
    }
}

and 0/p_rgh:

Code:

FoamFile
{
    version    2.0;
    format      binary;
    class      volScalarField;
    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform 0;

boundaryField
{
    right
    {
        type            buoyantPressure;
        value          uniform 0;
    }
    inlet
    {
        type            zeroGradient;
    }
    outlet
    {
        type            fixedValue;
        value          uniform 0;
    }
    front
    {
        type            buoyantPressure;
        value          uniform 0;
    }
    back
    {
        type            buoyantPressure;
        value          uniform 0;       
    }
    top
    {
        type            totalPressure;
        p0              uniform 0;
        U              U;
        phi            phi;
        rho            rho;
        psi            none;
        gamma          1;
        value          uniform 0;
    }
    bottom
    {
        type            buoyantPressure;
        value          uniform 0;
    }
    left
    {
        type            buoyantPressure;
        value          uniform 0;
    }
   
}

In another run, I changed all buoyantPressure into zeroGradient with no effect.


Do you mean the boundaray-file with initialization?:

Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      polyBoundaryMesh;
    location    "constant/polyMesh";
    object      boundary;
}

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

8
(
    right
    {
        type        wall;
        nFaces      29;
        startFace  11746;
    }
    inlet
    {
        type        patch;
        nFaces      26;
        startFace  11775;
    }
    outlet
    {
        type        patch;
        nFaces      26;
        startFace  11801;
    }
    front
    {
        type        wall;
        nFaces      879;
        startFace  11827;
    }
    back
    {
        type        wall;
        nFaces      907;
        startFace  12706;
    }
    top
    {
        type        patch;
        nFaces      482;
        startFace  13613;
    }
    bottom
    {
        type        wall;
        nFaces      478;
        startFace  14095;
    }
    left
    {
        type        wall;
        nFaces      33;
        startFace  14573;
    }
)

Quote:

I think is better to user zeroGradient too over there. I would use inletOutlet for U in atmo.
OK, I replaced:

aplha1: inletOutlet into zeroGradient

U: pressureInletOutletVelocity
into
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0 0 0);

interFoam runs only 1.3 seconds.

Quote:

A little shortcut to start with this problem is to put a wall on the top (atmosphere) and to use inletOutlet in the top part of the inlet to ensure air entrance.
I'll try this next.

Thanks for help.

Regards,

Nico

santiagomarquezd September 3, 2010 12:48

Nico, your settings appear to be OK, I only would change (as you already did) the bouyantPressure BC by zeroGradient. Pressure equation is Poisson-like, therefore zeroGradient is the correct BC for walls. I would use these settings with a very small timestep, i.e. 1e-7, and then would increase it until run explodes.

Try this, if you continue having problems, please post the output.

Good luck.

deniggo September 7, 2010 11:17

Hi,

I forgot to give aplha1 in setFields a value, I neglected it before (thanks to Sega;)). My geometry is now half filled with water at time 0. InterFoam runs.

Quote:

I only would change (as you already did) the bouyantPressure BC by zeroGradient.
I replayced boyantPressure by zeroGradient and no changes occurred. Maybe in my case, it makes no differences?
I took the BC from the damBreak tutorial. I think at least here, correct BC should be used.

Thanks,

Nico

vonboett May 11, 2012 04:24

no outflow in interFoam
 
dear FOAMERS,

I used type inletOutlet; inletValue uniform (0 0 0); for U at the outlet and type zeroGradient; for alpha1 at the outlet and tried aswell type inletOutlet; inletValue uniform 0; for alpha1, and all these settings work fine with OF 1.7.1 but create no outflow at OF 2.1.x., so maybe there is some change between the versions?

vonboett May 11, 2012 06:07

using PISO instead of PIMPLE solved the problem

vonboett May 23, 2012 06:22

2 Attachment(s)
Ok turning old searching the cause of alpha1 being reflected at the outflow, I finally got it (ints not about PISO and PIMPLE). Maybe this is a bug dependent on ubuntu version, but it is quite relevant. The difference between the two pictures below showing an outflow of a channel is only that I moved the grid from positive x quadrant to negative x quadrant. When the whole grid lies at a position that the x-coordinates are smaller than 0 the outflow works! If using zeroGradient for p_rgh at the outflow, it works aswell fine for a grid with positive x coordinates. Anyway, I would be happy for any explanation on this.


All times are GMT -4. The time now is 15:39.