|
[Sponsors] |
November 2, 2017, 10:50 |
UDF for suction velocity on a wall
|
#1 |
New Member
Join Date: Jun 2016
Posts: 6
Rep Power: 10 |
Dear all,
I would like to create a UDF for suction velocity on a wall. and I can't use a velocity inlet on that wall since it is an interface between two domains. There are two walls next to each other with zero thicknesses ( a wall and its shadow). I want to have suction velocity on both of these walls. So, I was thinking about the DEFINE_ADJUST function. Can it be used for such a purpose? because based on the fluent manual it says: DEFINE_ADJUST is a general-purpose macro that can be used to adjust or modify ANSYS Fluent variables that are not passed as arguments. For example, you can useDEFINE_ADJUST to modify flow variables (for example, velocities, pressure) and compute integrals. but I'm having troubles in the commands of accessing the y velocity components on that wall for the fluid. This is what I came up with for now. Code:
#include "udf.h" DEFINE_ADJUST(myFunction,domain) { int zoneID; Thread *tf; face_t f1; zoneID = 9.0; // The ID of the wall on the BC list in fluent tf = Lookup_Thread(domain,zoneID); begin_f_loop(f1, tf) { THREAD_VAR(tf).fluid.velocity[1] = 0.01; } end_f_loop(f1, tf) } The function compiles with no issues and I hooked the function using the function hooks and the simulation completes with no problems. However I can't see any difference in the results and when I plot the y component of the velocity on the wall I get a flat line of zero values. any suggestions are welcomed. Thank you for your help |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Commercial meshers] Fluent3DMeshToFoam | simvun | OpenFOAM Meshing & Mesh Conversion | 50 | January 19, 2020 16:33 |
Wrong flow in ratating domain problem | Sanyo | CFX | 17 | August 15, 2015 07:20 |
VELOCITY vs VELOCITY IN STN FRAME vs RELATIVE VELOCITY | everest20 | FLUENT | 1 | July 13, 2015 09:35 |
Multicomponent fluid | Andrea | CFX | 2 | October 11, 2004 06:12 |
wall conduction, UDF | sudh | FLUENT | 0 | June 28, 2004 09:09 |