fvschemes and fvsolutions in MRFSimpleFoam
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 
Hi Jennifer,
You could try to decrease the relaxation factor of k and epsilon and check that the time step is small enough. 
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 
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; 
Hi Renyun:
would you mind show me the information of last iteration ? i mean which one is first go to diverge. 
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 
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 
Quote:

http://www.cfdonline.com/Forums/C:\...9;名.pnghello 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: 
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. 
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! 
1 Attachment(s)
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. 
MRFSimpleFoam divergence
3 Attachment(s)
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 
2 Attachment(s)
Quote:
Also, run checkMesh on your grid to check its quality. Best, 
MRFSimpleFoam issue
1 Attachment(s)
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 
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, 
Quote:

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. :) 
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! 
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? 
All times are GMT 4. The time now is 07:05. 