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

Different solutions comparing pisoFoam and interFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 9, 2012, 09:19
Default Different solutions comparing pisoFoam and interFoam
  #1
Member
 
Anja Miehe
Join Date: Dec 2009
Location: Freiberg / Germany
Posts: 48
Rep Power: 17
AnjaMiehe is on a distinguished road
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
Attached Images
File Type: png velo_inter.png (37.8 KB, 154 views)
File Type: png velo_pimple.png (39.3 KB, 146 views)
File Type: jpg domain.jpg (13.4 KB, 123 views)
AnjaMiehe is offline   Reply With Quote

Old   May 11, 2012, 06:13
Default
  #2
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17
vonboett is on a distinguished road
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?
vonboett is offline   Reply With Quote

Old   May 15, 2012, 03:10
Default
  #3
Member
 
Anja Miehe
Join Date: Dec 2009
Location: Freiberg / Germany
Posts: 48
Rep Power: 17
AnjaMiehe is on a distinguished road
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
AnjaMiehe is offline   Reply With Quote

Old   May 15, 2012, 05:29
Default
  #4
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17
vonboett is on a distinguished road
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.
vonboett is offline   Reply With Quote

Old   May 21, 2012, 05:07
Default
  #5
Member
 
Anja Miehe
Join Date: Dec 2009
Location: Freiberg / Germany
Posts: 48
Rep Power: 17
AnjaMiehe is on a distinguished road
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
Attached Images
File Type: jpg InletOutlet_InterFOAM.jpg (18.0 KB, 81 views)
AnjaMiehe is offline   Reply With Quote

Old   May 23, 2012, 07:16
Default
  #6
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17
vonboett is on a distinguished road
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)
Attached Images
File Type: jpg impactOnOutflowT0,15.jpg (13.2 KB, 70 views)
File Type: jpg impactOnOutflowT0,15_withXCoordsmallerZero.jpg (14.6 KB, 48 views)

Last edited by vonboett; May 24, 2012 at 12:21.
vonboett is offline   Reply With Quote

Old   May 25, 2012, 03:30
Default
  #7
Member
 
Anja Miehe
Join Date: Dec 2009
Location: Freiberg / Germany
Posts: 48
Rep Power: 17
AnjaMiehe is on a distinguished road
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
AnjaMiehe is offline   Reply With Quote

Old   June 13, 2012, 16:20
Default
  #8
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17
vonboett is on a distinguished road
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.
Attached Files
File Type: zip flumeOutletTestX+1,7,x.zip (25.1 KB, 28 views)
vonboett is offline   Reply With Quote

Old   June 13, 2012, 17:12
Default
  #9
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17
vonboett is on a distinguished road
...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.

Last edited by vonboett; June 14, 2012 at 09:11.
vonboett is offline   Reply With Quote

Reply

Tags
icofoam, interfoam, pimplefoam, pisofoam, simplefoam


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



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