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

rhoSimpleFoam accuracy

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Fouch

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 4, 2021, 13:31
Default rhoSimpleFoam accuracy
  #1
Member
 
Join Date: Feb 2020
Posts: 79
Rep Power: 6
Fouch is on a distinguished road
Hello guys,


I am calculating a centrifugal fan with rhoSimpleFoam as solver.
The problem is I cannot get so accurate value as I have with CFX.


The pressure still to low with OpenFoam (20% lower compared to CFX).


My mesh should be OK according to checkMesh.


Coud you tell me if you see something wrong in my configuration ?


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

ddtSchemes
{
    default         steadyState;
}

gradSchemes
{
    default    cellLimited Gauss linear 1;
 //   grad(U)     cellMDLimited leastSquares 1;
 //   grad(p)     cellMDLimited Gauss linear 0.33;
}

divSchemes
{
    default         Gauss upwind;
    div(phi,U)      Gauss linearUpwind grad(U);
    div(phi,k)      bounded Gauss upwind;
    div(phi,omega)  bounded Gauss upwind;
    div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
    div(phi,e)      Gauss linearUpwind grad(e);
    div(phi,Ekp)    Gauss linearUpwind grad(Ekp);
}

laplacianSchemes
{
    //default         Gauss linear corrected;
    default     Gauss linear limited 0.777;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    //default         corrected;
    default     limited 0.777;
}
wallDist
{
    method meshWave;
    correctWalls    true;
}

// ************************************************************************* //
fvSolution :


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

solvers
{
 
    "(p|e)"
    {
        solver          GAMG;
    smoother        GaussSeidel;
        cacheAgglomeration true;
        nCellsInCoarsestLevel 1000;
        agglomerator    faceAreaPair;
        mergeLevels     1;
        tolerance       1e-6;
        relTol          0;
        nPreSweeps       1;
    nPostSweeps     2;
        minIter    4;
    maxIter     200;   
    }
    
    "(k|omega|rho|U)"
    {
        solver          PBiCGStab;
        preconditioner  DILU;
        tolerance       1e-9;
        relTol          0;
        maxIter          50;
        minIter          5;
    }
/*    "(k|omega|rho)"
    {
        solver          PBiCGStab;
        preconditioner  DILU;
        tolerance       1e-10;
        relTol          0;
        maxIter          50;
        minIter          5;

        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance       1e-10;
        relTol          0;
        maxIter          50;
        minIter          5;
    }*/

}

SIMPLE
{

    nNonOrthogonalCorrectors 0;
    pRefCell     0;
    pRefValue    0;
    nCorrectors 4;
    pMinFactor      0.1;
    pMaxFactor      2;
    consistent    yes;

    residualControl
    {
/*        p           1e-3;
        Ux          1e-3;
    Uy          1e-3;
    Uz          1e-3;
        omega        1e-3;
        k        1e-3;*/
    }
}

relaxationFactors
{
    fields
    {
        p               0.9;
    rho             0.1;
    }
    equations
    {
        U               0.8; //0.7
        e               0.7;
        "k|omega"       0.65;//0.2
    }
}


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

thermophysicalProperties :



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

thermoType
{
    type            hePsiThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}

mixture // air at room temperature (293 K)
{
    specie
    {
        molWeight   28.9;
    }
    thermodynamics
    {
        Cp          1008;
        Hf          0;
    }
    transport
    {
        mu          1.82e-05;
        Pr          0.99;
    }
}


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

I attached a screenshot of the mesh and the residuals.


Thank you in advance !
Attached Images
File Type: jpg mesh1.jpg (112.2 KB, 58 views)
File Type: jpg mesh2.jpg (133.3 KB, 50 views)
Attached Files
File Type: pdf p-residual.pdf (12.1 KB, 17 views)
File Type: pdf torque-residual.pdf (12.7 KB, 8 views)
File Type: pdf UKO-residual.pdf (26.8 KB, 5 views)
Fouch is offline   Reply With Quote

