
[Sponsors] 
November 24, 2009, 10:07 
fvschemes and fvsolutions in MRFSimpleFoam

#1 
Member
任芸
Join Date: Jun 2009
Posts: 75
Rep Power: 8 
hi all,
i use MRFSimplefoam to study a centrifugal pump impeller study.the problem is :after several steps of iterations,i have a Floating exception error,due to the fast increase in epsilon and k values.during the calculation,i keep the fvschemes and fvsolutions unchanged,so i guess they maybe the cause to divergenced. fvschemes: FoamFile { version 2.0; format ascii; class dictionary; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default steadyState; } gradSchemes { default Gauss linear; grad(p) Gauss linear; grad(U) Gauss linear; } divSchemes { default none; div(phi,U) Gauss limitedLinearV 1; div(phi,k) Gauss limitedLinear 1; div(phi,epsilon) Gauss limitedLinear 1; div((nuEff*dev(grad(U).T()))) Gauss linear; } laplacianSchemes { default none; laplacian(nuEff,U) Gauss linear corrected; laplacian((1A(U)),p) Gauss linear corrected; laplacian(DkEff,k) Gauss linear corrected; laplacian(DepsilonEff,epsilon) Gauss linear corrected; } interpolationSchemes { default linear; interpolate(U) linear; } snGradSchemes { default corrected; } fluxRequired { default no; p; } // ************************************************** *********************** // fvsolutions: FoamFile { version 2.0; format ascii; class dictionary; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { p GAMG { tolerance 1e8; relTol 0.05; smoother GaussSeidel; cacheAgglomeration true; nCellsInCoarsestLevel 20; agglomerator faceAreaPair; mergeLevels 1; }; U smoothSolver { smoother GaussSeidel; nSweeps 2; tolerance 1e7; relTol 0.1; }; k smoothSolver { smoother GaussSeidel; nSweeps 2; tolerance 1e7; relTol 0.1; }; epsilon smoothSolver { smoother GaussSeidel; nSweeps 2; tolerance 1e7; relTol 0.1; }; } SIMPLE { nNonOrthogonalCorrectors 0; pRefCell 0; pRefValue 0; } relaxationFactors { p 0.3; U 0.5; k 0.5; epsilon 0.5; } // ************************************************** *********************** // could you please tell me how can i resolve it? thank you yours jennifer 

November 25, 2009, 03:24 

#2 
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 9 
Hi Jennifer,
You could try to decrease the relaxation factor of k and epsilon and check that the time step is small enough.
__________________
Regards, Gijs 

November 25, 2009, 08:37 

#3 
Member
任芸
Join Date: Jun 2009
Posts: 75
Rep Power: 8 
thank you Gijs,
after i change the relaxation factor 0.25 for turbulence properties.0.5 for velocity, 0.1 for pressure,and it iterate more steps than before.but it divergenced at last ,also due to the fast increase in epsilon and k values. appreciate! jennifer 

November 25, 2009, 10:31 

#4 
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 9 
You're very welcome, glad to help. Another thing may be the number of cells in the coarsest level for the pressure solver. In the tutorials this is usually some low number because the grid is commonly good. If you have a more complex grid with some weird and/or skewed cells it works to increase that number, that is increase
Code:
nCellsInCoarsestLevel 20; Code:
nCellsInCoarsestLevel 500;
__________________
Regards, Gijs 

November 25, 2009, 11:28 

#5 
Senior Member

Hi Renyun:
would you mind show me the information of last iteration ? i mean which one is first go to diverge. 

November 25, 2009, 23:30 

