|
[Sponsors] |
Pressure rising indefinitely with rhoSimpleFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 16, 2015, 07:21 |
Pressure rising indefinitely with rhoSimpleFoam
|
#1 |
New Member
Join Date: Feb 2013
Posts: 17
Rep Power: 13 |
Hello,
I'm trying to simulate the flow in a conical annular gap with a rotating inner wall for my masters thesis. I'm using rhoSimpleFoam. My Problem is, that I can't get a converged solution. Even after 100.000 Iterations the pressure continues to rise slowly. Here are my boundary conditions, fvSolution and fvSchemes: Code:
| ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.2 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ 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 flowRateInletVelocity; massFlowRate constant 0.0038; //0.004167 value uniform (0 0 0); } OUTLET { type pressureInletOutletVelocity; value uniform (0 0 0); } SYM_1_OBEN { type cyclicAMI; } SYM_1_UNTEN { type cyclicAMI; } SYM_2_OBEN { type cyclicAMI; } SYM_2_UNTEN { type cyclicAMI; } MOVINGWALL_OBEN { type rotatingWallVelocity; origin (0 0 0); axis (1 0 0); omega 838; } MOVINGWALL_UNTEN { type rotatingWallVelocity; origin (0 0 0); axis (1 0 0); omega 838; } BOHRUNG { type fixedValue; value uniform (0 0 0); } WALL_OBEN { type fixedValue; value uniform (0 0 0); } WALL_UNTEN { type fixedValue; value uniform (0 0 0); } PLENUMWALL { type fixedValue; value uniform (0 0 0); } KEIL { type slip; } GAP_S { type fixedValue; value uniform (0 0 0); } GAB_W { type fixedValue; value uniform (0 0 0); } } Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.2 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 320000; boundaryField { INLET { type zeroGradient; } OUTLET { type fixedValue; value uniform 220000; } SYM_1_OBEN { type cyclicAMI; } SYM_1_UNTEN { type cyclicAMI; } SYM_2_OBEN { type cyclicAMI; } SYM_2_UNTEN { type cyclicAMI; } MOVINGWALL_OBEN { type zeroGradient; } MOVINGWALL_UNTEN { type zeroGradient; } BOHRUNG { type zeroGradient; } WALL_OBEN { type zeroGradient; } WALL_UNTEN { type zeroGradient; } PLENUMWALL { type zeroGradient; } KEIL { type zeroGradient; } GAP_S { type zeroGradient; } GAB_W { type zeroGradient; } } Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.2 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object T; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 1 0 0 0]; internalField uniform 360; boundaryField { INLET { type fixedValue; value $internalField; } OUTLET { type inletOutlet; inletValue $internalField; value $internalField; } SYM_1_OBEN { type cyclicAMI; } SYM_1_UNTEN { type cyclicAMI; } SYM_2_OBEN { type cyclicAMI; } SYM_2_UNTEN { type cyclicAMI; } MOVINGWALL_OBEN { type zeroGradient; } MOVINGWALL_UNTEN { type zeroGradient; } BOHRUNG { type zeroGradient; } WALL_UNTEN { type fixedValue; value $internalField; } WALL_OBEN { type fixedValue; value $internalField; } PLENUMWALL { type zeroGradient; } KEIL { type zeroGradient; } GAP_S { type zeroGradient; } GAB_W { type zeroGradient; } } Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.2 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { p { solver GAMG; tolerance 1e-7; //1e-8 relTol 0.05; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 2; cacheAgglomeration on; agglomerator faceAreaPair; nCellsInCoarsestLevel 100; mergeLevels 1; } U { solver smoothSolver; smoother GaussSeidel; nSweeps 2; tolerance 1e-07; ////1e-08 relTol 0.01; } h { solver PBiCG; preconditioner DILU; tolerance 1e-7; //1e-09 relTol 0.1; } "(k|omega)" { $U; tolerance 1e-07; relTol 0.1; } } SIMPLE { nNonOrthogonalCorrectors 2; rhoMin rhoMin [ 1 -3 0 0 0 ] 1.5; rhoMax rhoMax [ 1 -3 0 0 0 ] 7; // transonic true; residualControl { p 1e-6; U 1e-6; h 1e-6; // possibly check turbulence fields "(k|epsilon|omega)" 1e-6; } } relaxationFactors { fields { p 0.3; //0.1 rho 0.005; //0.05 } equations { U 0.7; //0.7 k 0.7; //0.7 omega 0.7; //0.7 h 0.7; //0.7 } } Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.2 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default steadyState; } gradSchemes { default Gauss linear;//cellLimited Gauss linear 1.0; // Gauss linear; } divSchemes { default bounded Gauss upwind; div(phi,U) bounded Gauss upwind;//bounded Gauss upwind; div((muEff*dev2(T(grad(U))))) Gauss linear; div(phi,e) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; div(phi,omega) bounded Gauss upwind; div(phi,Ekp) bounded Gauss upwind; } laplacianSchemes { default Gauss linear corrected;//Gauss linear limited 0.5; //Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; //limited 0.5; } fluxRequired { default no; p ; } // ************************************************************************* // I really hope, that someone can give me any hints, what I can do to stabilize my solution. Thank you in advance! If you need any additional information, feel free to ask edit: One problem that I've found is, that the enthalpy is converging very slowly. I've attached a gnuplot graph with my residuals. Could this be the cause of my problems? If so, what can I do about it? |
|
April 16, 2015, 17:12 |
|
#2 |
New Member
N/A
Join Date: Jul 2010
Posts: 29
Rep Power: 16 |
Hello:
Your enthalpy converges slowly because the pressure is constantly rising. H = U + pV So, this comes to the pressure formulation. rhoSimpleFoam is for compressible fluids and the SIMPLE method does iterate pretty slowly between the pressure and velocity fields, so with your configuration, this is something you'll have to live with. However, I would recommend a few changes: 1) Use rhoPimpleFoam with time-dependent solver. This will usually converged far more quickly, especially for your case. 2) Use a "totalPressure" inlet pressure condition. This will alleviate some constraints on forcing a uniform pressure field. 3) A "fixedFluxPressure" with gradient = 0, on the outlet. This again, helps a bit by giving the pressure solver a bit of flexibility on the boundary. |
|
April 16, 2015, 17:43 |
|
#3 |
New Member
Join Date: Feb 2013
Posts: 17
Rep Power: 13 |
Thank you for your answer. Regarding your suggestions:
1) I already use rhoPimpleFoam with some succes. However, the goal of my thesis is to compare the results of a transient and a stationary simulation. Therefore, I can't abandon rhoSimpleFoam. 2) I have no experience with the totalPressure boundary condition in OpenFoam. What would be the corresponding boundary condition in the velocity field? Still "flowRateInletVelocity" or would I have to change it to "zeroGradient"? 3) Basically the same questions as in 2). I have never used this boundary condition before. How do I use it? If I look in the code it says, that it sets the pressure gradient so, that it corrsponds to the flux specified in the velocity boundary condition. Does this mean, that I have to set the velocity boundary to simething like "flowRateInletVelocity"? |
|
April 17, 2015, 00:42 |
|
#4 |
New Member
N/A
Join Date: Jul 2010
Posts: 29
Rep Power: 16 |
I see. You may consider initializing with your other simulation using mapFieldsDict. This can get your pressure field closer to the steady-state condition, then let the steady-state solver do it's pseudo-magic. Still, you're going to have to let the steady-state solver takes its time - the system is very stiff and the only other option is to play with your relation and preconditioners to attempt to accelerated the convergence.
Both of your questions are valid. You would need to set your velocity boundary conditions to ensure continuity and help address the stiffness of the system of equations. Depending on your physical boundaries, you might not need to be so strict; however, I would correspondingly set your intlet and outlet to flowRateInletVelocity and pressureInletOutletVelocity, respectively, where the outlet vector would simply be (0 0 0). |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pressure Inlet VS velocity Inlet difference | Mohsin | FLUENT | 9 | January 4, 2021 11:34 |
Pressure Outlet Guage pressure | Mohsin | FLUENT | 36 | April 29, 2016 18:16 |
Calculation of the Governing Equations | Mihail | CFX | 7 | September 7, 2014 07:27 |
Fluent natural ventilation pressure boundary condition | pierresandre | FLUENT | 24 | November 8, 2011 15:32 |
pressure is not rising in compression stroke.. | chetan | CFX | 0 | June 17, 2008 04:13 |