CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   Macros - Time dependent (http://www.cfd-online.com/Forums/fluent-udf/106863-macros-time-dependent.html)

saisanthoshm88 September 11, 2012 04:47

Macros - Time dependent
 
Could some one please explain the difference between the solver macros CURRENT_TIME and CURRENT_TIMESTEP in Fluent.

I'd appreciate an explanation with a short example

Amir September 11, 2012 05:35

CURRENT_TIME is the current physical time and CURRENT_TIMESTEP is the current numerical used time step. (In some algorithms, the floating time step may use)
e.g., for a case with fixed time step of 1 sec, after 10 time step we have:
CURRENT_TIME=10 sec
CURRENT_TIMESTEP=1 sec

Bests,

saisanthoshm88 September 11, 2012 06:50

Thanks for the reply Amir. I've a question on writing a udf that involves an interpolation

For instance i have the following case where the inlet pressure varies with times as follows:

Time [sec] - 0 0.2 0.3
Pressure [Pa] - 0 10 0

so the udf should now interpolate for the values of pressure in the intervals [0,0.2] and [0.2,0.3] in this case.

Here it is only a few points so it may be easier to just extract the interpolation functions easily and frame the udf but is there a better way of doing this when the data is much.

Amir September 11, 2012 08:10

yes, there is. You can use a profile instead of UDF. (refer to the manual-> transient profiles)

Bests,


All times are GMT -4. The time now is 08:51.