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

Gradient at face center of a scalar volume field

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 28, 2011, 12:33
Default Gradient at face center of a scalar volume field
  #1
Super Moderator
 
praveen's Avatar
 
Praveen. C
Join Date: Mar 2009
Location: Bangalore
Posts: 249
Blog Entries: 6
Rep Power: 9
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, 12:49
Default
  #2
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 418
Rep Power: 14
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.
Post-doctoral Fellow
Research Center for Computational Mechanics (CIMEC) - CONICET/FICH-UNL
T.E.: 54-342-4511594 Ext. 1005
Güemes 3450 - (3000) Santa Fe
Santa Fe - Argentina
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Old   June 29, 2011, 00:02
Default
  #3
Super Moderator
 
praveen's Avatar
 
Praveen. C
Join Date: Mar 2009
Location: Bangalore
Posts: 249
Blog Entries: 6
Rep Power: 9
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, 02:20
Default
  #4
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 12
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, 02:23
Default
  #5
Super Moderator
 
praveen's Avatar
 
Praveen. C
Join Date: Mar 2009
Location: Bangalore
Posts: 249
Blog Entries: 6
Rep Power: 9
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, 08:00
Default
  #6
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 12
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

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Internal walls of zero thickness anger OpenFOAM Native Meshers: blockMesh 21 March 19, 2015 10:21
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 04:30
calculate cell volume, center...? Paul Main CFD Forum 5 June 21, 2003 12:55


All times are GMT -4. The time now is 10:47.