CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT

UDF problem

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

LinkBack Thread Tools Search this Thread Display Modes
Old   October 29, 2007, 00:31
Default UDF problem
mansha goraya
Posts: n/a
i have to define a UDF function for the displacement of diaphragm deflection of a chamber. the chamber is filled of liquid. Due to movement of diaphragm the liquid flows out from the chamber. the velocity of the diaphragm is given in the following UDF function.

#include "udf.h"

static float V_Prev=0.0;

DEFINE_CG_MOTION(unsteady_velocity, dt,vel, omega,time,dtime) {

thread *t;

face_t f;

float NV_VEC(A);

float velocity;

NV_S(vel, =, 0.0);

NV_S(omega, =, 0.0);

if (!Data_Valid_P());



velocity = (0.0000004*2.*3.1415926*300 cos (2.*3.1415926*time*300.));

begin_f_loop(f, t) {

V_Prev(A, f, t) = velicty; }

end_f_loop(f, t)

message ("time = %f, z_vel= %f", time, V_Prev);



i write this udf function with the help of CG motion udf given in the manual. this UDF function gives so many errors when i try to compile this function. i shall be very very thankful to any one who will help me in this regard.

  Reply With Quote


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
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM Rizwan Fluent UDF and Scheme Programming 40 March 18, 2018 06:05
what's the problem with my udf zzyan FLUENT 0 November 4, 2010 03:56
Problem with my udf july Fluent UDF and Scheme Programming 3 June 20, 2010 06:56
udf compiling problem akr FLUENT 3 August 22, 2007 07:14
UDF problem chiseung FLUENT 4 January 10, 2002 09:58

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