#6  
Member
任芸
Join Date: Jun 2009
Posts: 75
Rep Power: 8 
Quote:
the last iteration is as follows: Time = 16 smoothSolver: Solving for Ux, Initial residual = 0.0146841, Final residual = 0.00071266, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 0.00278712, Final residual = 0.00015971, No Iterations 2 smoothSolver: Solving for Uz, Initial residual = 0.000257914, Final residual = 3.3909e06, No Iterations 2 GAMG: Solving for p, Initial residual = 4.86694e06, Final residual = 1.07195e07, No Iterations 2 time step continuity errors : sum local = 2.70395e+23, global = 8.88956e+22, cumulative = 8.88956e+22 smoothSolver: Solving for epsilon, Initial residual = 1, Final residual = 0.00258025, No Iterations 2 bounding epsilon, min: 2.59328e+36 max: 9.99446e+45 average: 2.25125e+40 smoothSolver: Solving for k, Initial residual = 0.00087545, Final residual = 8.77668e07, No Iterations 2 bounding k, min: 7.27788e+35 max: 2.9925e+38 average: 6.85609e+32 ExecutionTime = 575.49 s ClockTime = 588 s after the 17th step ,it divergenced! several days ago,i have a structured impeller meshed in CFX calculated by MRFSimpleFoam.but it divergenced again,so i guess there maybe something wrong with my setup,could you mind to help me? regards！ renyun 

November 26, 2009, 03:51 

#7 
Member
Join Date: Nov 2009
Posts: 34
Rep Power: 8 
Hi Renyun,
I would try to start with simple Upwind for turbulence first: So: div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div((nuEff*dev(grad(U).T()))) Gauss upwind; And than switch to higher order schemes maybe later. But from my experience this is often not needed for turbulence to use higher order schemens, but of course for div(phi,U). Also I think that in Simple alg. the underrelaxation for U+p should be "1". So maybe it helps to adapt the underrelaxation. Hope this helps. Stawrogin 

November 26, 2009, 03:52 

#8  
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 9 
Quote:
__________________
Regards, Gijs 

November 26, 2009, 04:55 

#9 
Member
任芸
Join Date: Jun 2009
Posts: 75
Rep Power: 8 
hello Gijs,
the epsilon and k initial values are: FoamFile { version 2.0; format ascii; class volScalarField; object epsilon; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 3 0 0 0 0]; internalField uniform 0.45; boundaryField { wall { type zeroGradient; } Outlet { type zeroGradient; } Inlet { type fixedValue; value uniform 0.45; } } FoamFile { version 2.0; format ascii; class volScalarField; object k; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 2 0 0 0 0]; internalField uniform 0.09; boundaryField { wall { type zeroGradient; } Outlet { type zeroGradient; } Inlet { type fixedValue; value uniform 0.09; } } by the way,the values of k and epsilon calculate by the following eaquations: Last edited by renyun0511; November 26, 2009 at 07:38. 

November 26, 2009, 05:20 

#10 
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 9 
Hi Renyun,
Usually it helps to have the k and epsilon values for the internalField lower (by, say, a factor of 10) than the inlet values. Also, I'd try to play a bit with the schemes, as stawrogin suggests.
__________________
Regards, Gijs 

November 26, 2009, 22:09 

#11  
Member
任芸
Join Date: Jun 2009
Posts: 75
Rep Power: 8 
Quote:
i can continue the calculation after adopting your advice.As you known,the problem has puzzled me since two months ago.it is indeed a good news to me that it's not divergenced again!i am extremely grateful to you,and to all people helped me. and there are some problem : 1.the original divSchemes set is: divSchemes { default none; div(phi,U) Gauss limitedLinearV 1; div(phi,k) Gauss limitedLinear 1; div(phi,epsilon) Gauss limitedLinear 1; div((nuEff*dev(grad(U).T()))) Gauss linear; } i don't know the difference between Gauss upwind and Gauss limitedLinear.why is Gauss?and which in Fluent is one/two order upwind(i know). 2.in Simple alg. why the underrelaxation for U+p should be "1"? the following i changed is： relaxationFactors { p 0.3; U 0.5; k 0.5; epsilon 0.5; } yours jennifer appreciate! 

May 17, 2011, 02:48 

#12 
Member
Kurne
Join Date: Aug 2010
Location: Pune, INDIA
Posts: 88
Rep Power: 7 
Dear 任芸
I am facing similar problem what u have face and mentioned here. I have followed the guidance mentioned by stawrogin but still i am facing same problem.Will u please guide me. I have attached my fvschemes & fvsolutions here.Please Help. Will you please help me.
__________________
Simulation Is Determination Of Imagination Towards Approximation ® Best Regards Mubeen K Kurne 