Old   August 5, 2021, 07:25
Default
  #2
Member
 
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5
DevilX is on a distinguished road
Hey Fouch,

can you also share you 0 Folder (BC´s)?

I am also using rhoSimpleFOam for my Case and it behave´s not always as intended.
DevilX is offline   Reply With Quote

Old   August 5, 2021, 08:53
Default
  #3
Member
 
Join Date: Feb 2020
Posts: 79
Rep Power: 6
Fouch is on a distinguished road
Hi DevilX,


The link to my 0 directory :
https://nextcloud.cm-en-transition.fr/s/cio8K5Jdb4NP4Ss
Fouch is offline   Reply With Quote

Old   August 6, 2021, 08:00
Default
  #4
New Member
 
Join Date: Oct 2019
Posts: 13
Rep Power: 7
anthony761 is on a distinguished road
Is your case is more a blower than a compressor? What is pressure ratio magnitude are you expected? Because that is strange, in my case OpenFOAM over-estimates my pressure ratio but the magnitude is quite close (from my point of view).
I think… that the problem comes from the energy equation that is not suitable in MRF
Anyway, this is my last fvSolution and fvSchemes, if it might help

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

solvers
{

    Phi
    {
        solver          GAMG;
        smoother        DIC;
        tolerance       1e-06;
        relTol          0.01;
    }

    "(p|rho)"
    {
        solver          GAMG;
        tolerance       1e-08;
        relTol          0.05;
        smoother        symGaussSeidel;
        nCellsInCoarsestLevel 200;
    }

    "(U|k|epsilon|omega)"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        nSweeps         2;
        tolerance       1e-06;
        relTol          0.1;
        minIter         1;
    }

    "(e|h)"
    {
        solver          PBiCGStab;
        preconditioner  DILU;
        nSweeps         2;
        tolerance       1e-06;
        relTol          0.1;
        minIter         1;
    }

    "(p|rho)Final"
    {
        $p;
        tolerance       1e-06;
        relTol          0;
        minIter         1;
    }

    "(U|k|epsilon|omega)Final"
    {
        $U;
        tolerance       1e-05;
        relTol          0;
        minIter         1;
    }

    "(e|h)Final"
    {
        $e;
        tolerance       1e-05;
        relTol          0;
        minIter         1;
    }
}

limiters
{
    pMinFactor      0.01;
    pMaxFactor      5;    
}

potentialFlow
{
    nNonOrthogonalCorrectors 0;
}

SIMPLE
{
    consistent              yes; // to use SIMPLEC
    transonic               yes;
    nNonOrthogonalCorrectors 0; // 0 to 20
    $limiters

    residualControl
    {
        p                   1e-4;
        U                   1e-5;
        "(e|h)"             1e-5;
        "(k|epsilon|omega)" 1e-4;
    }
}
relaxationFactors-SIMPLE
{
    fields
    {
        p               0.3;
        rho             0.05;
    }
    equations
    {
        p                   1;
        U                   0.7;
        "(e|h)"             0.5;
        "(k|epsilon|omega)" 0.7;
        ".*Final"           1.0;
    }
}

PIMPLE
{
    nOuterCorrectors 2;
    nCorrectors     1;
    nNonOrthogonalCorrectors 0;

    $limiters
}
relaxationFactors-PIMPLE
{
    equations
    {
        U                   0.95;
        "(e|h)"             0.95;
        "(k|epsilon|omega)" 0.95;
        ".*Final"           1.0;
    }
}


// relaxationFactors { $relaxationFactors-PIMPLE }
relaxationFactors { $relaxationFactors-SIMPLE }
fvSchemes
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default         steadyState;
}

gradSchemes // <optionalLimiter> <gradientScheme> <interpolationScheme>
{
    default         Gauss linear;
    limited         cellLimited Gauss linear 1;
    grad(U)         $limited;
    grad(k)         $limited;
    grad(epsilon)   $limited;
    grad(omega)     $limited;
}

