CFD Online Discussion Forums

CFD Online Discussion Forums (
-   ANSYS (
-   -   Writing a step function in transient thermal problems (

kolvos July 28, 2012 15:56

Writing a step function in transient thermal problems

I've been trying to write a step function that makes my convection coefficient 0 every 6.4 seconds for a period of time of 0.3 secs. Other periods of time I want it to be 25.. I want this to continue indefinitely.

Anyone has ideas? Would really be glad if someone just wrote me the function..


flotus1 July 30, 2012 05:59

In fluent you could use a UDF which includes the following

double time;
double coeff;

while(time > 6.7)
time = time-6.7;
if(time < 6.4) coeff = 25.0;
else coeff = 0.0;

kolvos July 30, 2012 06:46

Hi and thanks for you feedback.

How should I input this kind of code?
I was meaning to use the "Functions" option under Define Loads..

Thanks again

flotus1 July 30, 2012 08:12

So I see you are using the "transient thermal" node in Ansys workbench.
I don't know if it is possible there have this kind of boundary condition unless you write a table with the values for the whole simulation time.

Personally, I would rather use Fluent or CFX for a transient thermal analysis.

kolvos July 30, 2012 08:23

How can I write a table?


All times are GMT -4. The time now is 03:40.