CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Loop of a inlet mass flow rate

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 22, 2014, 06:11
Default Loop of a inlet mass flow rate
  #1
New Member
 
Thomas Green
Join Date: Aug 2014
Posts: 7
Rep Power: 12
.Thomas. is on a distinguished road
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)
}
.Thomas. is offline   Reply With Quote

Old   August 22, 2014, 07:24
Default
  #2
Senior Member
 
Martin_Sz's Avatar
 
Marcin
Join Date: May 2014
Location: Poland, Swiebodzin
Posts: 313
Rep Power: 13
Martin_Sz is on a distinguished road
You can use for this FSI one way method
Martin_Sz is offline   Reply With Quote

Old   August 22, 2014, 09:44
Default
  #3
New Member
 
Thomas Green
Join Date: Aug 2014
Posts: 7
Rep Power: 12
.Thomas. is on a distinguished road
Ok thank you for your fast answer, finally I found the solution only changing some variables.
.Thomas. is offline   Reply With Quote

Reply

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


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


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