
[Sponsors] 
September 5, 2012, 18:47 
Dicretization schemes in LES (pitzDaily)

#1 
Senior Member

Hallo Foamers,
I am trying to do a compressible LES simulation of a cylinder at Re=10,000. And I am very confused about the fvSchemes settings in openfoam. I have read it in many places that upwind schemes must be avoided as they are highly dissipative. Now I come to my question, in "tutorials/compressible/rhoPimpleFoam/les/pitzDaily" some divergence schemes are given as: div(phi,U) Gauss filteredLinear2V 0.2 0; div(phi,h) Gauss filteredLinear2 0.2 0; Openfoam documentation says " filteredLinear2  Linear with filtering for highfrequency ringing" I have 2 questions: 1Well I don't know how would this effect the results if I simply select limitedLinear for div(phi,U) and div(phi,h)? 2If I choose filteredLinear2 then what does the two numbers specify (i.e. 0.2 0) and how should I choose them? Any help would be welcomed. If somebody could give me a pointer where I could read more about it, I would be very happy. And if somebody could help me or guide me about setting fvSchemes specifically for LES I would be the happiest man on earth for some time. Regards, Awais 

September 6, 2012, 05:25 

#2 
Senior Member
Julien
Join Date: Jun 2012
Location: France
Posts: 152
Rep Power: 6 
Hi,
My divSchemes are Gauss linear in general, but for div(phi,U) which is Gauss linearUpwindV grad(U); . By the way, I don't know why I am using this!!! What I know is that the spatial schemes have to be centered; and the temporal scheme has to be of 2nd order (CrankNicholson 1/2 or Backward) (cf university of Chalmers). Eugene DeVillier promotes the use of Backward but I am not sure it is a good idea with large time steps. 'hope thie little things could help you... 

September 6, 2012, 09:18 

#3  
Senior Member

Quote:
My point of view is that using upwind schemes would produce high Dissipation so may be you should avoid using linearUpwind for grad(U) and instead simply use Gauss Linear for grad. What is confusing for me is that how should we use filteredLinear and filteredLinearV, and when should we use them, because they are used in LES tutorials in openFoam specially for div(phi,U) and div(phi,h). So if you have any idea about it?. Regards, Awais 

September 26, 2012, 05:36 

