|
[Sponsors] |
March 14, 2005, 16:50 |
UDF interpretation trough TUI
|
#1 |
Guest
Posts: n/a
|
Hi everybody, I am working on a pulsatile flow simulation. I use a UDF to define a parabolic velocity profile at inlet of my model with a time-dependent centerline velocity.
My problem is that I cannot "interpret" the UDF through text commands but it seems that I cannot link the interpreted UDF to the appropriate boundary condition (in my case the UDF is used for the x-velocity component). Fluent prompts for file name and file data. I tried entering my UDF source code file without success. I would be grateful for any advice anyone might have on this. Best Regards David |
|
March 15, 2005, 03:55 |
Re: UDF interpretation trough TUI
|
#2 |
Guest
Posts: n/a
|
Hi,
You would get much more help if you put the error that fluent gave you up here, also your UDF...if there are some bugs ppl can see it. rgds Melaku Habte |
|
March 18, 2005, 15:26 |
Re: UDF interpretation trough TUI
|
#3 |
Guest
Posts: n/a
|
Hi Melaku,
I am still struggling with this so I would appreciate your help. As mentionned previously, I need a certain UDF for inlet velocity. When using text commands, I am having problem "hooking" the UDF at velocity inlet once it has been interpreted succesfully. Also I cannot use an boundary profile file because the inlet condition has a time and space dependency. (See UDF) Below I have copied part of the transcript file. Look closely to the definition of the velocity inlet condition. More precisely: profile name [""] "square_wave" data name [""] "square_wave" where square_wave is the name of my UDF. Am I doing somethig wrong? (See below Transcript File) Also, bear in mind that I do not get an error message as you might have tought from my previous message. Nevertheless when I verify, with GUI, the x-velocity component for the velocity inlet has not been updated has I would like. /*Partial Transcript File*/ > /define/user-defined/interpreted-functions UDF Source File Name [""] "c:libudfsquare_wave0.c" CPP Command Name ["cpp"] "cpp" virtual machine stack size [10000] 10000 display assembly code listing? [no] no cpp -IC:\FLUENT.INC\fluent6.1.22/src -IC:\FLUENT.INC\fluent6.1.22/cortex/src -IC:\FLUENT.INC\fluent6.1.22/client/src -IC:\FLUENT.INC\fluent6.1.22/multiport/src -I. -DUDFCONFIG_H="<udfconfig.h>" c:\libudf\square_wave0.c > /define/boundary-conditions/velocity-inlet (velocity_inlet.11) zone id/name [velocity_inlet.11] 3 Velocity Specification Method: Magnitude and Direction [no] no Velocity Specification Method: Components [no] yes Reference Frame: Absolute [yes] yes Use Profile for X-Velocity? [no] yes profile name [""] "square_wave" data name [""] "square_wave" Use Profile for Y-Velocity? [no] "no 0 The UDF that I would like to use is as follows. But again I do not think the problem lies there has Fluent interprets it succcesfully: #include "udf.h" DEFINE_PROFILE (square_wave,thread,position) { #define PI 3.14159 real x[ND_ND]; face_t f; real z,y,test; z=CURRENT_TIME; if (z<0.30) test =0; else if (z<0.70) test=2*sin(2.5*PI*z-2.3562); else if (z<1.3) test=0; else if (z<1.7) test=2*sin(2.5*PI*z-1.3*2.5*PI); else if (z<2.3) test=0; else if (z<2.7) test=2*sin(2.5*PI*z-2.3*2.5*PI); else if (z<3.3) test=0; else if (z<3.7) test=2*sin(2.5*PI*z-3.3*2.5*PI); else if (z<4.3) test=0; else test=0; begin_f_loop(f, thread) /*magnitude=0;*/ { F_CENTROID(x,f,thread); y = x[1]; F_PROFILE(f,thread,position) = test - y*y/(.0065*.0065)*test; } end_f_loop(f, thread) } Any comments or observations would be of great help. Regards, David |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF Interpretation Error | levonlarson | FLUENT | 0 | July 18, 2011 12:57 |
Problem in Interpretation of UDF | coolkdm | Fluent UDF and Scheme Programming | 2 | June 11, 2011 04:42 |
solving ODE with interpretation of UDF | wlt_1985 | FLUENT | 0 | January 17, 2011 03:56 |
struggling with interpretation of UDF in fluent | Suman Kandula | FLUENT | 0 | August 9, 2007 13:56 |
UDF Interpretation | Suvash | FLUENT | 0 | November 1, 2005 00:10 |