|
[Sponsors] |
January 25, 2013, 12:56 |
DEFINE_ON_DEMAND problem
|
#1 |
New Member
Tiago Morgado
Join Date: Dec 2012
Posts: 8
Rep Power: 14 |
Hi everybody
I want to change the temperature of slab inside a furnace in particular time step of a transient simulation, with a DEFINE_ON_DEMAND udf. After the simulation is completed, I execute the UDF and finnally, procede the calculation for another period of time. That is something wrong with this approach? Thank you Tiago |
|
January 25, 2013, 13:09 |
|
#2 |
New Member
Tiago Morgado
Join Date: Dec 2012
Posts: 8
Rep Power: 14 |
The UDF was compiled and hooked with success, but althought it is executed without a problem, the temperature of slab ( cell zone solid ) doesn´t change.
Maybe there is something wrong with the UDF, but I can't figure out what could it be. this is my UDF #include "udf.h" #include "mem.h" DEFINE_ON_DEMAND(Slab_1) { Domain *d=Get_Domain(1); int zone_ID=121, Temp=400, cont; cell_t c; Thread *t=Lookup_Thread(d,zone_ID); begin_c_loop(c,t) { C_T(c,t)=Temp; } end_c_loop(c,t) } |
|
Tags |
define_on_demand; udf |
|
|