How to setup second order schemes for all variables
1 Attachment(s)
Hi Foamers,
I am here again because I am not understanding well how to setup fvSchemes for second order discretization for all variables. I attach my case of a simpleFoam calculation with heat equation implemented. When I changes something the log files gives an error (something related to stack). I have only tried to put all schemes to linear and in laplacian terms I switched all to linear corrected. Are those second order schemes? What is the equivalence between put all second order schemes in FLUENT? If somebody could give me any hint realted to the setup of my fvSchemes file it would be really aprecciated... Thanks! 

You have specified first order upwinding on your divergence schemes.
If you want to use 2nd order upwind, the syntax is: div(phi,U) Gauss linearUpwind grad(U) The "grad(U)" term tacked on tells the code that you want to use the same gradient scheme (which is necessary) that you used on grad(U). 
1 Attachment(s)
Hi,
Thanks for all the replies. I have seen the page about numerical schemes in OF website, but it looks like there are several kinds of second order schemes and I am not sure which one could be the best for my problem. If I use the setup suggested by msuaeronautics, I get an error message and the execution stops. I attach the log file. Anybody have ideas? Thanks in advance. 
according to your log file:
Code:
> FOAM Warning : If your mesh is generated with snappyHexMesh, try the following: In snappyhexMeshDict file, look for "minTetQuality". // Minimum quality of the tet formed by the facecentre // and variable base point minimum decomposition triangles and // the cell centre. Set to very negative number (e.g. 1E30) to // disable. // <0 = inside out tet, // 0 = flat tet // 1 = regular tet For a regular tet, it should be positive. Try setting it to 1. If it does not work, set it to a very low positive number. Say 1e10. One way to check whether the issue with face tet is resolved or not before the start of the simulation is to do an "checkMesh allGeometry". It will report if there are any issues with face tets. 
Hi adambarfi,
Thanks for the reply. The mesh is created with snappy, but I have to disable quality controls at this step, because I am trying to introduce layers near the wall. I will try this settings with another mesh (one that pass all checkMesh tests), but I think I'ĺl need more possibilities for second order numerical schemes. I am not sure which ones I am speciying and I am not understanding many things of OF website. If I want to use second order schemes, what changes have I to do in the fvSchemes file of my first post? I have converged my case for the settings of this dictionary, but now I need to be sure my simulation is converging at least with second order, and I guess it will not be so easy. Maybe some changes are need to be done in fvSolution? Thanks! 
AFAIK the fvSolution just controls the equation solvers, tolerances and algorithms. the discretization is set in the fvScheme.
in the OpenFOAM userGuide the way you can specify different discretization schemes is mentioned. For example, for gradient you can use 'Gauss <interpolationScheme>' and 'leastSquares' which are second order or you can use 'fourth' which is fourth order! ;) in the same way you can change the Laplacian or Divergence schemes. 
Hello Many,
to know which schemes are available you can use the banana trick: Code:
Additionally you can have a look at my homepage. There I investigated numerical schemes in a very simple geometry. http://www.holzmanncfd.de/index.php/numerischeschemen Still just in german. But you can see that all schemes except of the gauss upwind can calculate unphyisical results. In most cases I use 2nd order limited schemes to avoid unphysical results. Additionally you see that the results depend on the mesh and the flow direction passing through the cells. Especially with scalar Transport equations in which the variable is defined in a interval. Example:  i made a very huge Research of the SLFM (laminar steady flamelet model). Therefor all physical varables phi can be described with Z and Z_var. Those two variables are valid in the interval: Code:
0 <= Z <= 1 // 0 = oxidator 1 = fuel Code:
div(phi,Z) Gauss limitedLimitedLinear 1 0 1; > 1 full limiter function > 0 non limiter function Therefor the following Expression should be the same (I am not 100% sure): Code:
Hope it is getting clear. Regards Tobi 
Thanks Mostafa and Tobias for your help,
Mostafa, I'll try with leastSquares. Anyway I'll give a sight at OF Userś Guide again. Tobias, I know your web page. I have been reading some of your post and they are great. Nice to meet you. I would like to understand what you are doing in your research about numerical schemes, but I don't speak German so it will be a mess! My problem is an airflow inside a nose. I can get converged results with Gauss linear for gradients, Gauss upwind for divergence terms and Gauss linear uncorrected for laplacians. But to be sure that my results are OK I'd like to switch to second order (I guess this means to put linear instead of upwind in divergences, and Gauss linear corrected for laplacian). With those settings simulation just crashes after 2 iterations.I don't expect to converge it at the first try, but I cannot understand why it crashes... I'll keep trying anyway! 
Hi,
thanks for your feedback and the words. I will translate my page into english as soon as I can and additionally I will make more schemes analyses. Regards Tobi 
All times are GMT 4. The time now is 14:24. 