
[Sponsors] 
January 8, 2013, 11:41 
how to modify fvScheme to converge?

#1 
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 19 
hi
if i want to obtain more stability for not to diverge what modifications is better to perform on fvSchemes and what schemes is better to change? my fvscheme is such: Code:
fluxScheme Kurganov; ddtSchemes { default none; ddt(rho) Euler; ddt(rhoU) Euler; ddt(rhoE) Euler; ddt(rho,U) Euler; ddt(rho,e) Euler; ddt(rho,omega) Euler; ddt(rho,k) Euler; } gradSchemes { default none; grad(U) Gauss linear; grad(rho) Gauss linear; grad(rhoU) Gauss linear; grad((1psi)) Gauss linear; grad(e) Gauss linear; grad(sqrt(((CpCv)*(1psi)))) Gauss linear; grad(c) Gauss linear;// grad(c) Gauss linear; grad(T) Gauss linear; grad(omega) Gauss linear; grad(k) Gauss linear; } divSchemes { default none; div(tauMC) Gauss linear; div(phi) Gauss linear; div(phi,omega) Gauss linear; div(phi,k) Gauss linear; div(phiEp) Gauss linaer;//div(phiEp) Gauss linaer; div(phiUp) Gauss linear;//div(phiUp) Gauss linear; div(sigmaDotU) Gauss linear;//div(sigmaDotU) Gauss linear; } laplacianSchemes { default none; laplacian(muEff,U) Gauss linear corrected; laplacian(alphaEff,e) Gauss linear corrected; laplacian(alpha,e) Gauss linear corrected; laplacian(k,T) Gauss linear corrected; laplacian(DepsilonEff,omega) Gauss linear corrected; laplacian(DkEff,k) Gauss linear corrected; laplacian(DomegaEff,omega) Gauss linear corrected; } interpolationSchemes { default none; reconstruct(rho) vanLeer; reconstruct(U) vanLeerV; reconstruct(T) vanLeer; interpolate(rho) linear; interpolate(U) linear; interpolate(T) linear;//interpolate(T) linear; interpolate(e) linear;//interpolate(e) linear; interpolate(c) linear;//interpolate(c) linear; interpolate(rhoU) linear; interpolate(rPsi) linear;//interpolate(rPsi) linear; interpolate(muEff) linear; interpolate(tauMC) linear; } snGradSchemes { default none; snGrad(U) corrected; } // ************************************************************************* // 

January 8, 2013, 13:03 

#2 
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 728
Rep Power: 20 
It really depends on your solver, case, mesh and accuracy needs. In other words its unique to your case. What type of simulation are you running?


January 8, 2013, 13:23 

#3 
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 19 
thanks.unsteady compressible one.


January 9, 2013, 05:24 

#4 
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 19 
is upwind more stable?how to set it to fvScheme sentences?


January 9, 2013, 08:28 

#5 
New Member
Traib
Join Date: Sep 2012
Posts: 27
Rep Power: 6 
Hi ehsan,
How is your work going? Like Marco said, it depends largely on your particular problem. For compressible cases, linear interpolation schemes are not always applicable, while upwind schemes are generally good choices. For better convergence for scalars, you can use TVD schemes with a coefficient e.g. limitedLinear 1.0, limitedVanLeer 1.0, etc. Also, use relaxationFactors in fvSolution dictionary to control the values' changes. That's the basic, but of course mostly depends on any particular case. Sometimes you need to make sure the courant number is not too low, and of course not too high. You can try schemes other than linear interpolation schemes in divergence schemes [especially those with flux 'phi'] as well as for interpolation schemes and see how it works. Regards, Traib 

January 9, 2013, 10:48 

#6 
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 19 
hello dear friend Traib and thank you for your nice and complete reply.
I'm working on "Wave Rotor" simulation.imagine a tube with length of .069m and .004m in height.it is 2D a rectangle like shock tube.but the smaller sides are opening to environment so that each one gradually open from wall to that environment and then wall again and again to another environment.its an interesting simple device for increasing gas turbines efficiency.however if the errors end I can end my thesis! when used limitedVanLeer this error showed,what may be the cause.did i use it wrong?thank you very much dear Traib. Create mesh for time = 0 Reading thermophysical properties Selecting thermodynamics package ePsiThermo<pureMixture<constTransport<specieThermo <hConstThermo<perfectGas>>>>> Reading field U > FOAM FATAL IO ERROR: Unknown discretisation scheme limitedVanLeer Valid schemes are : 59 ( Gamma GammaV LUST MUSCL MUSCLV Minmod MinmodV OSPRE OSPREV Phi QUICK QUICKV SFCD SFCDV SuperBee SuperBeeV UMIST UMISTV biLinearFit blended clippedLinear cubic cubicUpwindFit downwind filteredLinear filteredLinear2 filteredLinear2V filteredLinear3 filteredLinear3V fixedBlended limitWith limitedCubic limitedCubicV limitedLinear limitedLinearV limiterBlended linear linearFit linearPureUpwindFit linearUpwind linearUpwindV localBlended localMax localMin midPoint outletStabilised pointLinear quadraticFit quadraticLinearFit quadraticLinearUpwindFit quadraticUpwindFit reverseLinear skewCorrected upwind vanAlbada vanAlbadaV vanLeer vanLeerV weighted ) file: /home/thesis/Desktop/WR_1/system/fvSchemes::interpolationSchemes::interpolate(rhoU) at line 84. From function surfaceInterpolationScheme<Type>::New(const fvMesh&, Istream&) in file /home/opencfd/OpenFOAM/OpenFOAM2.1.0/src/finiteVolume/lnInclude/surfaceInterpolationScheme.C at line 82. FOAM exiting 

January 9, 2013, 10:53 

#7 
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 19 
when I changed to limitedLinear 1.0 and limitedLinearV 1.0 an error again appeared.
Code:
fluxScheme Kurganov; ddtSchemes { default none; ddt(rho) Euler; ddt(rhoU) Euler; ddt(rhoE) Euler; ddt(rho,U) Euler; ddt(rho,e) Euler; ddt(rho,omega) Euler; ddt(rho,k) Euler; } gradSchemes { default none; grad(U) Gauss upwind; grad(rho) Gauss upwind; grad(rhoU) Gauss upwind; grad((1psi)) Gauss upwind; grad(e) Gauss Gauss upwind; grad(sqrt(((CpCv)*(1psi)))) Gauss upwind; // grad(c) Gauss upwind; grad(T) Gauss upwind; grad(omega) Gauss upwind; grad(k) Gauss upwind; } divSchemes { default none; div(tauMC) Gauss upwind; div(phi) Gauss upwind; div(phi,omega) Gauss upwind; div(phi,k) Gauss upwind; //div(phiEp) Gauss upwind; //div(phiUp) Gauss upwind; //div(sigmaDotU) Gauss upwind; } laplacianSchemes { default none; laplacian(muEff,U) Gauss upwind; laplacian(alphaEff,e) Gauss upwind; laplacian(alpha,e) Gauss upwind; laplacian(k,T) Gauss upwind; laplacian(DepsilonEff,omega) Gauss upwind; laplacian(DkEff,k) Gauss upwind; laplacian(DomegaEff,omega) Gauss upwind; } interpolationSchemes { default none; reconstruct(rho) limitedLinear 1.0; reconstruct(U) limitedLinearV 1.0; reconstruct(T) limitedLinear 1.0; interpolate(rho) limitedLinear 1.0; interpolate(U) limitedLinearV 1.0; interpolate(T) limitedLinear 1.0; //interpolate(e) limitedLinear 1.0; //interpolate(c) limitedLinear 1.0; interpolate(rhoU) limitedLinear 1.0; //interpolate(rPsi) limitedLinear 1.0; interpolate(muEff) limitedLinear 1.0; interpolate(tauMC) limitedLinear 1.0; } snGradSchemes { default none; snGrad(U) corrected; } Code:
Selecting thermodynamics package ePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>> Reading field U > FOAM FATAL IO ERROR: wrong token type  expected word, found on line 83 the doubleScalar 1 file: /home/thesis/Desktop/WR_1/system/fvSchemes::interpolationSchemes::interpolate(rhoU) at line 83. From function operator>>(Istream&, word&) in file primitives/strings/word/wordIO.C at line 74. FOAM exiting 

January 9, 2013, 13:55 

#8 
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 728
Rep Power: 20 
Ehsan, these errors occur either because OpenFOAM does not recognize the scheme you have selected and is offering alternatives. Trying to select randomly from previous ones won't be of much use, so it is best to be systematic. It seems you are quite new to CFD in general and OpenFOAM in particular, which is fine. That just means you have to work a little harder to understand the underlying theory.
CFD Online has a list of good resources, including online courses in CFD http://www.cfdonline.com/Links/educ...#onlinecourses 

January 9, 2013, 14:05 

#9 
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 19 
thanks dear Marco.what are you meaning?! I just changed second order terms into first order upwind.please say more speciefic what terms are incorrect or could be better to change?change to what?I want more stability.
thank you very much taking your time. 

January 10, 2013, 23:27 

#10 
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 19 
any idea??!!


January 11, 2013, 14:56 

#11 
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 728
Rep Power: 20 
Unfortunately I can't advise you further as tuning your fvSchemes would require me to see your results over several runs, which I don't have time for and would be difficult through the forum. This is one of those areas where research and experience come into play. You'll have to do some reading; start here:
http://en.wikipedia.org/wiki/Numeric...tial_equations Good luck! 

January 15, 2013, 12:29 

#12 
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 19 
my fvScheme is as below.please anyone say to me what schemes is better to change (to upwind for example) for more stability.may case is unstedy and compressible and the solver is rhoPimpleFoam.its a tube with varying with time side boundary conditions.
thank you. Code:
FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default Euler; } gradSchemes { default Gauss linear; grad(p) Gauss linear; } divSchemes { default none; div(phi,U) Gauss limitedLinearV 1; div(phid,p) Gauss limitedLinear 1; div(phi,K) Gauss linear; div(phi,h) Gauss limitedLinear 1; div(phi,k) Gauss limitedLinear 1; div(phi,epsilon) Gauss limitedLinear 1; div(phi,R) Gauss limitedLinear 1; div(phi,omega) Gauss limitedLinear 1; div((rho*R)) Gauss linear; div(R) Gauss linear; div(U) Gauss linear; div((muEff*dev2(T(grad(U))))) Gauss linear; div(tauMC) Gauss linear; } laplacianSchemes { default none; laplacian(muEff,U) Gauss linear corrected; laplacian(mut,U) Gauss linear corrected; laplacian(DkEff,k) Gauss linear corrected; laplacian(DepsilonEff,epsilon) Gauss linear corrected; laplacian(DREff,R) Gauss linear corrected; laplacian(DomegaEff,omega) Gauss linear corrected; laplacian((rho*(1A(U))),p) Gauss linear corrected; laplacian(alphaEff,h) Gauss linear corrected; laplacian(k,T) Gauss linear corrected; laplacian(alpha,e) Gauss linear corrected; laplacian(alphaEff,e) Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } fluxRequired { default no; p ; } Last edited by immortality; January 15, 2013 at 13:30. 

January 15, 2013, 13:15 

#13 
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 728
Rep Power: 20 
Ehsan, your CODE tags are not working properly. To see how they are supposed to work, select a portion of the post you want to enclose in code, then select the formatting button with a # symbol. The tooltip that should come up is "Wrap [CODE] tags around selected text". Right now it is not appearing properly.


January 15, 2013, 19:16 

#14 
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 19 
i corrected it.sorry.


January 16, 2013, 09:52 

#15 
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 19 
any hint or comment?please say it!


January 16, 2013, 14:06 

#16 
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 728
Rep Power: 20 
Ehsan, asking for replies does not mean you will receive them sooner. There are rules of etiquiette that should be followed. I know you are in a difficult situation, but by following good practice the chances of getting a good answer are greatly enhanced:
http://www.cfdonline.com/Forums/ope...gethelp.html If you look into what the schemes available are (check the user guide section 4.4), you will be able to make better decisions about the type of schemes you should be choosing. However, you should make sure that it isn't your boundary conditions or initial conditions that are causing problems. It is very dependant on your case setup, mesh, and the physics you are simulating. If you treat CFD like a black box, you will spend a lot of time frustrated at what seem like random errors and difficulties. Learn the underlying framework and things will make more sense. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
how to set periodic boundary conditions  Ganesh  FLUENT  13  January 22, 2014 05:11 
How to modify fvScheme automatically inside the code?  matteoL  OpenFOAM Running, Solving & CFD  2  July 27, 2011 18:31 
fluent add additional zones for the mesh file  SSL  FLUENT  2  January 26, 2008 12:55 
HELP !In relaxtion factor converge is taken or not  MANOJ KUMAR  FLUENT  5  September 22, 2005 04:16 
Converge problem for multiphase flow  Jen  FLUENT  4  July 20, 2005 16:52 