|
[Sponsors] |
get velocity gradient with a boundary function |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 20, 2011, 09:08 |
get velocity gradient with a boundary function
|
#1 |
Senior Member
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18 |
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<vector>& U = patch().lookupPatchField<volVectorField, vector>("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: 15 |
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: 18 |
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: 29
Rep Power: 15 |
||
August 27, 2012, 03:11 |
|
#5 |
Senior Member
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18 |
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 | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with assigned inlet velocity profile as a boundary condition | Ozgur_ | FLUENT | 5 | August 25, 2015 04:58 |
ATTENTION! Reliability problems in CFX 5.7 | Joseph | CFX | 14 | April 20, 2010 15:45 |
Calculated gradient boundary condition similar to gammaContactAngle | adona058 | OpenFOAM Running, Solving & CFD | 0 | September 26, 2007 15:23 |
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues | michele | OpenFOAM Meshing & Mesh Conversion | 2 | July 15, 2005 04:15 |
New topic on same subject - Flow around race car | Tudor Miron | CFX | 15 | April 2, 2004 06:18 |