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

time-dependent_velocity

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 3, 2008, 18:30
Default time-dependent_velocity
  #1
Abel
Guest
 
Posts: n/a
Hi, I have a time dependent inlet velocity :

Ux = 100*time, if time < = 4 Ux = 400, otherwise

Please, How to write the correspondant UDF in C language ?

Thanks
  Reply With Quote

Old   July 4, 2008, 03:36
Default Re: time-dependent_velocity
  #2
red lemon
Guest
 
Posts: n/a
this is in the user guide so just copy that format.
  Reply With Quote

Old   July 4, 2008, 04:16
Default Re: time-dependent_velocity
  #3
Abel
Guest
 
Posts: n/a
Hi lemon,

Unfortunately, I have no access to user guide !

Can you please send me the corresponding format ?

Thanks.

  Reply With Quote

Old   July 4, 2008, 11:52
Default Re: time-dependent_velocity
  #4
red lemon
Guest
 
Posts: n/a
heres a udf for mass as a function of time so you should be able to mod for velocity then hook into the bc panel:

/* UDF for setting target mass flow rate in pressure-outlet */

/* at t<0.2 sec the target mass flow rate set to 1.00 kg/s */

/* when t>0.2 sec the target mass flow rate will change to 1.35 kg/s */

#include "udf.h"

DEFINE_PROFILE(tm_pout2, t, nv)

{

face_t f ;

real flow_time = RP_Get_Real("flow-time");

if (flow_time < 0.2 )

{

printf("Time = %f sec. \n",flow_time);

printf("Targeted mass-flow rate set at 1.0 kg/s \n");

begin_f_loop(f,t)

{

F_PROFILE(f,t,nv) = 1.0 ;

}

end_f_loop(f,t)

}

else

{

printf("Time = %f sec. \n",flow_time);

printf("Targeted mass-flow rate set at 1.35 kg/s \n") ;

begin_f_loop(f,t)

{

F_PROFILE(f,t,nv) = 1.35 ;

}

end_f_loop(f,t)

}

}
  Reply With Quote

Old   July 9, 2008, 15:41
Default Re: time-dependent_velocity
  #5
abel
Guest
 
Posts: n/a
Well received

thank you Lemon !

Best Regards
  Reply With Quote

Reply


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
Long time CHT transient simulation time step.... JP CFX 0 May 9, 2008 03:36
autosave at flow time with adaptive time stepping Ybes FLUENT 0 November 3, 2007 12:32
local time stepping and pseudo time phil Fidelity CFD 0 February 27, 2006 16:26
Relation of computational time step with real time Salman Main CFD Forum 2 August 3, 2005 14:13
physical time scale.... real time? soubhik CFX 6 November 7, 2003 02:32


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