CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

fvc::reconstruct( ) algorithm

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

Like Tree37Likes
  • 2 Post By tetraeder
  • 25 Post By thibault_pringuey
  • 6 Post By sharonyue
  • 1 Post By tomislav_maric
  • 3 Post By santiagomarquezd

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 8, 2010, 04:36
Default fvc::reconstruct( ) algorithm
  #1
New Member
 
Join Date: Jul 2010
Posts: 3
Rep Power: 16
tetraeder is on a distinguished road
Hi Foamers,

I am trying to figure out how the fvc::reconstruct( ) algorithm works. My first thought was:
Sum up the facefluxes multiplied with the facenormal over a cell and divide it by the sum of the magnitude of the facevector components of every face of the cell.
The algorithm in the "fvcReconstruct.C" file seems far more complex then my thought:

inv(surfaceSum(sqr(mesh.Sf())/mesh.magSf()))
& surfaceSum((mesh.Sf()/mesh.magSf())*ssf)


The second line is what I expected, but the first line is a little mystery to me.
Can anybody explain this to my, please?


Rainer
fumiya and brucechen like this.
tetraeder is offline   Reply With Quote

Old   July 8, 2010, 09:31
Default
  #2
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22
marupio is on a distinguished road
Just a guess... it looks like it might be non-orthogonal correction...?
marupio is offline   Reply With Quote

Old   July 9, 2010, 11:15
Default
  #3
Member
 
Kevin Maki
Join Date: Mar 2009
Location: Ann Arbor, MI, USA
Posts: 43
Rep Power: 17
kjmaki is on a distinguished road
Rainer, I agree with your description. The first line finds one over the square of the components of the area. The second line has the the components of the area in the numerator, so the result is just one over the area times the sum of what ever you are reconstructing. This is what you want for a face-area-weighted average.

There is another post by Henry which is relevant here:

http://www.cfd-online.com/Forums/ope...integrate.html

Kevin
kjmaki is offline   Reply With Quote

Old   March 16, 2011, 12:27
Default
  #4
sek
Member
 
Sung-Eun Kim
Join Date: Mar 2009
Posts: 76
Rep Power: 17
sek is on a distinguished road
I am also puzzled by what fvc:reconstruct does. Has anyone here figured what it does? It seems it is not based on any mathematical identity (like Gauss theorem), but some sort of approximation.
sek is offline   Reply With Quote

Old   January 16, 2012, 12:06
Default fvc::reconstruct explaination
  #5
New Member
 
Thibault Pringuey
Join Date: Mar 2009
Posts: 17
Rep Power: 17
thibault_pringuey is on a distinguished road
Hello,

I have had a look at the fvc::reconstruct method. Please find attached an attempt to explain it.

Cheers,


Thibault
Attached Files
File Type: pdf fvcReconstruct.pdf (21.9 KB, 2746 views)
thibault_pringuey is offline   Reply With Quote

Old   January 17, 2012, 04:00
Default
  #6
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 250
Blog Entries: 1
Rep Power: 19
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
Thibault, excellent! Thank you for you work! Currently I am working on improving my model introducing a reconstruction for them... So hope to find some advantage on using it, will post some general conclusions.
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

http://smmp.unileoben.ac.at
makaveli_lcf is offline   Reply With Quote

Old   August 27, 2014, 13:56
Default
  #7
Member
 
Charlie
Join Date: Dec 2010
Location: USA
Posts: 85
Rep Power: 15
cheng1988sjtu is on a distinguished road
Hi makaveli_lcf,

Did you find any advantage using fvc::reconstruct ?

In my experience, using fvc::reconstruct seems too dissipative? need to find out what cause the dissipation, maybe due to the face-weighted averaging ?

Just curious, did you find anything similar?

Quote:
Originally Posted by makaveli_lcf View Post
Thibault, excellent! Thank you for you work! Currently I am working on improving my model introducing a reconstruction for them... So hope to find some advantage on using it, will post some general conclusions.
cheng1988sjtu is offline   Reply With Quote

Old   July 22, 2015, 23:41
Default
  #8
New Member
 
Xavier Pivan
Join Date: May 2015
Posts: 10
Rep Power: 11
Navip is on a distinguished road
Hi Cheng,

Did you figure out why renconstruct was too dissipative ?
I'm trying to reproduce an experiment with settlingFOAM everything work except that my system dissipate too much and then the velocities are not strong enough. reconstruct might be a start.

Thanks
Navip is offline   Reply With Quote

Old   July 26, 2015, 23:11
Default
  #9
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 18
kmooney is on a distinguished road
There could be several sources of numerical dissipation. To start make sure you have achieved mesh convergence and using 2nd order discretization.

Quote:
Originally Posted by Navip View Post
Hi Cheng,

Did you figure out why renconstruct was too dissipative ?
I'm trying to reproduce an experiment with settlingFOAM everything work except that my system dissipate too much and then the velocities are not strong enough. reconstruct might be a start.

Thanks
kmooney is offline   Reply With Quote

Old   September 22, 2015, 05:37
Default
  #10
New Member
 
Michael
Join Date: Feb 2015
Posts: 18
Rep Power: 11
allett02015 is on a distinguished road
I think that fvc::reconstruct is dissipative because it is first order accurate.

It assumes Sum_f n_f ( S_f * u_p) = Sum_f n_f ( S_f * u_f) which is accurate up to irst order.

I have another question:

