Hello,
Looking at the UserG
Hello,
Looking at the UserGuide, it's something I should be able to do. I want to use the linear Upwind scheme for div(phi,U). Using simpleFoam in Openfoam 1.4.1 on linux 64bit. div(phi,U) Gauss linear; div(phi,U) Gauss linear corrected; div(phi,U) Gauss QUICK; works fine. But div(phi,U) Gauss linearUpwind; does not. I get: > FOAM FATAL IO ERROR : Grad scheme not specified Valid grad schemes are : 8 ( cellMDLimited extendedLeastSquares faceMDLimited leastSquares fourth faceLimited cellLimited Gauss ) file: /home/nr/OpenFOAM/nrousselon1.4.1/run/ccm2foam4/system/fvSchemes::div(phi,U) at line 40. From function gradScheme<type>::New(Istream& schemeData) in file /home/nr/OpenFOAM/OpenFOAM1.4.1/src/finiteVolume/lnInclude/gradScheme.C at line 65. FOAM exiting /**\  =========    \ / F ield  OpenFOAM: The Open Source CFD Toolbox   \ / O peration  Version: 1.4   \ / A nd  Web: http://www.openfoam.org   \/ M anipulation   \**/ FoamFile { version 2.0; format ascii; root ""; case ""; instance ""; local ""; 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 linear corrected; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,R) Gauss upwind; div(R) Gauss linear; div(phi,nuTilda) Gauss upwind; 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; laplacian(DREff,R) Gauss linear corrected; laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; } interpolationSchemes { default linear; interpolate(U) linear; } snGradSchemes { default corrected; } fluxRequired { default no; p; } // ************************************************** *********************** // 
You need to specify the grads
You need to specify the gradscheme used by linearUpwind, e.g.
div(phi,U) Gauss linearUpwind Gauss linear; or div(phi,U) Gauss linearUpwind leastSquares; or if you want to limit the gradient used by the linearUpwind scheme which is often beneficial div(phi,U) Gauss linearUpwind cellLimited Gauss linear 1; etc. 
Thanks,
just what I needed.
Thanks,
just what I needed. Nicolas 
I have the same problem and tried to adapte it on my case with the bouyantBoussinesqSimpleFoam, but it didn't work.
This is what I get: Quote:
Quote:

You messed up the order: cellLimited is a modifier for a gradient scheme, so it comes first. Think about which class should contain which. :)
div(phi,U) Gauss linearUpwind cellLimited Gauss linear 1; Enjoy, Hrv 
Hi Hrvoje,
thank you. Stupid mistake. Now it's running! :) Regards, Erik 
Hello!
I got a question. Does div(phi,U) Gauss linearUpwind fourth mean that with order fourt the velocity field is approximated? Cheers 
No, it means you use a fourthorder scheme to compute the gradients, but clearly the order of the linearUpwind stays unchanged.

I think I have to learn something. Could you send me a reference which contains the derivation of this kind of scheme?

Could you please have a look at this thread I just created?
http://www.cfdonline.com/Forums/ope...fvschemes.html thanks! 
fvSchemes in OF20
"
div(phi,U) Gauss linearUpwind Gauss linear; or div(phi,U) Gauss linearUpwind leastSquares; or if you want to limit the gradient used by the linearUpwind scheme which is often beneficial div(phi,U) Gauss linearUpwind cellLimited Gauss linear 1; etc.[/QUOTE]" Does anyone know, how should the same fvSchemes be set in the 2.0 version of OpenFOAM? 
Hi!
Code:
gradSchemes 
Could you help me with this:
Implementing: laplacian(nuEff,U) Gauss linear Gauss fourth; gives: [0] > FOAM FATAL IO ERROR: [0] Unknown discretisation scheme fourth Valid schemes are : 3 ( corrected limited uncorrected ) but it should be able to work with fourth... Thanks 
Quote:
Gauss <scheme> <correction option>; so Gauss linear corrected; For fourthorder it is: Gauss cubic corrected; Best, 
Thanks Alberto for your reply
Now it is running, so I hope my solution will improve. Thanks Felipe 
Thanks

2 Attachment(s)
Hi again Alberto
Well my simulation ran, but I guess I have not achieved what I wanted. In the attached graph I have made the simulations from 0 to 20 degrees with a step of 2 degrees with OpenFOAM and another CFD code. I want to use the QUICK scheme, but I am over predicting my solution with OF in comparison to the other CFD code and both over predict lift in comparison to the measurements (Abbot and Doenhoff). I have my convection terms with QUICK and the diffusion terms with second order scheme (Gauss linear corrected). Thus I change my diffusion terms to a fourth interpolation scheme in order to improve my solution (QUICK2), and I can see that the curve is lower, but still it can not capture the separation pretty well. In this case my diffusion terms are Gauss cubic corrected. Do you have any suggestions for improving my results? Regards Felipe ps: I was going to upload the case but due to the size, it did not let allow me to do it. But I could send you a tar file with it (2.7 MB). 
Which OF version do you use?

I use 1.7.1

Ok, because in 20x I noticed strange behavior: viscous terms are underestimated in my case with equal settings I was simulating in v16 and 17x. I will study it in details and also report here on forum.

All times are GMT 4. The time now is 19:46. 