Time dependent angular velocity calculation UDF
Hi ,
I have written this udf for evaluating time dependent angular velocity of a turbine by calculating torque at each time step and then using torque value to calculate omega. #include"udf.h" real w_prev= 0.0; DEFINE_CG_MOTION(turbine, dt,vel,omega,time,dtime) { Thread *t; face_t f; real NV_VEC(A); real force,torque,x[ND_ND], dw; NV_S(vel,=,0); NV_S(omega,=,0); if (!Data_valid_P()) return; /* Get the thread pointer for which this motion is defined */ t= DT_THREAD(dt); /* Compute pressure force of body by looping through all faces */ force = 0; torque= 0; begin_f_loop(f,t) { F_AREA(A,f,t); F_CENTROID(x,f,t) torque+= x[1] * (F_P(f,t)* F_AREA(A,f,t); } end_f_loop(f,t) /* Compute change in angular velocity */ dw= dtime* torque/ 50.00; w_prev= w_prev + dw; Message ("time = %f , z_omega= %f,torque = %f\n", time, w_prev, torque); /* Set Z Component of Angular velocity */ omega[2]= w_prev; } When I am compiling this udf, I am getting this error CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory. Can anyone please help me |
Hello
Did you solve your problem? I want to do the same |
All times are GMT -4. The time now is 16:34. |