CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Different solutions comparing pisoFoam and interFoam (http://www.cfd-online.com/Forums/openfoam-solving/97127-different-solutions-comparing-pisofoam-interfoam.html)

AnjaMiehe February 9, 2012 09:19

Different solutions comparing pisoFoam and interFoam
 
3 Attachment(s)
Hello everybody,

I encounter problems in simulating some kind of pipe flow. My solution domain is given in domain.jpg and the boundaries are:
  • inlet: pressure inlet
  • inflow walls: no-slip walls
  • air gap: no-slip wall
  • rolls: rotating walls
  • moving sheet: moving walls
  • outlet: velocity outlet (block profile)
Using any of the solvers simpleFoam, icoFoam, pisoFoam or pimpleFoam, I get the result shown in velo_pimple.png. The figure shows, that the main stream attaches to the lower roll which is slightly nearer to the inlet region than the upper role.

As I want to continue with a second phase inside this domain, I recalculated it using interFoam. Unfortunately, I obtain the result shown in figure velo_inter.png. The stream is not attaching. I do not really understand the difference. My case setup is:

alpha1
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.0.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    location    "0";
    object      alpha;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [ 0 0 0 0 0 0 0 ];

internalField  uniform 0;

boundaryField
{
    roll_down
    {
        type            zeroGradient;
    }
    roll_up
    {
        type            zeroGradient;
    }
    air_cooling
    {
        type            zeroGradient;
    }
    gap
    {
        type            zeroGradient;
    }
    die
    {
        type            zeroGradient;
    }
    outlet
    {
        type            zeroGradient;
    }
    inlet
    {
        type            fixedValue;
        value          uniform 0;
    }
    frontAndBackPlanes
    {
        type            empty;
    }
}
// ************************************************************************* //

p
Code:

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

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

internalField  uniform 0;

boundaryField
{
    roll_down
    {
        type            zeroGradient;
    }
    roll_up
    {
        type            zeroGradient;
    }
    air_cooling
    {
        type            zeroGradient;
    }
    gap
    {
        type            zeroGradient;
    }
    die
    {
        type            zeroGradient;
    }
    outlet
    {
        type            zeroGradient;
    }
    inlet
    {
        type            fixedValue;
        value          uniform 0;
    }
    frontAndBackPlanes
    {
        type            empty;
    }
}
// ************************************************************************* //

U
Code:

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

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

internalField  uniform ( 0.0358 0 0 );

boundaryField
{
    roll_down
    {
        type            rotatingWallVelocity;
        origin          ( 0 -0.4225 0 );
        axis            ( 0 0 1 );
        omega          -0.0853;
        value          uniform ( 0 0 0 );
    }
    roll_up
    {
        type            rotatingWallVelocity;
        origin          ( 0 0.4225 0 );
        axis            ( 0 0 1 );
        omega          0.0853;
        value          uniform ( 0 0 0 );
    }
    air_cooling
    {
        type            fixedValue;
        value          uniform ( 0.0358 0 0 );
    }
    gap
    {
        type            fixedValue;
        value          uniform ( 0 0 0 );
    }
    die
    {
        type            fixedValue;
        value          uniform ( 0 0 0 );
    }
    outlet
    {
        type            fixedValue;
        value          uniform ( 0.0358 0 0 );
    }
    inlet
    {
        type            zeroGradient;
    }
    frontAndBackPlanes
    {
        type            empty;
    }
}
// ************************************************************************* //

fvSchemes
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.0.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "system";
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default        Euler;
}

gradSchemes
{
    default        Gauss linear;
}

divSchemes
{
    div(rho*phi,U)  Gauss limitedLinearV 1;
    div(phi,alpha)  Gauss vanLeer;
    div(phirb,alpha) Gauss interfaceCompression;
}

laplacianSchemes
{
    default        Gauss linear corrected;
}

interpolationSchemes
{
    default        linear;
}

snGradSchemes
{
    default        corrected;
}

fluxRequired
{
    default        no;
    p_rgh;
    pcorr;
    alpha1;
}
// ************************************************************************* //

