|
[Sponsors] |
July 3, 2008, 18:30 |
time-dependent_velocity
|
#1 |
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 |
|
July 4, 2008, 03:36 |
Re: time-dependent_velocity
|
#2 |
Guest
Posts: n/a
|
this is in the user guide so just copy that format.
|
|
July 4, 2008, 04:16 |
Re: time-dependent_velocity
|
#3 |
Guest
Posts: n/a
|
Hi lemon,
Unfortunately, I have no access to user guide ! Can you please send me the corresponding format ? Thanks. |
|
July 4, 2008, 11:52 |
Re: time-dependent_velocity
|
#4 |
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) } } |
|
July 9, 2008, 15:41 |
Re: time-dependent_velocity
|
#5 |
Guest
Posts: n/a
|
Well received
thank you Lemon ! Best Regards |
|
|
|
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 |