June 25, 2011, 06:36 
MRFSimpleFoam divergence

#13  
Member
Aldo Iannetti
Join Date: Feb 2010
Posts: 48
Rep Power: 7 
Quote:
I'm facing an issue using MRFSimpleFoam simulting a centrifugal pump, I see the divergence just when the residual seem to come low enough to think to be out of problems, have a kook to the image, (p residual is missing but it behaves just like the others). The divergence occurs within 2 iteration only and I'm not able to understand which field causes the problem, here attached fvSchemes and fvSolution. Thanks Aldo 

June 26, 2011, 02:55 

#14  
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,904
Rep Power: 26 
Quote:
Also, run checkMesh on your grid to check its quality. Best,
__________________
Alberto Passalacqua GeekoCFD  A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

June 26, 2011, 04:02 
MRFSimpleFoam issue

#15  
Member
Aldo Iannetti
Join Date: Feb 2010
Posts: 48
Rep Power: 7 
Quote:
Here attached the setup files, I've tried to remesh the domain and (since the last post was about a GGI interface mesh using OpenFOAM 1.6 ext) tried to use OF 1.7.1 without GGI (even if I need it for the next simulations). Now I'm facing convergence but with a very strange problem: I see that the solutor has imposed a 0 velocity in the inlet BC even if I set up a 3.9 m/s vel. 1) Why is that? 2) Can I set up different BC? 3) Have I miss something? 4) Can GGI be the cause of the sudden divergence I mentioned in the last post? (checking GGI mesh had no problem) Thanks Aldo 

June 26, 2011, 04:18 

#16 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,904
Rep Power: 26 
From your figure, it seems you impose U tangentially at the inlet, since the inlet seems parallel to z, and your velocity at the inlet is parallel to z.
Also, the case is not complete. I do not have experience with GGI, so I cannot answer to the rest. Best,
__________________
Alberto Passalacqua GeekoCFD  A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

June 26, 2011, 04:27 

#17 
Member
Aldo Iannetti
Join Date: Feb 2010
Posts: 48
Rep Power: 7 
I just had a look to the case and I'm sure the inlet is perpendicular to the z axis and I've imposed a +z velocity of 3.9 m/s. Do You think using a mass flow inlet BC would be lucky enough to ensure the velocity at inlet of 3.9 m/s? Why can't it keep the velocity I've imposed? Is it allowed to do that?


June 26, 2011, 04:36 

#18 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,904
Rep Power: 26 
Hi,
no, with a fixedValue BC, the code does not change the BC at all. You probably have some problem elsewhere. P.S. If you look at the figure WaterPump.jpg in your attachment, the inlet does not seem perpendicular to z. :)
__________________
Alberto Passalacqua GeekoCFD  A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

June 26, 2011, 20:42 

#19  
Member
任芸
Join Date: Jun 2009
Posts: 75
Rep Power: 8 
Quote:
From the picture of your pump model and the setup of your case, i guess may your problem is that you ingored the setup of GGI. The rotating impeller and stationary volute need to be coupled and GGI does work. Additionally, the residuals seem not converged. so i suggest you can reset your fvsolution file. eg. relaxationFactors { p 0.5; U 0.5; k 0.3; epsilon 0.3; } Good luck! 

August 1, 2011, 08:35 

#20 
New Member
Suhas
Join Date: Jul 2011
Location: Pune
Posts: 20
Rep Power: 6 
hi foamers,
please tell me that is ggi boundary conditions work with OF 1.7.1? and for my pump case i am converting star ccm+ mesh file i.e. .ccm file. There is one wrongOrientedFace while doing checkMesh. if anybody know how to solve this then help me. or what are the precaustions to be taken while importing ccm+ file to OF 1.7.1. to useful for MRFSimpleFoam? 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
General help for fvSchemes and fvSolution settings  harly  OpenFOAM Running, Solving & CFD  4  September 7, 2009 10:31 