fvSolution
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.0.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    pcorr
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance      1e-10;
        relTol          0;
    }

    p_rgh
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance      1e-07;
        relTol          0.05;
    }

    p_rghFinal
    {
        $p_rgh;
        tolerance      1e-07;
        relTol          0;
    }

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

PIMPLE
{
    momentumPredictor no;
    nCorrectors    3;
    nNonOrthogonalCorrectors 0;
    nAlphaCorr      1;
    nAlphaSubCycles 2;
    cAlpha          1;
}
// ************************************************************************* //

controlDict
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.0.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application    interFoam;

startFrom      latestTime;

startTime      0;

stopAt          endTime;

endTime        10;

deltaT          0.00125;

writeControl    adjustableRunTime;

writeInterval  0.2;

purgeWrite      0;

writeFormat    ascii;

writePrecision  6;

writeCompression uncompressed;

timeFormat      fixed;

timePrecision  6;

graphFormat    gnuplot;

runTimeModifiable yes;

adjustTimeStep  yes;

maxCo          0.9;
maxAlphaCo      0.9;

maxDeltaT      0.1;
// ************************************************************************* //

The turbulence model is laminar.
Does someone have an idea where this difference might come from?
Thanks in advance, Anja

vonboett May 11, 2012 05:13

Hello,

I am facing funny problems with alpha1 that didn't occur when OF 1.7.1 was used, so my intention is that using PIMPLE instead of PISO changes the situation. The problem occuring in other threads, too, is that if one has a simple outflow for example in a freeface channel, the alpha1 phase gets reflected at the outflow instead of leaving the domain. Any new hints?

AnjaMiehe May 15, 2012 02:10

Hello Albrecht,
I tried my case in 1.7.1 after your hint, but without success. The velocity field looks the same as above for InterFoam, but it was worth a try. Maybe I try to find something different from the outflow.
Regards, Anja

vonboett May 15, 2012 04:29

Hello Anja,

meanwhile I tried the outflow with:

U:
{
type inletOutlet;
inletValue uniform (0 0 0);
}
p_rgh:
{
type outletInlet;
outletValue uniform 0;
}
alpha1:
{
type zeroGradient;
}
which works fine in interFoam of OF 2.0. In about 8 hours I can tell more if it works with interFoam OF 2.1 set back to PISO. If I am the only one with these differences between the versions I have to check my Ubuntu installation, maybe the last update caused some weired change.

AnjaMiehe May 21, 2012 04:07

1 Attachment(s)
Hello Albrecht,

I have tried the InletOutlet with my case in 2.1.0 and 1.7.1 . It is a bit better but not the desired result. When I have some free cores, I will try different methods in fvSchemes and / or the fvSolution. I post the velocity results in a picture below. How does your case go?

Regards,
Anja

vonboett May 23, 2012 06:16

2 Attachment(s)
Ok turning old searching the cause of alpha1 being reflected at the outflow, I finally got it. 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 whol gid lies at a position that the x-coordinates are smaller than 0 the outflow works! Maybe this should be reported. I attatched the cases at my post in http://www.cfd-online.com/Forums/ope...tml#post362833 today (24.5.12)

AnjaMiehe May 25, 2012 02:30

Hello Albrecht,
Thanks for the hint with negative x. Now I get the results from InletOutlet with outflow as well. The rest might really be fvSolution and fvSchemes.
Regards, Anja

vonboett June 13, 2012 15:20

1 Attachment(s)
Meanwhile I reproduced the bug as well on a Mac OSX 10.6.5 intel with OF 1.7.x.
The case showing the reflection at the outlet is attatched, again the error vanishes when moving the mesh by -7 m in x direction to the negative quadrant. The attachment skipped the polyMesh folder due to file size, yust create the folder and move the blockMeshDict located at constant in it.

vonboett June 13, 2012 16:12

...with p_rgh zeroGradient at the outlet it works fine, tested in OF 1.7.x and in OF 2.1.x. Anyway I'd be happy for any explanation why a fixedValue 0 boundary condition for p_rgh causes phase reflection only if one translates the mesh location from negative x-coordinates to positive x-coordinates.


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