A udf question~
Hi~
I have defined the global variations in the udf, and I want to reset the value of variations to zero after every fluent step. how to achieve this? tks a lot~ |
Could you include the UDF code you're asking about?
|
Quote:
After each iteration of fluent step, the new results are added to the old one. so I want to reset the global variables to zero for the new step. simple code as: static real Sesum=0.; DEFINE_SOURCE(engergy,c,t,dS,eqn) { real se=0.; se=C_T(c,t); Sesum+=se; return se; } |
The User-defined ADJUST hook is executed at the start of each iteration before the transport equations are solved. For example, to reset a variable to zero at each iteration:
Code:
DEFINE_ADJUST(my_adjust,d) |
Quote:
I'll try~ |
All times are GMT -4. The time now is 04:19. |