UDF Profile Update once in one time step
Hi Everyone,
I am working on a transient case and using a UDF with DEFINE_Adjust macro.. I want to use a udf controlling a boundary only updated once within one time step.The udf like this: #include "udf.h" #define Vg 1.0e-05 #define H 0.02 #define Rg 0.01 real current=0.0; real profile=-0.01; DEFINE_ADJUST(name,domain) { current = RP_Get_Real("flow-time"); } DEFINE_PROFILE(density,thread,position) { real k,t; face_t f; if(profile !=current) { begin_f_loop(f,thread) { t=RP_Get_Real("physical-time-step"); k=Vg*t/(H-Vg*t); F_PROFILE(f,thread,position)=F_UDSI(f,thread,0)+F_ UDSI(f,thread,0)*(1-Rg)*k; } end_f_loop(f,thread) } profile=current; } I found that can't achieve my goal.Can anyone here help? Thank you. Radit |
Quote:
If you give detailed information about your problem, it is much easier to find the solution. |
All times are GMT -4. The time now is 16:08. |