CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Transient boundary condition with Fluent ANSYS12 (

jetboo June 30, 2011 12:10

Transient boundary condition with Fluent ANSYS12
hi everyone, i need to set a transient boundary condition for a pressure outlet.

I want it to decrease linearly from 160000 Pa to 60000 in 0.2 secs

With StarCCM+ i use this field function

($Time >= 0.2) ? -40000 : (60000-500000*$Time)
(the values are relatives to atmospheric pressure)

With fluent, i tried the profiles like stated in the manual (chapter7.1.9) but it doesnt seem to work. How can i do this either way ??


Micael June 30, 2011 12:23

I think the best way to do this is with an UDF. Something like that:

 real pressure;
 face_t f;
 pressure = (CURRENT_TIME >= 0.2) ? -40000 : (60000-500000*CURRENT_TIME);
  F_PROFILE(f,t,i) = pressure;

Also, keep in mind that FLUENT solver normally expect that outlet pressure is gauge pressure.

jetboo June 30, 2011 12:40

wow thank you,i didnt expect an answer so quickly i am really a novice in C so i dont get all of

what you wrote there but it seems to work so it's GREAT ! :D

Can you explain the

face_t f;
line plz?

Micael June 30, 2011 13:02

face_t is a data type specific to FLUENT. It is used to store an integer that identifies a particular face within a face thread (a boundary is a face thread). The macro begin_f_loop need it to work. Actually, begin_f_loop will give a value to the variable "f" that represents the current face under calculation. This value change at each loop. There is a lot of macro that use this value to give useful information about the given face, like its area or its temperature, as examples.

All times are GMT -4. The time now is 18:48.