# Loop of a inlet mass flow rate

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

 August 22, 2014, 05:11 Loop of a inlet mass flow rate #1 New Member   Thomas Green Join Date: Aug 2014 Posts: 7 Rep Power: 3 Hi all, I have a problem with my UDF. I am trying to create a cycle of a well defined mass flow rate in the inlet of a square channel. I need to create a loop for a inlet mass flow rate of 1.5 if the time is under 10 seconds and when it is over 10 seconds it should be 8.33 until it arrives to 20 seconds. These two steps (high & low mass flow rate) then should be cycled 200 times. Below I attach the code I wrote to clarify the problem. #include "udf.h" int j=0; int k=10; int n; int o; int m; int v=10; DEFINE_PROFILE(flow_profile,t,i){ face_t f; real ti=CURRENT_TIME; begin_f_loop(f,t){ for ( n=0; n<=200; n++ ){ if(ti>=j && ti<=v){ F_PROFILE(f,t,i)=1.5; }else{ o=j+10; v=k+10; if( ti>o && ti<=v ){ F_PROFILE(f,t,i)=8.33; }else{ j=j+10; v=v+10; } } m=n;} } end_f_loop(f,t) }

 August 22, 2014, 06:24 #2 Senior Member     Marcin Join Date: May 2014 Location: Poland, Swiebodzin Posts: 131 Rep Power: 4 You can use for this FSI one way method

 August 22, 2014, 08:44 #3 New Member   Thomas Green Join Date: Aug 2014 Posts: 7 Rep Power: 3 Ok thank you for your fast answer, finally I found the solution only changing some variables.

 Tags loop over define_profile, mass flow rate inlet, udf code

 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 vut Main CFD Forum 9 February 21, 2014 19:07 mat_cfd CFX 0 September 3, 2013 07:55 ADL FLUENT 2 May 29, 2012 21:11 MagnusZeus FLUENT 0 December 2, 2011 18:57 Pravir Kumar Rai FLUENT 0 February 19, 2003 15:03

All times are GMT -4. The time now is 06:04.