- **Main CFD Forum**
(*https://www.cfd-online.com/Forums/main/*)

- - **Mesh Size
**
(*https://www.cfd-online.com/Forums/main/10296-mesh-size.html*)

Mesh Size
Hello Friends !!
How i calculate Local mesh size for 2D and 3D?? My project is Compressible flow analysis on unstructured meshes. Now i am working in Quadratic reconstruction. At present i am developing code for quadratic reconstruction. for that i have to calculate the gradients with 2nd order accurate. It accomplished by both Green-Gauss and Least-square...I am confused in Constant coefficient matrix for Least square method. so plz give the clear view of quadratic reconstruction. One more help... I need this below mentioned paper for my further progress.. Baldwin and Lomax "Thin layer approximation and algebraic model for separated turbulent flows", AIAA Paper, No. 78-257, 1978. |

Re: Mesh Size
Dear Mohamed Yusuf,
Both GG and QR can be used for obtaining the gradients. However, not that GG by itself cannot give second-order accurate gradients on arbitrary meshes. As far as your question on QR is concerened, this is the concept. 1. Consider any cell 'i' surrounded by support cells , 'j', j running from 1 to N. Thus cell 'i' has N supports. 2. We need to find the gradients at 'i'. 3. For every cell 'i' and support 'j', the cell-centroidal values \phi_i and \phi_j are known. Morevoer, \phi_j can be expanded in Taylors series about 'i' and the gradients and hessians at 'i' 4. To get the gradients and hessians we need to minimise the error between \phi_j at cell centroid of cell 'j' and \phi_j obtained through TS expansion. We minimise the sum of square of the error w.r.t to gradients and hessians,ie d(\sum e^2)/d(\phi_x) = 0 etc .. where denominator represents the gradient in x for the qty. phi and the sum is over all the supports. 5. This would give us a system of equations Ax = B, where x would have the gradients and hessians ( hence a coloumn vector of 5 in 2d and 9 in 3d). A is the geometric matrix which would only be a fucntion of the distances between cell centroids, boyh in x and y- coordinates, mmed over N supports in suitable fashion ( 5*5 and 9*9 in 2-d/3-d) and b is the RHS vector, depending on the difference in solution as well as the distance b/w cell-centroids. 6. To get x , the matrix A needs to be inverted. For QR, this could be a cumbersome operation in 3D. The inversion is achieved using Singular value decomposition or Householder's algorithm ( See Numerical Recipes in Fortran/C for details) Note that the number of supports in 2D for QR needs to be atleast 5 and 6-10 is a widely accepted number. Howvere, in 3d this number could be excessively large like 40, and then computational efforts could pick up. You can also look into papers regarding Defect Correction in this regard, for 3d applications. As far as the B/L turbulence model is concerned if you could kindly send me your mail-id, I could send you the paper in .pdf format Hope this helps Regards, Ganesh |

Re: Mesh Size
Thanks for ur reply...
But in Delaneye and Essers 1997 AIAA paper.. they considered 2nd order accurate gradient.. Then one more help.. In viscous computation, I am facing problem with calculation of gradient at faces(edges). I used GG theorem.. but i am not getting exact zero velocity at No-slip wall. Somewhere i am making mistakes but i cant realize.. Any other approach to calculate gradients for viscous? Advance thanks... |

Re: Mesh Size
Dear Yousuf,
In Delanye and Essers 1997 AIAA paper, they have first used GG to obtain gradients to first order and then corrected it to second order. This is possible option you could try. The fact that GG cannot by itself give gradients to second order accuracy on arbitrary meshes is still valid. In calculating the gradients at the boundary, use the boundary condition (say no-slip)and consider a co-volume made up by the nodes of the face and the cell centroid of the cell containing the boundary face. The viscous gradient computations are calculated using GG/QR. The AIAA 97 paper you referred to is a very good reference. Hope this helps Regards, Ganesh |

All times are GMT -4. The time now is 23:45. |