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/nrousselon-1.4.1/run/ccm2foam4/system/fvSchemes::div(phi,U) at line 40. From function gradScheme<type>::New(Istream& schemeData) in file /home/nr/OpenFOAM/OpenFOAM-1.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((1|A(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 grad-s
You need to specify the grad-scheme 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 fourth-order 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.cfd-online.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 fourth-order 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 under-estimated 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.
|
how do your results compare to measurements? are you under or over predicting?
In my case I over predict from 10 to 20 degrees |
hi all
I noticed that both in both tutorial cases and posted fvschemes there is always Code:
div(R) Gauss linear; I tried Code:
div(R) Gauss limitedLinear 1; thanks Uli |
Hi! It is for other turbulence model where you use Reynolds stress
|
Thanks for your reply.
So using a k-Epsilon model does not involve R? But how is it possible that I get different results after switching the scheme for div(R)? |
You wrote you get the SAME results. You can easily check which schemes you solver uses, just set "default none;", and you will get errors until you define all schemes.
|
hi, sorry for the late reply.
I wrote "similar" results since the plots are slightly different. I removed the schemes and it still worked, thanks for your help. |
Hi all,
I have to simulate the case of time varying BC 'uniformValue' for p and T I tried various ways listed here and also from other open-sources, for schemes and solvers, to solve the 'p' with rhoSimpleFoam. whatever may be the conditions applied, the solver is unable to run after third time-step. here I am posting my schemes and solvers. I am thinking that the problem is with these files only because I have cross-checked the p, T and U files and am also able to run 'rhoPimpleFoam' successfully. Please let me know what went wrong. Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
/*--------------------------------*- C++ -*----------------------------------*\ |
Quote:
A user can edit those files. Use the following conditions for relaxation factors: relaxationFactors { fields { p 0.3; rho 1; } equations { U 0.7; "(k|epsilon|omega)" 0.7; e 0.7; h 0.7; } } User has an option to edit the "fvSchemes" as well depending on problem statement. Best Luck! |
Quote:
In this case, does it mean that divergence scheme Gauss linearUpwind uses the gradient scheme of respective variables? Thanks, Sunil. |
Quote:
Yes, you are right. It can either use specific scheme listed in the gradient section or just use default scheme. You can also specify your name for the scheme to use it with several variables, for example like this: Code:
gradSchemes |
Great. Thanks a lot Dr. Vakhrushev.
|
All times are GMT -4. The time now is 06:03. |