
[Sponsors] 
question on technical strategy of loop on unstrcutred grid for flux computatoin 

LinkBack  Thread Tools  Display Modes 
March 7, 2013, 12:11 
question on technical strategy of loop on unstrcutred grid for flux computatoin

#1 
Member
Dokeun, Hwang
Join Date: Apr 2010
Posts: 71
Rep Power: 8 
Dear all
Now I'm trying to implement original LUSGS scheme for 2D Euler unstructured mesh. Properties are stored at cell center and face data points their left/right cell # and normal unit vector with magnitude of face vector. When I wrote a code for explicit operator, in other word, 'residual', the 'face' based loop was convenient because of its intuitiveness for flux calculation. At first thought, meanwhile, the 'cell' based loop seemed to be better than 'face' for the implicit operator. Because forward and backward sweeps chage the update of conservative vector for given cell, ie, . But I had to check whether the current cell is on left of the face or not. And it makes the code complex. Which approach is better for your experience? face or cell? 

March 7, 2013, 12:57 

#2 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 2,700
Rep Power: 33 
Quote:
I used to work on faces ... I defined a local system on the face, two unit vectors normal and tangential to the face. Then I fix a convention, for example the right cell sees the normal outward oriented. Then check for each couple of cells the right orientation 

March 7, 2013, 22:55 

#3  
Member
Dokeun, Hwang
Join Date: Apr 2010
Posts: 71
Rep Power: 8 
Quote:
Thank you for sharing your precious experience. I have some questions ensued. 1st When I loop over faces, then, do I have to treat Diagonal, Lower, Upper components, i.e., , as an array in order to sweep? (I guess it's 1D in which each component has the sum of lower/upper update flux and linearized Jocobiansspectral radii around a cell) Or, then, how can I sweep along face to update solution with scalar variables? The reason why I tried to use cell loop was I expect that I can make sweeps with scalar value of D, L, U(L, U are to be sum of fluxs) for each cell with this approach only. I have no idea of making sweeps with scalar variables(D, L, U) for face based. From my understanding, LUSGS scheme's feature is to update solution with scalar values D, L, U. (Exactly speaking, they are vectors composed with conservative variablessize 4 for euler 2d.) 2nd For a structured solver, it seems clear that where a ghost cell's properties effect treated, L or U. Because there are explicit relation between a cell and its ghost cell. But, it looks an elusive matter in unstructured case. May boundary condition is applied to the both sweeps by ghost cells? 

March 8, 2013, 05:55 

#4 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 2,700
Rep Power: 33 
for the first question, I think there is more than one technique to develop the algorithm ...
second question, I did not use ghost cells... on the boundaries I implemented the Neumann/Dirichlet BC directly in the shape functions in an FV/FEM hybrid approach... 

March 8, 2013, 06:07 

#5  
Member
Dokeun, Hwang
Join Date: Apr 2010
Posts: 71
Rep Power: 8 
Quote:
I think it's getting more clear for this problem. Then, when the direct bc is implemented?I mean forward, backward, or in both sweeps. 

March 8, 2013, 08:37 

#6 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 2,700
Rep Power: 33 
in my opinion, any time bc.s are involved


March 8, 2013, 10:56 

#7 
Member
Dokeun, Hwang
Join Date: Apr 2010
Posts: 71
Rep Power: 8 
i found an interasting discussion about thinking on cfl number in implicit scheme. For implicit scheme, whole computation area is regarded as the domain of dependent. in that sence it seems applying bc for all sweeps is reasonable.
thank you again for your kind explains. 

March 10, 2013, 23:57 

#8 
Member
Dokeun, Hwang
Join Date: Apr 2010
Posts: 71
Rep Power: 8 
Although it's not a lofty subject, I think I have to update my thought in order to make this post more useful for someone.
First of all, I have several data structures ex) node, cell, face, BCs. node has just coordinates data. Cell and face point the nodes they need. Face has also left/right cell pointers and its face vector. Conservative properties and other necessary data are stored in each cell. Boundary faces are defined in BCs. The cell doesn't know which bc types it has when there is no neighbors for one of the neibhbor face. Over the weekend, I had a difficulty on implementing lusgs by face loop. Because, for the current cell update, I have to have updates of the neighbor cells(which are L for forward, U for backward sweep). For the explicit operator(residual), face loop is enough to get each cell's residual. For the face loop in implicit operator, however, I can't get any update before the completion of face loop over a cell. So, returning to the cell loop, My pseudo program is like below until now. Code:
loop icell(cell) loop jface(cell's faces) if jcell(lower/upper)? compute D, L(U) with flux computation end if end loop update conservative vector end loop I have to put a loop after jface for applying bc. But it doesn't seem to be an efficient way. A loop for finding the face in BCs data contains many overlapped tasks. So I think need put more imformation to faces or cells defining which bc as their neighbors. Afterall my problem looks like a data constructing for reasonable calculation loop. Last edited by dokeun; March 11, 2013 at 00:26. 

March 11, 2013, 11:25 

#9 
Member
Dokeun, Hwang
Join Date: Apr 2010
Posts: 71
Rep Power: 8 
Now I can implement a loop over a cell which informed which bc is applied. What I'm concerning is how this bc is contributing on the sweepings. From the googling I found a paper.
Dmitri Sharov and Kazuhiro Nakahashi. "Reordering of Hybrid Unstructured Grids for LowerUpper Symmetric GaussSeidel Computations", AIAA Journal, Vol. 36, No. 3 (1998), pp. 484486. doi: 10.2514/2.392 I didn't get this paper yet, but I found following sentence. Contributions from boundary faces must be considered only for the computation of the diagonal matrixD. The important issue for the unstructured grid LUSGS ... This paper maybe an answer for my question. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
grid study, important question  hamid1  FLUENT  1  August 4, 2013 00:14 
[ICEM] o grid blocking strategy?  icemaniac178  ANSYS Meshing & Geometry  14  March 20, 2013 00:18 
Question regarding nonuniform FVM staggered grid and order accuracy  quarkz  Main CFD Forum  2  October 26, 2012 03:11 
Question regarding nonuniform FVM staggered grid  quarkz  Main CFD Forum  2  June 18, 2011 17:18 
On grid independent solution for pulsatile flow  David  FLUENT  4  June 8, 2005 16:20 