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/)
-   -   rhoPimpleFoam - Pressure cyclic fluctuations (https://www.cfd-online.com/Forums/openfoam-solving/218716-rhopimplefoam-pressure-cyclic-fluctuations.html)

sjohn2 July 1, 2019 14:48

rhoPimpleFoam - Pressure cyclic fluctuations
 
3 Attachment(s)
Hi,

I am trying to simulate a nozzle flow of water/steam, using rhoPimpleFoam solver.
I am getting cyclic fluctuations in pressure i.e pressure fields alternates every 3-4 times steps between the 2 figures. Basically the pressure does not converge.

Attachment 70800

Attachment 70801

However the velocity fields looks OK

Attachment 70802

PHP Code:

My boundary conditions are:
FoamFile
{
    
version     2.0;
    
format      ascii;
    class       
volScalarField;
    
object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Pin   248000;
Pout   127000;

dimensions      [--2 0 0];

internalField   uniform $Pout;

boundaryField
{
    
INLET
    
{
   
      
type          totalPressure;
       
p0           uniform $Pin;
    }

    
OUTLET
    
{
      
type          fixedValue;
      
value         uniform $Pout;
     
    }

    
WALL
    
{
        
type            zeroGradient;
    }

    
SYMM
    
{
        
type            symmetry;
    }
    
    
SIDE1
    
{
        
type            empty;
    }
    
    
SIDE2
    
{
        
type            empty;
    } 


PHP Code:

FoamFile
{
    
version     2.0;
    
format      ascii;
    class       
volVectorField;
    
object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
   
dimensions      [0 1 -1 0 0];

internalField   uniform (5.97 0 0);

boundaryField
{
    
INLET
    
{
        
        
type            pressureInletVelocity;
        
value           $internalField;

    }

    
OUTLET
    
{
        
type        zeroGradient;
    }

    
WALL
    
{
        
type            noSlip;
    }

    
SYMM
    
{
        
type            symmetry;
    }
    
    
SIDE1
    
{
        
type            empty;
    }
    
    
SIDE2
    
{
        
type            empty;
    }   
        


Thermohysical properties are
PHP Code:

FoamFile
{
    
version     2.0;
    
format      ascii;
    class       
dictionary;
    
location    "constant";
    
object      thermodynamicProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
    
type            heRhoThermo;
    
mixture         pureMixture;
    
properties      liquid;
    
energy          sensibleInternalEnergy;
}

mixture
{
    
H2O;


I am out of idea, what can be the possible problem Any suggestions?

sjohn2 July 1, 2019 19:06

Update!
 
2 Attachment(s)
I tried solving the same problem using rhoSimpleFoam; which uses the Simple algorithm to solve for pressure field, with the same boundary conditions and the pressure field problem vanishes.

I get the pressure field as:
Attachment 70806

and the velocity field as:

Attachment 70807

The problem I need to use cavitatingFoam which is based on PIMPLE algorithm and I need to get PIMPLE running,

Any suggestions?

sjohn2 July 2, 2019 14:15

2 Attachment(s)
Hi,

I got the solution to work finally, the change that I made to the fvsolution file in the PIMPLE part is turn on transonic. Now the pressure plot looks like this,

Attachment 70835

and the velocity plot is,

Attachment 70836


Does anyone have any feedback/advice in the settings for transonic/supersonic flows?

Here is my fv solution
PHP Code:

/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  [url]https://openfoam.org[/url]
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    
version     2.0;
    
format      ascii;
    class       
dictionary;
    
location    "system";
    
object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    
rho
    
{
        
solver          PCG;
        
preconditioner  DIC;
        
tolerance       1e-5;
        
relTol          0.1;
    }

    
rhoFinal
    
{
        
$rho;
        
tolerance       1e-5;
        
relTol          0;
    }

    
"p.*"
    
{
        
solver          GAMG;
        
smoother        GaussSeidel;

        
tolerance       1e-7;
        
relTol          0;
    }

    
"(U|e|k|epsilon).*"
    
{
        
solver          PBiCGStab;
        
preconditioner  DILU;

        
tolerance       1e-7;
        
relTol          0;
    }
}

PIMPLE
{
    
momentumPredictor   yes;
    
transonic           yes;
    
nOuterCorrectors    3;
    
nCorrectors         1;
    
nNonOrthogonalCorrectors 0;

    
pMaxFactor          1.2;
    
pMinFactor          0.8;
    
   
residualControl
    
{
        
U   1e-5;
 
        
p  5e-7;
 
     }
}

relaxationFactors
{
    
fields
    
{
        
p      0.3;
        
pFinal   1;
    }
    
    
equations
    
{
        
".*"            0.8;
    }
}

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


and fvschemes file:

PHP Code:

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

ddtSchemes
{
    default             
Euler;
}

gradSchemes
{
    default             
Gauss linear;

    
limited             cellLimited Gauss linear 1;
}

divSchemes
{
    default             
none;

    
div(phi,U)          Gauss linearUpwind limited;
    
div(phi,e)          Gauss linearUpwind limited;
    
div(phi,epsilon)    Gauss linearUpwind limited;
    
div(phi,k)          Gauss linearUpwind limited;
    
div(phi,K)          Gauss linearUpwind limited;
    
div(phiv,p)         Gauss linearUpwind limited;
    
div(phid,p)         Gauss linearUpwind limited;

    
div(((rho*nuEff)*dev2(T(grad(U)))))      Gauss linear;
}

laplacianSchemes
{
    default         
Gauss linear corrected;
}

interpolationSchemes
{
    default         
linear;
}

snGradSchemes
{
    default         
corrected;
}


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



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