sinasalahshour74
Subscriber

Thank you for your response,

this is my UDF profile code:

#include "udf.h"
#define PI 3.141592654
 
DEFINE_PROFILE(current_density,thread,position)
{
 
face_t f;
real t = CURRENT_TIME;
 
begin_f_loop(f,thread)
{
 
F_PROFILE(f,thread,position)=13*sin((2*PI/0.04)*t);
 
end_f_loop(f,thread)
}
}
 
This is expression :
 
13*sin((2*PI/0.04[s])*Time)
 
I try Define Adjust , but it dosent work like which i want :
# include "udf.h"
 
DEFINE_ADJUST(adjust_gradient, domain)
{
int i = 13.;
Thread *t = Lookup_Thread(domain, i);
face_t f;
real tt = CURRENT_TIME;
 
begin_f_loop (f,t)
{
F_UDSI(f,t,0) = 0.02*tt;
}
end_f_loop (f,t)
}
 
Regards,