What is the difference between the method used to reconstruct the velocity at the cell center from the face center used in fvc::reconstruct and simply calculating it by Sum_f 1/|S_f| phi_f n_f ?
allett02015 is offline   Reply With Quote

Old   October 27, 2015, 05:33
Default
  #11
New Member
 
Michael
Join Date: Feb 2015
Posts: 18
Rep Power: 11
allett02015 is on a distinguished road
I have to add that the fvc::reconstruct is second order accurate for orthogonal grids. It can be seen by a Taylorseries expansion of the face velocity, i.e., U_f = U_c + dU/dx_c delta x + ... and inserting it into the relation sum n_f (S_f * u_c) = sum n_f (S_f * u_f)
allett02015 is offline   Reply With Quote

Old   March 16, 2020, 04:39
Default
  #12
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 844
Rep Power: 18
sharonyue is on a distinguished road
1. The fvc::reconstruct() function was used to smooth oscillation by combining usage of fvc::snGrad(). Typically you can write either 1) fvc::grad(p) or 2) fvc::reconstruct(fvc::snGrad(p)*mesh.magSf()). But the result is different. The first method uses a extended stencil whereas the second one employs a compact stencil. Thereafter the oscillation can be avoided by the second one (fvc::reconstruct method). Similar technique can be also found if you think why we discretize the laplacian term as fvc::laplacian() instead of div(grad()).

2. What it do is simply \sum U_p \cdot S_f = \sum phi, the reason you see there is because inv() function cannot handle velocity.

3. The order of it is influenced by the scheme of snGrad function. Therefore, orthogonal grids provide the best accuracy.



__________________
My OpenFOAM algorithm website: http://dyfluid.com
By far the largest Chinese CFD-based forum: http://www.cfd-china.com/category/6/openfoam
We provide lots of clusters to Chinese customers, and we are considering to do business overseas: http://dyfluid.com/DMCmodel.html
sharonyue is offline   Reply With Quote

Old   March 30, 2020, 14:48
Default
  #13
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
The fvc::reconstruct is only second order accurate, if the field that is reconstructed is regular enough to be approximated by Taylor series up to second-order. For example, the velocity at the fluid interface is not regular enough, as it is only C^0 continuous at the fluid interface - it has a kink there - so Taylor series do not apply at the interface.



We checked fvc::reconstruct a bit in our latest paper on Level Set / Front Tracking, see section "3.4. Surface tension force reconstruction" in the linked PDF. The error estimate corresponds to the numerical error exactly for a smooth velocity field, and for the velocity field from the Hadamard-Rybczynsky flow, which confirms the estimate.


fvc::reconstruct is used in flows with variable density to reconstruct things like the force term resulting from the decomposition pressure into the dynamic and hydrostatic part, or the cell-centered surface tension force source term, cell-centered velocity at the end of the internal iteration, etc. All these fields are not C^2 continuous in multiphase flows.

arXiv version of the paper is here

OpenFOAM tests for generating convergence data are here.

The data from the paper is here.
makaveli_lcf likes this.
__________________
When asking a question, prepare a SSCCE.
tomislav_maric is offline   Reply With Quote

Old   April 3, 2020, 13:23
Default
  #14
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24
santiagomarquezd will become famous soon enough
Hello, we discuss the foundation of fvc::reconstruct and other reconstruction techniques here,

https://www.sciencedirect.com/scienc...21999118301931

please let me now if someone needs a copy.

Regards!
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Old   April 3, 2020, 13:29
Default
  #15
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
Quote:
Originally Posted by santiagomarquezd View Post
Hello, we discuss the foundation of fvc::reconstruct and other reconstruction techniques here,

https://www.sciencedirect.com/scienc...21999118301931

Regards!

Thanks, I wasn't aware of this paper!
__________________
When asking a question, prepare a SSCCE.
tomislav_maric is offline   Reply With Quote

Old   April 3, 2020, 13:39
Default
  #16
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24
santiagomarquezd will become famous soon enough
You're welcome. Big fan of your papers and work.

State of the art concerning "spurious currents" in interFOAM

Regards!
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Old   April 3, 2020, 13:47
Default
  #17
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
Thanks! Also thanks for the link! I've read your comments there. I agree, everything is interconnected: surface tension model, curvature calculation, p-U coupling (reconstruction as a part of it), there is also the issue of hydrostatic/dynamic pressure decomposition for multiphase flows, as its flux has grad rho at the face center, that's bad for the reconstruction as well... in any case, it's not boring.
__________________
When asking a question, prepare a SSCCE.
tomislav_maric is offline   Reply With Quote

Old   April 17, 2021, 10:23
Default fvc::reconstruct operation
  #18
New Member
 
behnamCheraghi
Join Date: Feb 2021
Posts: 14
Rep Power: 5
behnamEll is on a distinguished road
I think that the following link is very useful for understanding the fvc::reconstruct operation:

https://github.com/wyldckat/reconstr...te-fields/wiki
behnamEll 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
About Phase Coupled SIMPLE (PC-SIMPLE) algorithm Yan Kai Main CFD Forum 0 April 18, 2007 03:48
About Phase Coupled SIMPLE (PC-SIMPLE) algorithm Yan Kai FLUENT 0 April 13, 2007 23:17
mach-uniform algorithm for LES/DNS ilyas Main CFD Forum 0 February 22, 2007 10:53
LES algorithm James Fluroe Main CFD Forum 2 December 27, 2001 17:51
SIMPLE algorithm Jonathan Castro Main CFD Forum 3 December 10, 1999 04:59


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