|
[Sponsors] |
Can any tell me which is right for the below codes? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 23, 2020, 21:35 |
Can any tell me which is right for the below codes?
|
#1 |
Senior Member
Join Date: Dec 2017
Posts: 387
Rep Power: 9 |
Can any tell me which is right for the below codes?
The first one: #include "udf.h" DEFINE_PROFILE(hf_change,thread,position) { face_t f; real time,heat_flux1,heat_flux2; heat_flux1 = 0; heat_flux2 = 500; time=CURRENT_TIME; begin_f_loop(f,thread) { if (time<0.0001) { F_PROFILE(f,thread,position)=heat_flux1; } else if (time>=0.0001) { F_PROFILE(f,thread,position)=heat_flux2; } } end_f_loop(f,thread) } The second one: #include "udf.h" DEFINE_PROFILE(hf_change,thread,position) { face_t f; real time,heat_flux1,heat_flux2; heat_flux1 = 0; heat_flux2 = 500; begin_f_loop(f,thread) { time=CURRENT_TIME; if (time<0.0001) { F_PROFILE(f,thread,position)=heat_flux1; } else if (time>=0.0001) { F_PROFILE(f,thread,position)=heat_flux2; } } end_f_loop(f,thread) } |
|
Tags |
udf |
|
|