CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

UDF for suction velocity on a wall

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 2, 2017, 10:50
Default UDF for suction velocity on a wall
  #1
New Member
 
Join Date: Jun 2016
Posts: 6
Rep Power: 9
ahmed425 is on a distinguished road
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)


}
is the use of "THREAD_VAR(tf).fluid.velocity[1]" correct to access the y component of the velocity on the wall ? or should I use "THREAD_VAR(tf).wall.v"

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
ahmed425 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


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