|
[Sponsors] |
March 17, 2005, 08:10 |
udf with spacial and time variables
|
#1 |
Guest
Posts: n/a
|
Hello,everyone,I want to know if "udf" can define the spacial variable and time variable simutaneously. Actually, I want to impose a velocity profile on the inlet which varies with space and time. In my udf file, I use both "F_CENTROID(x,f,thread);y=x[1], z=x[2]" and "real t=RP_Get_Real("flow-time"); --- line29" in the loop; But when I try to interpret the *.c, some errors arise, such as "line 29: parse error.""t, undeclared variable".
Thanks for your attention. |
|
March 17, 2005, 08:19 |
Re: udf with spacial and time variables
|
#2 |
Guest
Posts: n/a
|
Do you give me any suggestion to realize it? Thanks alot!
|
|
March 17, 2005, 08:50 |
Re: udf with spacial and time variables
|
#3 |
Guest
Posts: n/a
|
You should declare the variable t outside the DEFINE_PROFILE function. I had the same problem and it works this way (but I don't know why).
Dirk |
|
March 17, 2005, 09:00 |
Re: udf with spacial and time variables
|
#4 |
Guest
Posts: n/a
|
Dirk, thank you very much. you mean I declare the variable "t" in the same way as it in the DEFINE_PROFILE, or just declare it as "real t". I'll try it now, ^_^
|
|
March 17, 2005, 09:39 |
Re: udf with spacial and time variables
|
#5 |
Guest
Posts: n/a
|
first define it spatially and then do it in time
|
|
March 17, 2005, 11:26 |
Re: udf with spacial and time variables
|
#6 |
Guest
Posts: n/a
|
@_@, it does not work now. Maybe I have misunderstood the suggestion. Could you give some detail illustration? Thank you very much!
|
|
March 17, 2005, 23:46 |
Re: udf with spacial and time variables
|
#7 |
Guest
Posts: n/a
|
hi, Dirk, compiling has been successful, thank you very much!
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
monitoring spacial variation of a quantity | James | FLUENT | 1 | January 10, 2008 10:45 |
UDF to specify a dynamic inteface in VOF | Marco | FLUENT | 0 | September 26, 2007 06:29 |
UDF for C_VOF variation with time and space | Frederik | FLUENT | 4 | December 19, 2005 01:53 |
time averaged heat transfer in oscillating flow | Matthieu Ubas | Main CFD Forum | 2 | November 5, 1999 15:20 |