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

UDF problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 29, 2007, 01:31
Default UDF problem
  #1
mansha goraya
Guest
 
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());

return;

t=DT_THREAD(dt);

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);

vel[0]=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

Reply


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 07:05
what's the problem with my udf zzyan FLUENT 0 November 4, 2010 04:56
Problem with my udf july Fluent UDF and Scheme Programming 3 June 20, 2010 07:56
udf compiling problem akr FLUENT 3 August 22, 2007 08:14
UDF problem chiseung FLUENT 4 January 10, 2002 10:58


All times are GMT -4. The time now is 19:47.