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

 December 10, 2013, 09:54 Accessing surface normal gradient #1 New Member   Join Date: Nov 2013 Posts: 20 Rep Power: 5 Hello, I am trying to access the surface normal gradient of a certain variable (i.e. a) (unstructured grid). fvc::snGrad(a) only gives me the absolute value, right? (surfaceScalarField). How do I get the surfaceVectorField version of that? And on top of that: How does this (hopefully existing) quantity behave on boundary surfaces of a cell? I imagine it being defined as (a(V1)-a(V2))/d. Now if a has a Diriclet condition on the boundary, how would that work? (Can't define a Neumann bc, the change of gradient on the boundary is crucial for my function). Would be great if someone could give me a hint here Thanks in advance.

 December 10, 2013, 10:02 #2 Senior Member     Anton Kidess Join Date: May 2009 Location: Delft, Netherlands Posts: 1,163 Rep Power: 20 A surface*Normal*Gradient always only has a magnitude, because the direction is given by the face normal. snGrad(a) * mesh.Sf() I guess will give you the gradient vector. __________________ *On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. *Join the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oHPxcPqde7HtA2

 December 10, 2013, 12:11 #3 New Member   Join Date: Nov 2013 Posts: 20 Rep Power: 5 mesh.Sf() also includes the face area rght? So I guess mesh.Sf()/mesh.magSf() should do it then? Thanks by the way! Still though, how does it behave at boundaries? Would it use the value on the boundary instead of the neighboring volume?

 December 10, 2013, 12:23 #4 Senior Member     Anton Kidess Join Date: May 2009 Location: Delft, Netherlands Posts: 1,163 Rep Power: 20 Right. About the boundary question - why would snGrad neglect your boundary conditions, no matter what you select? __________________ *On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. *Join the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oHPxcPqde7HtA2

 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 marimuthusundar Fluent UDF and Scheme Programming 0 June 21, 2012 04:48 fumiya OpenFOAM 1 September 30, 2011 04:34 ohrmond CFX 2 August 16, 2006 03:40 Abrem FLUENT 1 April 30, 2006 03:41 Chie Min CFX 5 July 12, 2001 23:19

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