divSchemes // Gauss <interpolationScheme>
{
    default         none;
    div(phi,U)      bounded Gauss linearUpwind limited;
    div(U)          Gauss linear;
    div(div(phi,U)) Gauss linear; // for potentialFoam
    div((nuEff*dev2(T(grad(U)))))           Gauss linear;
    div((nuEff*dev(T(grad(U)))))            Gauss linear;
    div(((rho*nuEff)*dev2(T(grad(U)))))     Gauss linear;

    energy          bounded Gauss linearUpwind limited;
    div(phi,e)      $energy;
    div(phi,h)      $energy;
    div(phi,K)      $energy;
    div(phi,Ekp)    $energy;

    div(phid,p)     Gauss upwind;
    div((phi|interpolate(rho)),p)  bounded Gauss upwind;

    turbulence      bounded Gauss upwind;
    div(phi,k)          $turbulence;
    div(phi,epsilon)    $turbulence;
    div(phi,omega)      $turbulence;
}

laplacianSchemes // Gauss <interpolationScheme> <snGradScheme>
{
    default     Gauss linear corrected;
}

interpolationSchemes
{
    default     linear;
}

snGradSchemes
{
    default     corrected;
}

wallDist
{
    method          meshWave;
    correctWalls    true; // OPT correct distance from near-wall cells to the boundary
}
anthony761 is offline   Reply With Quote

Old   August 7, 2021, 18:04
Default
  #5
Member
 
Join Date: Feb 2020
Posts: 79
Rep Power: 6
Fouch is on a distinguished road
Hi,

Thank you for your feedback.

Yes, in my case it’s more a blower. The expected static pressure ride is 5,5kPa. I see that you use transonic option. I have never tested.
May be you are right and the solver is not suitable for MRF but that would be a pity…
Could you share your thermoPhysical file too ?
Thank you
Fouch is offline   Reply With Quote

Old   August 9, 2021, 07:23
Default
  #6
New Member
 
Join Date: Oct 2019
Posts: 13
Rep Power: 7
anthony761 is on a distinguished road
Quote:
Originally Posted by Fouch View Post
Hi,

Thank you for your feedback.

Yes, in my case it’s more a blower. The expected static pressure ride is 5,5kPa. I see that you use transonic option. I have never tested.
May be you are right and the solver is not suitable for MRF but that would be a pity…
Could you share your thermoPhysical file too ?
Thank you
So, in this case, did you try simpleFoam solver? I'm quite sure that it can do the job because of your very low pressure rise. You can see this conference about pump simulation with OpenFoam, it may help you.
https://www.youtube.com/watch?v=hBQUcaPHbk4

My thermophysical properties are already described in my previous post Issues on the simulation of high-speed compressible flow within turbomachinery and I have already tried many fluid models but the results didn't significantly change.
anthony761 is offline   Reply With Quote

Old   August 9, 2021, 09:39
Default
  #7
Member
 
Join Date: Feb 2020
Posts: 79
Rep Power: 6
Fouch is on a distinguished road
Hi !

Thank you Anthony.

I will retry with simpleFoam but next week (no computer this week).

I keep you in touch.
Fouch is offline   Reply With Quote

Old   September 8, 2021, 06:46
Default
  #8
Member
 
Join Date: Feb 2020
Posts: 79
Rep Power: 6
Fouch is on a distinguished road
Hi,

Below my feedback after some tests :

Steadystate calculation :

Difficult to keep stable results event with consistent option activated (SIMPLEC).

LTS (Local Time Step)

I am using this discetisation now and it is really more stable. I can use komegaSST crash and the results are accurate enough.

anthony761,

Have you ever tried LTS for the computation of your compressors ?
hogsonik likes this.
Fouch is offline   Reply With Quote

Old   October 25, 2022, 11:36
Exclamation Compressor blade Simulation
  #9
Senior Member
 
