# interpret several UDF

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

 November 1, 2010, 09:23 interpret several UDF #1 New Member   Eddie Join Date: Aug 2010 Posts: 8 Rep Power: 9 Hi I prepared the following UDF for Darcy term in DC casting, for velocity in x direction. It was interpreted successfully. I want use some other UDFs like this for velocity in y direction, k and epsilon. But I see only the last interpreted UDF and I can't see all of them in the graphical panel in source terms part. Please help me.... /*EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE EEEEEEEEEEEEEEEEE UDF that adds Darcy source term for U in the X direction DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD DDDDDDDDDDDDDDDDD*/ #include "udf.h" #define FST 0.3 #define TL 903 #define TS 743 #define TF 933 #define kp 0.16 #define shi 1.0e-15 #define visc 0.001 #define K0 2.0e-11 real TEMP, DEPVAR, SDEPVAR, PERM, FL, FS; /*real DEPVAR; real SDEPVAR; real PERM; real FL; real FS;*/ DEFINE_SOURCE(darcy_ux, c, t, dS, eqn) { real source; TEMP= C_T(c,t); DEPVAR= C_U(c,t); SDEPVAR= 0. ; /***** cacculation of FL & FS *****/ if (TEMP >= TL) { FL=1. ; } if ((TEMP > TS) && (TEMP < TL)) { FL= 1.-1./(1.-kp)*(TL-TEMP)/(TF-TEMP); } if (TEMP <= TS) { FL= 0. ; } /***** cacculation Permeability & Darcy term *****/ if (FS==0.) { source = dS[eqn] = 0. ; } if ((FS>0.) && (FS<=FST)) { source = dS[eqn] = 0. ; } if ((FS>=FST) && (FS<1.)) { PERM=K0*pow((1.-FS),3.)/pow(FS,2.); source = -visc/(PERM+shi)*DEPVAR + visc/(PERM+shi)*SDEPVAR ; dS[eqn]= visc/(PERM+shi) ; } return source; }

 Tags interpret, several variables, udf

 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 AlexanderSventitskiy FLUENT 4 August 18, 2011 08:10 Lotfi FLUENT 1 August 26, 2007 12:58 Prasad FLUENT 1 August 15, 2007 08:44 Atsu FLUENT 4 April 22, 2006 15:04 Leonard FLUENT 1 October 22, 2005 10:06

All times are GMT -4. The time now is 14:48.