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

Gradient at face center of a scalar volume field

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 28, 2011, 13:33
Default Gradient at face center of a scalar volume field
  #1
Super Moderator
 
Praveen. C
Join Date: Mar 2009
Location: Bangalore
Posts: 343
Blog Entries: 6
Rep Power: 18
praveen is on a distinguished road
Hello

How do I get the gradient vector at the face centers, given a scalar volume field ?
praveen is offline   Reply With Quote

Old   June 28, 2011, 13:49
Default
  #2
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
Praveen, it's usually achieved by a linear interpolation of fvc::grad(field) at faces. The following is an example taken from:

src/transportModels/interfaceProperties/interfaceProperties.C


Code:
00113     // Cell gradient of alpha
00114     const volVectorField gradAlpha(fvc::grad(alpha1_));
00115 
00116     // Interpolated face-gradient of alpha
00117     surfaceVectorField gradAlphaf(fvc::interpolate(gradAlpha));
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   June 29, 2011, 01:02
Default
  #3
Super Moderator
 
Praveen. C
Join Date: Mar 2009
Location: Bangalore
Posts: 343
Blog Entries: 6
Rep Power: 18
praveen is on a distinguished road
Thanks. So I guess there is no available scheme to directly obtain face gradients by applying a green-gauss or least-squares scheme centered at the face-center.
praveen is offline   Reply With Quote

Old   June 29, 2011, 03:20
Default
  #4
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
Bernhard is on a distinguished road
What do you mean by directly? You set the discretization of grad(alpha) and interpolate(gradAlpha) in fvSchemes as you're used to.
Bernhard is offline   Reply With Quote

Old   June 29, 2011, 03:23
Default
  #5
Super Moderator
 
Praveen. C
Join Date: Mar 2009
Location: Bangalore
Posts: 343
Blog Entries: 6
Rep Power: 18
praveen is on a distinguished road
Without interpolation. Define a volume around the face center and apply green-gauss theorem. Or least squares method.
praveen is offline   Reply With Quote

Old   June 30, 2011, 09:00
Default
  #6
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
Bernhard is on a distinguished road
If you're referring to a staggered kind of mesh, I don't think such a thing is possible in OpenFOAM
Bernhard 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
[blockMesh] Internal walls of zero thickness anger OpenFOAM Meshing & Mesh Conversion 23 February 6, 2020 19:25
why i can't split a real volume with a virtual face. George Chen 28 Main CFD Forum 0 March 8, 2010 04:41
How to compute gradient for non-orthogonal grids? Paul Hsieh Main CFD Forum 3 November 11, 2003 05:52
Question on Face Temperature Gradient Tomasz Didenko FLUENT 1 June 27, 2003 05:30
calculate cell volume, center...? Paul Main CFD Forum 5 June 21, 2003 13:55


All times are GMT -4. The time now is 06:27.