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

Prediction of gradient at the cell center for cell-centered finite volume method

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 23, 2014, 05:58
Question Prediction of gradient at the cell center for cell-centered finite volume method
  #1
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
Dear CFDer,

As you know, when I implement cell-centered finite volume discretization, I need to calculate the gradient at each cell center, which will be used in the numerical schemes for convection and diffusion terms. I found that this will slow down my simulations because before I start the face looping of numerical fluxes for the convection and diffusion terms, the gradients should be known in advance. I use Green-Gauss method to predict the cell center gradients, which means that the complete face looping is also needed. So, in this sense, I need to do two cycle of face sweepings: one for gradient (this should be performed first) and another for numerical fluxes. This obviously slow down my code.

Since I guess this is classic problem in FV CFD, does anybody have some suggestions about the appraoches to efficiently calculate the cell ceter gradients without loss of computation speed?

Thank you so much,
OFFO
openfoammaofnepo is offline   Reply With Quote

Old   March 23, 2014, 08:37
Default
  #2
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,152
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
The standard Green-Gauss based gradient can clearly be computed trough a face loop, you just need to... do it. For each face in the loop you just need to update all the relevant gradient terms in the two cells sharing the face. Obviously, you will still need to compute the gradient in a preliminary face loop before using it.

The same should be possible even for the least-squares approach (probably more cumbersone)
sbaffini is offline   Reply With Quote

Old   March 23, 2014, 08:43
Default
  #3
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
Thank you!

I did loop all the face first, which need computational time. This is my concern. Because I need loop all faces first and then do the looping again to calculate the numerical fluxes.

Any more comments?

Thank you.

Quote:
Originally Posted by sbaffini View Post
The standard Green-Gauss based gradient can clearly be computed trough a face loop, you just need to... do it. For each face in the loop you just need to update all the relevant gradient terms in the two cells sharing the face.

The same should be possible even for the least-squares approach (probably more cumbersone)
openfoammaofnepo is offline   Reply With Quote

Old   March 23, 2014, 14:59
Default
  #4
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,152
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
I'm sorry, i don't know of any other obvious (or not) way to do it.

Consider that, in general, you should do it more than twice to keep with the iterations. How much slow down are we talking about?
sbaffini is offline   Reply With Quote

Old   March 23, 2014, 15:07
Default
  #5
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
Yes, you are right. Thank you.
openfoammaofnepo is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 17:22
alphaEqn.H in twoPhaseEulerFoam cheng1988sjtu OpenFOAM Bugs 15 May 1, 2016 16:12
gradient calculation of cell centered finite volume method zhengjg Main CFD Forum 10 November 11, 2012 23:13
2D Finite Volume Method - Please help WatchFirefly Main CFD Forum 12 September 12, 2010 20:58
calculate cell volume, center...? Paul Main CFD Forum 5 June 21, 2003 12:55


All times are GMT -4. The time now is 08:52.