# get velocity gradient with a boundary function

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

 January 20, 2011, 10:08 get velocity gradient with a boundary function #1 Senior Member   Christian Lucas Join Date: Aug 2009 Location: Braunschweig, Germany Posts: 202 Rep Power: 11 Hi I want to write a new inlet boundary condition for epsilon. For this new boundary condition, I need calculate for instance the velocity gradient ( and magSqr(symm(fvc::grad(U))) ) I know I can get the velocity field at the patch using: const fvPatchField& U = patch().lookupPatchField("U"); The problem is (as I understand it) that by using the code above, U is a “vector patch field”. But if I want to get the velocity gradient (using fvc::grad(U)), U must be a volVectorField. Is there a way to get the velocity of the entire grid within the boundary condition, so that I can calculate the velocity gradient and then use this result to get the velocity gradient at the patch? Thanks for the help. Christian

 August 10, 2011, 05:57 #2 Senior Member   Join Date: Nov 2010 Posts: 113 Rep Power: 8 Hi Chris, did you succeed? I also want to get the velocity gradient at a patch.. Thanks in advance.

 August 10, 2011, 08:36 #3 Senior Member   Christian Lucas Join Date: Aug 2009 Location: Braunschweig, Germany Posts: 202 Rep Power: 11 Hi, I didn't looked into this subject much more and therefore didn't solve the problem. Please let me know if you do Best Regards Christian

August 24, 2012, 13:17
#4
New Member

Wei Liu
Join Date: Apr 2011
Location: West Lafayette, IN
Posts: 28
Rep Power: 8
Quote:
 Originally Posted by lindstroem Hi Chris, did you succeed? I also want to get the velocity gradient at a patch.. Thanks in advance.
Hi,

I also want to get the velocity gradient at a patch.

did you succeed?

Thanks!

Wei

 August 27, 2012, 03:11 #5 Senior Member   Christian Lucas Join Date: Aug 2009 Location: Braunschweig, Germany Posts: 202 Rep Power: 11 Hi, no, I have not continued this work. The following is a guess only (not sure if this works or even if this is correct): I guess you need the normal BC gradient and not the fvc::grad. Look at src/thermophysicalmodelbasic/derivatedFvPatchFields/gradientEnthalpy.C as shown there, you get the surfaceNormalGradient of a fvPatchScalarfield (hope the same is true for fvPatchVectorField) with the function snGrad. Another method is to calculate the gradient by hand. You have the value at the BC and the cell value next to the BC + the distance. However, this way you do not get the surfaceNormalGradient. Kind Regards, Christian

 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 Ozgur_ FLUENT 5 August 25, 2015 04:58 Joseph CFX 14 April 20, 2010 15:45 adona058 OpenFOAM Running, Solving & CFD 0 September 26, 2007 15:23 michele OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 July 15, 2005 04:15 Tudor Miron CFX 15 April 2, 2004 06:18

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