define_on_demand:Initialization of a scalar
How to use a define_on_demand macro to initialize a scalar in the field?
|
This is for all cells:
Code:
DEFINE_ON_DEMAND (scalar_init) |
Thank you so much for the reply.
Actually, I am looking for assigning a constant value('0') for all the cells in a particular thread at the start of the calculation. I wrote my UDF like this #include "udf.h" DEFINE_ON_DEMAND(rec) { Domain *d; int zone_id=3; Thread *t = Lookup_Thread(d,zone_id); cell_t c; d = Get_Domain(1); thread_loop_c(t,d) { begin_c_loop(c,t) { C_UDMI(c,t,0) = 0; } end_c_loop(c,t) } } Then I interpret this udf. but i dont know how to proceed further. how can i assign the value '0' for all the cells at the beginning of calculation? Will it assign automatically after i interpret the udf? |
Do you have some non-zero values in UDM-0?
You have to use the DEFINE_ON_DEMAND - macro with manual command. http://jullio.pe.kr/fluent6.1/help/h...-use-on-demand Or you can use the Fluent patch panel: https://www.sharcnet.ca/Software/Flu...g/node1035.htm |
Thank you so much...:)
|
All times are GMT -4. The time now is 10:21. |