CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Diameter variation eulerian model (http://www.cfd-online.com/Forums/fluent/99536-diameter-variation-eulerian-model.html)

alekso April 5, 2012 12:25

Diameter variation eulerian model
 
Hi
I'm tryng to write an udf for diameter-time dipendent laws. For example

diam=0.003-0.3*current_time

where current_time is the flow time (in seconds). But seems it doesn't works

This is my UDF

#include "udf.h"

DEFINE_PROPERTY(diam,c,t)
{

Thread **pt = THREAD_SUB_THREADS(t);
Thread *tp = pt[0]; //
Thread *ts = pt[1];
real diam;

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

diam=0.003-0.3*current_time;


return diam;
}

Is it possible to print every time step the diameter on the window to check if the udf works?

Thank you.


All times are GMT -4. The time now is 01:35.