CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Time continuity error & FAN patch (https://www.cfd-online.com/Forums/openfoam-solving/151743-time-continuity-error-fan-patch.html)

Zephiro88 April 16, 2015 08:10

Time continuity error & FAN patch
 
Hi all,

I try to simulate a ducted fan in the tail of a body.
If the fixed jump is below 1000 there is no movment in the mass of air (Paraview cant plot the velocity or pressure field), if i increase the pressure jump after few iteration (simpleFoam) diverge in the time continuity error..

I don't know were the problem could be. Tell me all the information you need to uderstand what could be wrong.
Thanks.

Zephiro88 April 16, 2015 08:30

P Initial condition
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      volScalarField;
    location    "0";
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform 0;

boundaryField
{
    frontAndBack
    {
        type            slip;
    }
    outlet
    {
        type            fixedValue;
        value          uniform 0;
    }
    inlet
    {
        type            zeroGradient;
    }
    lowerWall
    {
        type            zeroGradient;
    }
    upperWall
    {
        type            slip;
    }
    Corpo
    {
        type            zeroGradient;
    }
    Case
    {
        type            zeroGradient;
    }
    cyclicFaces_master
    {
        type            fan;
        patchType      cyclic;
        jump            uniform 0;
        value          uniform 0;
        jumpTable      polynomial
        1((2000 0));
    }
    cyclicFaces_slave
    {
        type            fan;
        patchType      cyclic;
        value          uniform 0;
    }
}


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

U initial condition
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      volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform (0 0 0);

boundaryField
{
    frontAndBack
    {
        type            slip;
    }
    outlet
    {
        type            inletOutlet;
        inletValue      uniform (0 0 0);
        value          uniform (0 0 0);
    }
    inlet
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    lowerWall
    {
        type            slip;
    }
    upperWall
    {
        type            slip;
    }
    Corpo
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    Case
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    cyclicFaces_master
    {
        type            cyclic;
    }
    cyclicFaces_slave
    {
        type            cyclic;
    }
}


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

Omega
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      volScalarField;
    location    "0";
    object      omega;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform 226;

boundaryField
{
    frontAndBack
    {
        type            slip;
    }
    outlet
    {
        type            inletOutlet;
        inletValue      uniform 2.26;
        value          uniform 2.26;
    }
    inlet
    {
        type            fixedValue;
        value          uniform 2.26;
    }
    lowerWall
    {
        type            slip;
    }
    upperWall
    {
        type            slip;
    }
    Corpo
    {
        type            omegaWallFunction;
        value          uniform 226;
        Cmu            0.09;
        kappa          0.41;
        E              9.8;
        beta1          0.075;
        value          uniform 226;
    }
    Case
    {
        type            omegaWallFunction;
        value          uniform 226;
        Cmu            0.09;
        kappa          0.41;
        E              9.8;
        beta1          0.075;
        value          uniform 226;
    }
    cyclicFaces_master
    {
        type            cyclic;
    }
    cyclicFaces_slave
    {
        type            cyclic;
    }
}


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

Nut
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      volScalarField;
    location    "0";
    object      nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform 0;

boundaryField
{
    frontAndBack
    {
        type            calculated;
        value          uniform 0;
    }
    outlet
    {
        type            calculated;
        value          uniform 0;
    }
    inlet
    {
        type            calculated;
        value          uniform 0;
    }
    lowerWall
    {
        type            calculated;
        value          uniform 0;
    }
    upperWall
    {
        type            calculated;
        value          uniform 0;
    }
    Corpo
    {
        type            nutkWallFunction;
        Cmu            0.09;
        kappa          0.41;
        E              9.8;
        value          uniform 0;
    }
    Case
    {
        type            nutkWallFunction;
        Cmu            0.09;
        kappa          0.41;
        E              9.8;
        value          uniform 0;
    }
    cyclicFaces_master
    {
        type            cyclic;
    }
    cyclicFaces_slave
    {
        type            cyclic;
    }
}


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

K
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      volScalarField;
    location    "0";
    object      k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform 0.105;

boundaryField
{
    frontAndBack
    {
        type            slip;
    }
    outlet
    {
        type            inletOutlet;
        inletValue      uniform 0.105;
        value          uniform 0.105;
    }
    inlet
    {
        type            fixedValue;
        value          uniform 0.105;
    }
    lowerWall
    {
        type            slip;
    }
    upperWall
    {
        type            slip;
    }
    Corpo
    {
        type            kqRWallFunction;
        value          uniform 0.105;
    }
    Case
    {
        type            kqRWallFunction;
        value          uniform 0.105;
    }
    cyclicFaces_master
    {
        type            cyclic;
    }
    cyclicFaces_slave
    {
        type            cyclic;
    }
}


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

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;
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    p
    {
        solver          GAMG;
        tolerance        1e-7;
        relTol          0.01;
        smoother        GaussSeidel;
        nPreSweeps      0;
        nPostSweeps      2;
        cacheAgglomeration on;
        agglomerator    faceAreaPair;
        nCellsInCoarsestLevel 10;
        mergeLevels      1;
    }

    U
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance        1e-8;
        relTol          0.1;
        nSweeps          1;
    }

    k
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance        1e-8;
        relTol          0.1;
        nSweeps          1;
    }

    omega
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance        1e-8;
        relTol          0.1;
        nSweeps          1;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors 0;
}

potentialFlow
{
    nNonOrthogonalCorrectors 10;
}

relaxationFactors
{
    fields
    {
        p              0.4;
    }
    equations
    {
        U              0.7;
        k              0.7;
        omega          0.7;
    }
}

cache
{
    grad(U);
}

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


Zephiro88 April 22, 2015 12:14

Ok,after some try i think that the error become from the inlet boudary condition that is a fixedInletValue of 0. When i increase the velocity the continuity error remain small.

A question, wich BC i have to use, if i want that there is no inlet and outlet constrain. I mean, if i want to simulate a fan in a free air without knowing the fan mass flow, only the pressure jump...

alexB April 22, 2015 12:36

Hi zephiro,

I have copied this BCs from some tutorial for my case, when I want to let the BCs be computed
Code:

    inlet
    {
        type            pressureInletOutletVelocity;
        phi            phi;
        value          $internalField;
    }

for pressure or velocity

and
Code:

    outlet
    {
        type            inletOutlet;
        inletValue      $internalField;
        value          $internalField;
    }

for k epsilon etc.

I hope it helps

otherwise the calculated BC could help... just a guess
http://cfd.direct/openfoam/user-guide/boundaries/

regards
Alex

Zephiro88 April 22, 2015 12:39

Thanks for your reply, now i try youre suggestion, i'm sure it will work.

Best regards
Francesco


All times are GMT -4. The time now is 04:25.