# UDF on-off Pulsed velocity inlet

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

 LinkBack Thread Tools Search this Thread Display Modes
 March 10, 2002, 22:07 UDF on-off Pulsed velocity inlet #1 Samuel Guest   Posts: n/a Hi, I've got a problem using UDF for inlet velocity profile. I have managed to write in Matlab file, but having trouble to write in Fluent UDF file. **********vinlet.m*********** clear all;
for I=0:Per:0.5
for t = I:0.001:I+Per
if(t<=I+Per/3), Flow = abs(A*sin(3*pi*t/Per)); else Flow = 0; end plot (t,Flow); hold on;
end
end
plot (t,Flow); *****END****** *******vinlet.c*********** #include "udf.h" DEFINE_PROFILE(inlet_xv_sinusoidal, /* function name */
thread, /* thread */ nv) /* variable number */
{
face_t f; real pi = 4*atan(1); real U = 36.6; real A = 3*pi*U/2; real Per = 0.1; real i; real flow_time = RP_Get_Real("flow-time"); for (i=0:Per:flow_time) /* NOT sure how to define "for" or is this possible? */ {
begin_f_loop (f,thread) {
if (flow_time <= i+Per/3.) { F_PROFILE(f,thread,nv) = fabs(A*sin(0.3*pi*flow_time)); /* What is an equivalent command for "hold on" in Fluent or is this possible?*/ } else { F_PROFILE(f,thread,nv) = 0.; }
} end_f_loop (f,thread)
} end *****END******** I am trying to model on-off pulsed jet with 1:2 ratio. My real question is how to create a loop for the cycles in terms of flow_time. As in the matlab, I just defined this cycle (the fisrt loop, i = 0:0.1:0.5) where 0.5 being a chosen number, as in the FLUENT, it should be defined in "Interate" FLUENT GUI panel as "number of time step". Is it possible to create a loop for flow_time? Any inputs will be appreciated! Thanks sam

 Thread Tools Search this Thread Search this Thread: Advanced Search 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 Off Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Faruk Beyca FLUENT 4 June 24, 2022 10:45 haihek FLUENT 7 August 2, 2019 07:45 sara FLUENT 0 October 11, 2007 18:04 Knut Lehmann Main CFD Forum 2 June 29, 2007 04:53 Ray Hong FLUENT 4 December 30, 2005 12:32

All times are GMT -4. The time now is 21:33.

 Contact Us - CFD Online - Privacy Statement - Top