Gradient at face center of a scalar volume field

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

 June 28, 2011, 12:33 Gradient at face center of a scalar volume field #1 Super Moderator     Praveen. C Join Date: Mar 2009 Location: Bangalore Posts: 249 Blog Entries: 6 Rep Power: 9 Hello How do I get the gradient vector at the face centers, given a scalar volume field ?

 June 28, 2011, 12:49 #2 Senior Member     Santiago Marquez Damian Join Date: Aug 2009 Location: Santa Fe, Santa Fe, Argentina Posts: 418 Rep Power: 14 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

 June 29, 2011, 00:02 #3 Super Moderator     Praveen. C Join Date: Mar 2009 Location: Bangalore Posts: 249 Blog Entries: 6 Rep Power: 9 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.

 June 29, 2011, 02:20 #4 Senior Member   Bernhard Join Date: Sep 2009 Location: Delft Posts: 790 Rep Power: 12 What do you mean by directly? You set the discretization of grad(alpha) and interpolate(gradAlpha) in fvSchemes as you're used to.

 June 29, 2011, 02:23 #5 Super Moderator     Praveen. C Join Date: Mar 2009 Location: Bangalore Posts: 249 Blog Entries: 6 Rep Power: 9 Without interpolation. Define a volume around the face center and apply green-gauss theorem. Or least squares method.

 June 30, 2011, 08:00 #6 Senior Member   Bernhard Join Date: Sep 2009 Location: Delft Posts: 790 Rep Power: 12 If you're referring to a staggered kind of mesh, I don't think such a thing is possible in OpenFOAM

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post anger OpenFOAM Native Meshers: blockMesh 21 March 19, 2015 10:21 George Chen 28 Main CFD Forum 0 March 8, 2010 04:41 Paul Hsieh Main CFD Forum 3 November 11, 2003 05:52 Tomasz Didenko FLUENT 1 June 27, 2003 04:30 Paul Main CFD Forum 5 June 21, 2003 12:55

All times are GMT -4. The time now is 01:35.