CFD Online Logo CFD Online URL
Home > Forums > FLUENT

UDF + tangential/normal direction

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

LinkBack Thread Tools Display Modes
Old   October 7, 2016, 05:17
Default UDF + tangential/normal direction
New Member
Join Date: Mar 2012
Posts: 20
Rep Power: 7
daxterss is on a distinguished road
Hi all,

I want to write an UDF function for a velocity boundary condition. I want that the velocity is tangential (or normal... i can later change it!) for a curved face (imagine an airfoil).
My problem is that I don't know how to define the normal vector for each cell... is there such function??? I saw "f_normal" but I don't know how to apply in my "define_profile" UDF function.

As an example, I copy you a simple function for a flat configuration (but I need to put normal or tangential because my shape is curved):

DEFINE_PROFILE(VelX, thread, position)
face_t f;
real x[ND_ND];
real vel=49.8733;

begin_f_loop(f, thread)
F_PROFILE(f, thread, position) = vel;
end_f_loop(f, thread)

Any help is appreciated ;D
daxterss is offline   Reply With Quote


Thread Tools
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with unsteady calculation with source/sink UDF RobV FLUENT 1 November 13, 2016 06:44
Fluent Radiation/porous media Schmitt pierre-Louis FLUENT 26 September 1, 2016 10:29
UDF Compilation Error - Loading Library - COMMON Problem! Help! robtheslob Fluent UDF and Scheme Programming 8 July 24, 2015 00:53
UDF for Oscillating Membrane/Diaphragm of a Synthetic Jet cuan1029 Fluent UDF and Scheme Programming 0 December 8, 2014 09:20
Help! Delete the UDM codes in the UDF Messi Fluent UDF and Scheme Programming 2 January 28, 2014 10:01

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