|
[Sponsors] |
August 22, 2014, 06:11 |
Loop of a inlet mass flow rate
|
#1 |
New Member
Thomas Green
Join Date: Aug 2014
Posts: 7
Rep Power: 12 |
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, 07:24 |
|
#2 |
Senior Member
Marcin
Join Date: May 2014
Location: Poland, Swiebodzin
Posts: 313
Rep Power: 13 |
You can use for this FSI one way method
|
|
August 22, 2014, 09:44 |
|
#3 |
New Member
Thomas Green
Join Date: Aug 2014
Posts: 7
Rep Power: 12 |
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 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Match mass flow rate with inlet pressure and outlet pressure | vut | Main CFD Forum | 9 | February 21, 2014 19:07 |
Mass flow rate of phase in post | mat_cfd | CFX | 0 | September 3, 2013 08:55 |
Convergence problem with target mass flow rate | ADL | FLUENT | 2 | May 29, 2012 22:11 |
Discrete Phase & Mass Flow Rate | MagnusZeus | FLUENT | 0 | December 2, 2011 18:57 |
Mass Flow Inlet | Pravir Kumar Rai | FLUENT | 0 | February 19, 2003 15:03 |