I looked at the code of the diffusive operator, which is great (second order accuracy) for structured/orthogonal grids.
On non orthogonal meshes this approach gives some problem, however, it seems that many commercial codes use it to estimate diffusive terms too.
There are other approaches for unstructured meshes, but they present some difficulty in implementation:
1) Add a term to keep into account of the cross diffusion term, which becomes relevant only when the centres distance direction is far from being orthogonal to the surface normal vector. This tecnique has been proposed by Chow et al. It's problem is the definition of the cross-diffusion term. If I'm not wrong, the same authors did some work on that (I'm looking for it).
2) Use an higher order approximation scheme, which leads to deep changes in the whole discretization scheme.
I'd prefer to find something easier and more efficient, if possible.
I'm looking for more information on this subject talking to some other people too, and I'll make you know what I find as soon as possible.
P.S. I like the way this code is growing. You're doing a great job :-)
Hi there !
OK : so, I also came across a paper describing a way to calculate this cross-diffusion term but... it was in 2D !!! And the thing becomes much more complicated in 3D !
I will post the references of this paper tomorrow (I don't have them right now) so that people can have a look at it. And in the mean time, I am also trying to find out how it can be derived in 3D... Who knows ?!!
I think that's the reason why many codes just implement what you have already implemented also for unstructured non orthogonal grids ;-)
However, I'd look for the paper and I'd try to apply it to a 3D case too.
Here are 3 main references we have found of interest for the development of OpenFlower.
- "Colocated finite-volume schemes for large-eddy simulation on unstructured meshes",
by Benhamadouche, Mahesh and Constantinescu.
Center for Turbulence Research, Proc. of the summer program (2002), pp 143--154
- "A numerical method for large-eddy simulation in complex geometries",
by Mahesh, Constantinescu and Moin.
to be published in the Journal of Computational Physics (2004).
- "A second-order time-accurate finite volume method for unsteady incompressible flow on hybrid unstructured grids",
by Kim and Choi.
Journal of Computational Physics 162, pp 411--428 (2000)
Hope these references can be of interest to you guys.
This paper is cited for discretizing gradients in unstructured grids. However, I don't have a copy of it yet.
C.M. Rhie and W.L. Chow. Numerical study of the turbulent flow past an airfoil with trailing edge separation. AIAA Journal, 21:1525--1532, 1983.
Also I have this paper:
Finite-volume CFD procedure and adaptive error control strategy for grids of arbitrary topology
Samir Muzaferija, David Gosman
December 1997 Journal of Computational Physics, Volume 138 Issue 2
This paper is a results of muzaferija's phD thesis. I am thinking of buying this thesis.
I found this reference:
P. Chow, M. Cross, K. Pericleous, "A natural extension of the conventional finite volume method into polygonal unstructured meshes for CFD application", Applied Mathematical Modelling Vol. 20, Issue 2, February, 1996, pp. 170-183.
It gives an alternative formulation of the diffusive flux, introducing the cross diffusion term, but it doesn't define it, referring to a paper in preparation from
N. Croft, M. Cross, K. Pericleous, P. Chow
which I wasn't able to find.
Vortexflow, you said that you found something about the definition of the cross diffusion term. Is it in the paper of Benhamadouche, Mahesh and Constantinescu? Because I can't find those proceedings :-(
No, the cross-diffusion term is defined in the paper of Kim and Choi (JCP 162, pp 411--428 (2000) )
The paper of Benhamadouche, Mahesh and Constantinescu can be found at the following address :
I also found the website of Nick Croft, where he presents his PhD Thesis.
He introduces the calculation of the cross diffusion terms in (I think) an extensive manner, with details on how to calculate it.
It can be found here :
Yes, Nick Croft thesis explain how to extend the cross diffusion correction term to 3D cases
This is the link to the page:
We just have to write the linear interpolation expressions presented by Kim and Choi to a 3D grid, but this shouldn't be difficult.
And here is the link to his thesis in pdf format, so that it can be downloaded : I just asked him this morning and he kindly made it available.
Thanks vortexflow! This is great!
Have you seen peric's FV code?
There is no 3D unstrucutured finite volume code but maybe we can find numerical methods to solve the matrices.
Yes I already went there to download the code.
It is interesting in support of his book (Ferziger & Peric), but I think we will not develop once again a matrix solver (even looking at another code). I think that there are already optimized and validated libraries on the net, so that we don't have to worry about that.
The only thing is to find a library which is well documented, efficient, open-source and easy to use. We will have to think about that in the near future. Does someone want to take on this job ?
There are many algebra library on the net, but many of them are written in Fortran, even if they can be linked to a C++ software. I'm thinking to BLAS, LAPACK and similar.
I found an interesting link, where there is a list of scientific software for linux. There is a package called lapack++, which should be a C++ port of the Fortran LAPACK package, even if it lacks of some features.
The link contains a list is:
I guess we should be looking for a sparse linear matrix solver (BiCGSTAB).
I will search for some on the net. I agree until now I found more codes in Fortran.
I have seen the paper of Kim & Choi.
I don't think that equation 23 to calculate the gradient of phi at the face centre is quite adequate for 3D. I can understand it for 2D but how do you calculate phi_a and phi_b, when the face has several vertices (3 or more)?
To calculate this gradient in 3D, I suggest Equation 14 of the paper:
"Computation of Turbulent Flows in Complex Geometries", Demirdzic, Muzaferija & Peric.
I haven't read the paper from Demirdzic, Muzaferija and Peric yet, however the theory of Kim and Choi could is valid in 2D for cells of any form.
The phi_alpha (alpha = a,b,...) can be calculated as an area weighted average of the values of phi in all cells which share the node, as reported in the paper of Kim and Choi.
I think it shouldn't be difficult to extend this method to a 3D case, where phi_alpha could be caluculated as a volume weighted average of the values of phi in all cells which share the node alpha.
The values phi_1 and phi_2 are the cell center values, which are defined also in 3D.
The problem is the term (phi_b - phi_a)tan(theta)/(Delta eta), which has to be rewritten in 3D.
By the way,
I found the link for the paper: "Computation of Turbulent Flows in Complex Geometries", Demirdzic, Muzaferija & Peric:
I read the paper from Demirdzic et al.
You're right x-flow, the proposed method to calculate the gradient seems easier.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.