Sakun
Join Date: Nov 2019
Location: United Kingdom
Posts: 133
Rep Power: 7
Sakun is on a distinguished road
Hi guys i am having the same issues like above discussion.

I am running a high speed compressor blade simulation using rhoSimpleFoam and my pressure values are not getting converge. Also i am having strange pressure values as well.

U file

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

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

internalField uniform (0 0 0);

boundaryField
{
INLET
{
type pressureInletOutletVelocity;
value uniform $Uinlet;

//type freestreamVelocity;
//freestreamValue uniform $Uinlet;
//value uniform $Uinlet;

//type fixedValue;
//value uniform (147.37 180.89 0);
}

OUTLET
{
type inletOutlet;
inletValue uniform (0 0 0);
value $internalField;

//type zeroGradient;
}

CASCADE
{
type noSlip;
}

"(TOP|BOTTOM)"
{
type cyclicAMI;
}

frontAndBackPlanes
{
type empty;
}


}


// ************************************************** *********************** //
p file

Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2112 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


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

internalField uniform 97251;

boundaryField
{
INLET
{
//type freestreamPressure;
//freestreamValue uniform $pOut;

type totalPressure;
p0 uniform 115775;
value uniform 115775;

//type fixedValue;
//value uniform 84636.34;
}

OUTLET
{
type freestreamPressure;
freestreamValue $internalField;

//type fixedValue;
//value uniform 97251;
}

CASCADE
{
type zeroGradient;
}

"(TOP|BOTTOM)"
{
type cyclicAMI;
}

frontAndBackPlanes
{
type empty;
}
}


// ************************************************** *********************** //
fvScheme

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

ddtSchemes
{
default steadyState;
}

gradSchemes
{
default Gauss linear;

limited cellLimited Gauss linear 1;
grad(U) $limited;
grad(k) $limited;
grad(omega) $limited;
grad(subsetU) $limited;
}

divSchemes
{
default none;

div(phi,U) bounded Gauss linearUpwind limited;

energy bounded Gauss linearUpwind limited;
div(phi,e) $energy;
div(phi,K) $energy;
div(phi,Ekp) $energy;

turbulence bounded Gauss upwind;
div(phi,k) $turbulence;
div(phi,omega) $turbulence;

div(phid,p) Gauss upwind;
div((phi|interpolate(rho)),p) bounded Gauss upwind;

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

laplacianSchemes
{
default Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default corrected;
}

wallDist
{
method meshWave;
}


// ************************************************** *********************** //
fvSolution

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

solvers
{
p
{
solver GAMG;
smoother GaussSeidel;
tolerance 1e-6;
relTol 0.01;
}

"(U|k|omega|e)"
{
solver PBiCGStab;
preconditioner DILU;
tolerance 1e-6;
relTol 0.1;
}
}

SIMPLE
{
residualControl
{
p 1e-6;
U 1e-6;
"(k|omega|e)" 1e-6;
}

nNonOrthogonalCorrectors 2;
pMinFactor 0.1;
pMaxFactor 2;
}

relaxationFactors
{
fields
{
p 0.7;
rho 0.01;
}
equations
{
U 0.3;
e 0.7;
"(k|omega)" 0.7;
}
}


// ************************************************** *********************** //
I attached the values in the paper as well.


can someone help me on this
Attached Images
File Type: png paper values.PNG (39.3 KB, 19 views)
Sakun is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting from 1st order accuracy and continue to 2nd order accuracy elochana FLUENT 1 June 20, 2021 19:22
Time integration order of accuracy when solving acoustic wave equation using FEM lzhaok6 Main CFD Forum 20 May 3, 2017 12:22
rhoSimpleFoam angledDuctExplicitFixedCoeff tutorial fails in parallel donQi OpenFOAM Running, Solving & CFD 1 February 22, 2016 20:47
Temporal accuracy ganesh Main CFD Forum 0 February 29, 2008 06:32
accuracy of Discontinuous Galerkin Qu Kun Main CFD Forum 0 September 6, 2004 10:19


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