|June 16, 2013, 04:02||
Declation of a vector in a UDF
Join Date: Nov 2012
Posts: 1Rep Power: 0
I am having some troubles with the declaration of a vector in a UDF. The UDF is used for varying the time step. The vector is using for describing this variation.
In this exemple, I want a first time step of 1, then of 5, then of 2 and finally of 4 for having successively a flow time of 1, 6, 8, 12.
So, I declare the vector by this way :
V=(1, 5, 2, 4);
And then I use a for loop by this way where dt is the time step:
for(i=0; i<=3; i++)
The problem is that I didn't have the except result. I have successively a flow time of 4, 8, 12, 16.
I think that only the last coordinate of the vector is taken into account. The resulting flow time is the last coordinate, two time the last coordinate, ect.
So, I suppose that I incorrectly declare the vector. In the bracket, I define the vector dimension and in the parenthesis I define the coordinates of the vector.
Can someone explain me how to declare a vector for my purpose ?
Thanks in advance.
|Thread||Thread Starter||Forum||Replies||Last Post|
|UDF parallel error: chip-exec: function not found?????||shankara.2||Fluent UDF and Scheme Programming||1||January 16, 2012 23:14|
|How to add a UDF to a compiled UDF library||kim||FLUENT||3||October 26, 2011 21:38|
|Dynamic Mesh UDF||Qureshi||FLUENT||1||December 2, 2009 01:27|
|UDF...UDF...UDF...UDF||Luc SEMINEL||FLUENT||0||November 25, 2002 05:03|
|UDF, UDF, UDF, UDF||Luc SEMINEL||Main CFD Forum||0||November 25, 2002 05:01|