CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

question on technical strategy of loop on unstrcutred grid for flux computatoin

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By FMDenaro
  • 1 Post By FMDenaro
  • 1 Post By FMDenaro

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 7, 2013, 12:11
Default question on technical strategy of loop on unstrcutred grid for flux computatoin
  #1
Member
 
Dokeun, Hwang
Join Date: Apr 2010
Location: Korea, Republic of
Posts: 98
Rep Power: 16
dokeun is on a distinguished road
Dear all

Now I'm trying to implement original LU-SGS 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, \Delta Q. 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?
dokeun is offline   Reply With Quote

Old   March 7, 2013, 12:57
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by dokeun View Post
Dear all

Now I'm trying to implement original LU-SGS 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, \Delta Q. 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?

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
dokeun likes this.
FMDenaro is offline   Reply With Quote

Old   March 7, 2013, 22:55
Default
  #3
Member
 
Dokeun, Hwang
Join Date: Apr 2010
Location: Korea, Republic of
Posts: 98
Rep Power: 16
dokeun is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
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
Dear professor
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., F(Q^n_j + \Delta Q^*_j ), F(Q^n_j ) 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 Jocobians-spectral 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, LU-SGS scheme's feature is to update solution with scalar values D, L, U.
(Exactly speaking, they are vectors composed with conservative variables-size 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?
dokeun is offline   Reply With Quote

Old   March 8, 2013, 05:55
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
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...
dokeun likes this.
FMDenaro is offline   Reply With Quote

Old   March 8, 2013, 06:07
Default
  #5
Member
 
Dokeun, Hwang
Join Date: Apr 2010
Location: Korea, Republic of
Posts: 98
Rep Power: 16
dokeun is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
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...
Thank you for the kind reply, sir.

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.
dokeun is offline   Reply With Quote

Old   March 8, 2013, 08:37
Default
  #6
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
in my opinion, any time bc.s are involved
dokeun likes this.
FMDenaro is offline   Reply With Quote

Old   March 8, 2013, 10:56
Default
  #7
Member
 
Dokeun, Hwang
Join Date: Apr 2010
Location: Korea, Republic of
Posts: 98
Rep Power: 16
dokeun is on a distinguished road
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.
dokeun is offline   Reply With Quote

Old   March 10, 2013, 23:57
Default
  #8
Member
 
Dokeun, Hwang
Join Date: Apr 2010
Location: Korea, Republic of
Posts: 98
Rep Power: 16
dokeun is on a distinguished road
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 lu-sgs by face loop.
Because, for the current cell update, I have to have updates of the neighbor cells(which are \in 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
Here, my cells don't know what type of bc they have if there is no neighbor.
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.
dokeun is offline   Reply With Quote

Old   March 11, 2013, 11:25
Default
  #9
Member
 
Dokeun, Hwang
Join Date: Apr 2010
Location: Korea, Republic of
Posts: 98
Rep Power: 16
dokeun is on a distinguished road
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 Lower-Upper Symmetric Gauss-Seidel Computations", AIAA Journal, Vol. 36, No. 3 (1998), pp. 484-486.
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 LU-SGS ...

This paper maybe an answer for my question.
dokeun is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 12:56.