#4 
Senior Member
Julien
Join Date: Jun 2012
Location: France
Posts: 152
Rep Power: 6 
Hi Owayz,
I agree with you: I have red that upWind schemes were "forbidden" in LES cases because thay add viscosity. So I tried to change my scheme, replacing div(phi,U) Gauss linearUpwindV grad(U); by div(phi,U) Gauss linear; But now, that DOES NOT WORK AT ALL! The flow is awful , the mesh appears: So I prefer to keep Gauss linearUpwindV grad(U);. Nevertheless, this thread (http://www.cfdonline.com/Forums/openfoambugs/62534problemfvschemesdivschemescannotusegausslinearupwind.html) is about fvSchemes in general. maybe there is some of your answers? Last edited by Djub; October 1, 2012 at 09:01. Reason: to add the picture 

September 26, 2012, 09:16 

#5 
Senior Member

Hi Djub
Well, it could be the problem with flow convergence or mesh refinement. Actually I tried linear scheme for all my terms (i.e. div, laplacian, grad) in fvSchemes and it works for me. May be you can share your case? regards, Awais 

September 26, 2012, 09:27 

#6 
Senior Member
Julien
Join Date: Jun 2012
Location: France
Posts: 152
Rep Power: 6 
What do you mean by sharing my case? Do you want all my dictionnaries ?


September 26, 2012, 14:01 

#7 
Senior Member

Yes share the dictionary files, and if possible mesh as well.
Regards, Awais 

September 27, 2012, 04:48 

#8 
Senior Member
Julien
Join Date: Jun 2012
Location: France
Posts: 152
Rep Power: 6 
Whoua... Let's go:
constant\polyMesh\blockMeshDict Code:
vertices ( (1 .7 0) (.2 .7 0) (.2 .7 0) (1 .7 0) (3 .7 0) (1 .05 0) (.2 .05 0) (.2 .05 0) (1 .05 0) (3 .05 0) (1 .05 0) (.2 .05 0) (.2 .05 0) (1 .05 0) (3 .05 0) (1 .7 0) (.2 .7 0) (.2 .7 0) (1 .7 0) (3 .7 0) (1 .7 .49) (.2 .7 .49) (.2 .7 .49) (1 .7 .49) (3 .7 .49) (1 .05 .49) (.2 .05 .49) (.2 .05 .49) (1 .05 .49) (3 .05 .49) (1 .05 .49) (.2 .05 .49) (.2 .05 .49) (1 .05 .49) (3 .05 .49) (1 .7 .49) (.2 .7 .49) (.2 .7 .49) (1 .7 .49) (3 .7 .49) ); blocks ( hex (0 1 6 5 20 21 26 25) (56 45 25) simpleGrading (.50 .5 1) hex (1 2 7 6 21 22 27 26) (40 45 25) simpleGrading ( 1 .5 1) hex (2 3 8 7 22 23 28 27) (56 45 25) simpleGrading ( 2 .5 1) hex (3 4 9 8 23 24 29 28) (62 45 25) simpleGrading (2.5 .5 1) hex (5 6 11 10 25 26 31 30) (56 10 25) simpleGrading (.5 1 1) hex (7 8 13 12 27 28 33 32) (56 10 25) simpleGrading ( 2 1 1) hex (8 9 14 13 28 29 34 33) (62 10 25) simpleGrading (2.5 1 1) hex (10 11 16 15 30 31 36 35) (56 45 25) simpleGrading (.50 2 1) hex (11 12 17 16 31 32 37 36) (40 45 25) simpleGrading ( 1 2 1) hex (12 13 18 17 32 33 38 37) (56 45 25) simpleGrading ( 2 2 1) hex (13 14 19 18 33 34 39 38) (62 45 25) simpleGrading (2.5 2 1) ); edges (); boundary ( flux_entrant { type inlet; faces ( (0 20 25 5) (5 25 30 10) (10 30 35 15) ); } flux_sortant { type outlet ; faces ( (4 9 29 24) (9 14 34 29) (14 19 39 34) ); } le_sol { type wall ; faces ( (0 1 21 20) (1 2 22 21) (2 3 23 22) (3 4 24 23) ); } le_plafond { type wall ; faces ( (15 35 36 16) (16 36 37 17) (17 37 38 18) (18 38 39 19) ); } Mur_gauche { type wall ; faces ( (5 6 1 0) (6 7 2 1) (7 8 3 2) (8 9 4 3) (10 11 6 5) (12 13 8 7) (13 14 9 8) (15 16 11 10) (16 17 12 11) (17 18 13 12) (18 19 14 13) ); } Mur_droit { type symmetryPlane ; faces ( (25 20 21 26) (26 21 22 27) (27 22 23 28) (28 23 24 29) (30 25 26 31) (32 27 28 33) (33 28 29 34) (35 30 31 36) (36 31 32 37) (37 32 33 38) (38 33 34 39) ); } le_cylindre { type wall ; faces ( (7 6 26 27) (12 7 27 32) (11 12 32 31) (6 11 31 26) ); } ); mergePatchPairs (); constant\LESProperties Code:
LESModel Smagorinsky; delta cubeRootVol; printCoeffs on; cubeRootVolCoeffs { deltaCoeff 1; } Code:
application pimpleFoam; startFrom latestTime; startTime 0; stopAt endTime; endTime 150; deltaT .001; adjustTimeStep yes ; maxCo 10 ; maxDeltaT .1 ; writeControl timeStep; writeInterval 1; purgeWrite 20; writeFormat binary; writePrecision 6; writeCompression off; timeFormat general; timePrecision 8; runTimeModifiable true; Code:
ddtSchemes{ default CrankNicholson .5; } gradSchemes{ default Gauss linear; grad(U) cellLimited Gauss linear 1; } divSchemes{ default none; div(phi,U) Gauss linearUpwindV grad(U); OR Gauss linear; div((nuEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes{ default none; laplacian(nuEff,U) Gauss linear corrected; laplacian((1A(U)),p) Gauss linear corrected; interpolationSchemes{ default linear;} snGradSchemes{ default corrected;} fluxRequired{ default no; p ;} solvers{ p { solver PCG; preconditioner DIC; tolerance 1e06; relTol 0.01; } pFinal { solver PCG; preconditioner DIC; tolerance 1e06; relTol 0; } U { solver PBiCG; preconditioner DILU; tolerance 1e05; relTol 0; } U final { solver PBiCG; preconditioner DILU; tolerance 1e05; relTol 0; } } PIMPLE { nOuterCorrectors 2; nCorrectors 2; nNonOrthogonalCorrectors 1; pRefCell 0; pRefValue 0; } cache { grad(U) ; } 0/U Code:
dimensions [ 0 1 1 0 0 0 0 ]; initValue uniform (3.3 0 0); internalField $initValue; boundaryField{ flux_entrant { type fixedValue; value $initValue; } flux_sortant { type inletOutlet; inletValue uniform ( 0 0 0 ); value $initValue; } le_sol { type fixedValue; value uniform ( 0 0 0 ); } le_plafond { type fixedValue; value uniform ( 0 0 0 ); } Mur_gauche { type fixedValue; value uniform ( 0 0 0 ); } Mur_droit { type symmetryPlane; } le_cylindre { type fixedValue; value uniform ( 0 0 0 ); } } 0/p Code:
dimensions [ 0 2 2 0 0 0 0 ]; internalField uniform 0; boundaryField{ flux_entrant { type zeroGradient; } flux_sortant { type fixedValue; value uniform 0; } le_sol { type zeroGradient; } le_plafond { type zeroGradient; } Mur_gauche { type zeroGradient; } Mur_droit { type symmetryPlane; } le_cylindre { type zeroGradient; } } Code:
dimensions [ 0 2 1 0 0 0 0 ]; initValue uniform .1; internalField $initValue; boundaryField{ flux_entrant { type fixedValue; value $initValue; } flux_sortant { type calculated; } le_sol { type kqRWallFunction; value $initValue; } le_plafond { type kqRWallFunction; value $initValue; } Mur_gauche { type kqRWallFunction; value $initValue; } Mur_droit { type symmetryPlane; } le_cylindre { type kqRWallFunction; value $initValue; } } Of course, there are some other files, but nothing interesting (but nu=1.5e5). About the fvSchemes: what do you think about LUST ? 

September 27, 2012, 07:12 

#9 
Senior Member

I will try to run the case.
I myself don't have much idea about LUST scheme, haven't used it. openFOAM actually advises to use LUST in case the mesh is highly unstructured (and quality is not good). If you look into the LUST its a blending of linear and linearUpwind. The blending factor of 0.75 (for linear) is hard coded which they say is optimized for a range of mesh quality. But with a blending of linearUpwind (2nd order upwind), it will also add some damping. LUST is being used in motorbike tutorial of openFOAM. Regards, Awais 

September 28, 2012, 02:30 

#10 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,910
Rep Power: 27 
The choice of the scheme for LES should be based on the numerical diffusion it introduces. Ideally you should use linear, or cubic. You need good and prett uniform mesh anyways for LES, since you are assuming the filter operator and the differential operator are commutative, which is not true on nonuniform grids!
The filtered schemes are a last resort scheme in my view, if you can't really do better with your mesh. Upwind and linearUpwind, but also limitedLinear and QUICK should be avoided because they are too dissipative. For the time scheme, backward is the prmary choice among the schemes available in OF. The constraint on he time step is generally not an issue in LES because you are tied by the requirement of resolving the flow largescale time scales. 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. 

September 28, 2012, 03:48 
Thanks !

#11 
Senior Member
Julien
Join Date: Jun 2012
Location: France
Posts: 152
Rep Power: 6 
Thanks a lot Alberto. Your explainations are so simple, accurate and efficient! Respect...
Nevertheless, I am quite surprised because I have been using linearUpwind since some months, and it seems to work well. At least for these "simple" cases of a rectangluar rod in a uniform flow (similar to BARC if you know), in which I am interested for vortex shedding (Von Karman Alley). Do you think I could have a bias in the vortex shedding frequency, due to the artificial dissipation introduced by linearUpwind ? PS: Thanks a lot also for GeekoCFD. While installing my Foam, you were my Saviour ! 

October 1, 2012, 09:02 

#12 
Senior Member
Julien
Join Date: Jun 2012
Location: France
Posts: 152
Rep Power: 6 
(picture added on post #4 : Dicretization schemes in LES (pitzDaily) )


October 1, 2012, 14:15 

#13 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,910
Rep Power: 27 
Hi Julien, since you are interested in accurate and detailed solutions, you should really use the "linear" scheme. This scheme requires the cell Re < 2, so you will have to use a refined mesh, which is anyways necessary when you do LES (of course it might be an issue if your Re is very high).
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. 

October 2, 2012, 03:58 

#14 
Senior Member
Julien
Join Date: Jun 2012
Location: France
Posts: 152
Rep Power: 6 
Hi Alberto,
I really do not understand:  linearUpwind seems to work, when linear does not (is my picture a kind of "staggering"? I am quite new in CFD and my vocabulary is still poor). Why ??? Let suppose it is not working properly, giving wrong results. How to control this? How to be sure my solution is working well? Fields are pretty nice, vortex sheddind has a good frequency... What is wrong?  why does LES need a fine mesh? Small eddies have not to be resolved! Thus, I supposed a coarse mesh is enough to describe large structures, while my SGS is modelling finer eddies... In order to "tune" the size of my cells, I thought about the link between time and space: I am thinking about Strouhal number, which is commonly around 0.2 (for a cylinder for example). Thus, an eddy of size dx should "vibrate" at a frequency of nu=St.U/dx . With St=.2, this succeeds to a mean current number of about Co=5 (=St^1). My mesh is based on these considerations. My mesh is designed with a Co=5, about 1cm. You advice me to use Re=2. In my case, this leads to 0,1 mm. 100 times coarser, and thus a cell number 1 000 000 times larger !?!? I thought this kind of simulation was called DNS, not LES ! 

October 2, 2012, 11:55 

#15  
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,910
Rep Power: 27 
Quote:
Quote:
Quote:
A DNS is technically a simulation where all the turbulent scales are directly resolved. In other words you resolve directly from the largest scale, down to the Kolmogorov microscale. An LES is less demanding in terms of grid resolution, because the isotropic scales are not resolved directly, so you can use a coarser mesh. Coarser however does not mean as coarse as you want. The requirement is that your filter size (typically the cubic root of your cell volume) corresponds to to a frequency that falls in the inertial subrange of the spectrum. About the schemes, in practical applications the linear scheme might have too stringent requirements. In such a case, some authors suggest to use the bounded QUICK, which is however known to be too dissipative for LES, due to its upwind nature. If you really can't use a central scheme (linear, cubic, ...), I would start looking at filtered schemes before considering others. 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. 

November 20, 2012, 04:36 

#16  
Senior Member
Mohsen KiaMansouri
Join Date: Jan 2010
Location: CFD Lab
Posts: 118
Rep Power: 8 
Quote:
Thanks for your useful guide regarding different schemes in LES. I have a question: you said that " Upwind and linearUpwind, but also limitedLinear and QUICK should be avoided because they are too dissipative" I know that Upwind and linearUpwind produce high dissipation and must be avoided. But what about QUICK and TVD schemes (e.g. limitedLinear & vanLeer)? are they dissipative too?(Please introduce me a reference about dissipation in QUICK and TVD schemes!!) Then the only choice that remains is Centred schemes (e.g. linear, cubicCorrection, midPoint) but they are all unbounded. The question is "what scheme should be used for divSchemes that guaranties both boundedness and accuracy and also has not been too much dissipative? " I have used the following Schemes for my case (twoLiquidMixingFoam) in LES: ddtSchemes { default backward; } gradSchemes { default Gauss linear; } divSchemes { default none; div(rho*phi,U) Gauss linear; div(phi,alpha1) Gauss vanLeer01; // to bound the vanLeer scheme strictly between 0 and 1 to avoid negative and higher than 1 alpha div(phi,k) Gauss limitedLinear 1; div(phi,B) Gauss limitedLinear 1; div(B) Gauss linear; div(phi,nuTilda) Gauss limitedLinear 1; div((nuEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } fluxRequired { default no; p_rgh; alpha1; } Since we had negative or higher than 1 values for alpha we have to bound it using Gauss vanLeer01 and of course Gauss limitedLinear 1 for div(phi,k). What's your opinion about my schemes? Thanks in advance, Mohsen 

January 29, 2015, 09:41 

#17  
Senior Member
Join Date: Jan 2013
Posts: 310
Rep Power: 6 
Dear Owayz,
I am also interested in try the scheme "filteredLinear2V" in the LES. Do you know what they mean about the parameters 0.2 and 0? Do you have any experience in selecting them? Thank you very much. best regards, OFFO Quote:


March 26, 2016, 09:50 

#18  
Senior Member
Join Date: Jan 2013
Posts: 310
Rep Power: 6 
I think LUST can be used for LES with OpenFOAM solvers. It is available OF2.1.0 and is described as:
===================================== Linearupwind stabilised transport Linearupwind stabilised transport (LUST) is a new interpolation schemes in which linearupwind is blended with linear interpolation to stabilise solutions while maintaining secondorder behaviour. The scheme is proving particularly successful for LES/DES in complex geometries with complex unstructured meshes, e.g. external aerodynamics of vehicles. ===================================== The blending is harded coded as Code:
0.75*this>mesh().surfaceInterpolation::weights() + 0.25*linearUpwind<Type>::weights(); Code:
combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/system/fvSchemes:31: div(phi,U) Gauss LUST grad(U); compressible/rhoPimpleFoam/les/pitzDaily/system/fvSchemes:31: div(phi,U) Gauss LUST grad(U); compressible/rhoPimpleFoam/les/pitzDaily/system/fvSchemes:32: div(phi,e) Gauss LUST grad(e); incompressible/pisoFoam/les/motorBike/lesFiles/fvSchemes:38: div(phi,U) Gauss LUST unlimitedGrad(U); incompressible/pisoFoam/les/pitzDaily/system/fvSchemes:31: div(phi,U) Gauss LUST grad(U); incompressible/pisoFoam/les/pitzDailyMapped/system/fvSchemes:31: div(phi,U) Gauss LUST grad(U); incompressible/shallowWaterFoam/squareBump/system/fvSchemes:30: div(phiv,hU) Gauss LUST un; multiphase/cavitatingFoam/les/throttle3D/system/fvSchemes:33: div(rhoPhi,U) Gauss LUST grad(U); multiphase/cavitatingFoam/les/throttle3D/system/fvSchemes:34: div(phi,k) Gauss LUST grad(k); multiphase/cavitatingFoam/les/throttle/system/fvSchemes:32: div(rhoPhi,U) Gauss LUST grad(U); multiphase/cavitatingFoam/les/throttle/system/fvSchemes:33: div(phi,k) Gauss LUST grad(k); Quote:


August 3, 2016, 00:32 

#19  
New Member
Arash
Join Date: Feb 2015
Posts: 7
Rep Power: 3 
Quote:
Code:
// Scaling corefficient for the gradient ratio, // 0 = linear // 1 = fully limited scalar k_; // Maximum allowed overshoot/undershoot relative to the difference // across the face. // On input: // 0 = no overshoot/undershoot // 1 = overshoot/undershoot equal to the difference across the face // Note: After input 1 is added to l_ scalar l_; 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Convection discretization schemes for LES  sek  OpenFOAM Running, Solving & CFD  37  November 28, 2015 14:41 
Pressure problem in pitzDaily pisoFoam LES  fluentfreak  OpenFOAM Running, Solving & CFD  0  April 18, 2012 18:13 
LES tutorial for pitzDaily  hhuang84  OpenFOAM Running, Solving & CFD  0  October 12, 2009 12:38 
Schemes for scalar in LES  anne  OpenFOAM Running, Solving & CFD  5  March 5, 2007 06:34 
Advection schemes for LES  kalyan  Main CFD Forum  2  May 17, 2001 13:43 