# Editing a UDF for a velocity boundary in a multiphase

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 LinkBack Thread Tools Display Modes
 May 7, 2009, 15:48 Editing a UDF for a velocity boundary in a multiphase #1 New Member   Join Date: May 2009 Posts: 3 Rep Power: 9 Hello, Does someone have an example of how to specify velocity as function of time for a multiphase mixture at a velocity inflow boundary condition? I am using a VOF scheme. I know I'll get a RTFM but I did read the manual and other posts in this forum related to my question. I am confused as to if I should use both domain and subdomain pointers. I started by trying to augment the following code that works for a single phase situation but maybe that is not the way to go: /************************************************** ******************** unsteady.c UDF for specifying a transient velocity profile boundary condition ************************/ #include"udf.h" #include"unsteady.h" float *vel_data, vel; //velocity will be redefined as mass flow for the purposes of this problem DEFINE_PROFILE(unsteady_velocity, thread, position) { face_t f; int t = N_TIME; begin_f_loop(f, thread) { F_PROFILE(f, thread, position) = vel_data[t]; } end_f_loop(f, thread) } DEFINE_ON_DEMAND(read_velocity) { int i = 0; int *time_data, filelength, time; FILE* fp; #if !RP_NODE Message("Beginning Read File Routine \n"); #endif fp = fopen("velocity.dat","r"); if ( fp!=NULL ) { #if !RP_NODE Message(" \n"); Message("Reading file velocity.dat \n"); Message(" \n"); #endif } else { #if !RP_NODE Message(" \n"); Message("Error opening file \n"); Message(" \n"); #endif } fscanf(fp,"%i \n",&filelength); #if !RP_NODE Message("The file length is: %i \n",filelength); #endif //time_data = (int *) malloc(filelength*sizeof(int)); vel_data = (float *) malloc(filelength*sizeof(float)); if ( (vel_data==NULL) ) { #if !RP_NODE Message("Memory allocation error \n"); #endif } for(i=0; i

 Tags multiphase, udf, velocity

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Raj FLUENT 3 February 1, 2009 19:29 Morten Andersen CFX 1 January 8, 2007 12:37 cxzhao FLUENT 0 July 4, 2005 00:06 x.tang FLUENT 1 May 4, 2001 09:11 Lee, Juhee Main CFD Forum 3 October 22, 1998 15:30

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

 Contact Us - CFD Online - Top