CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Time dependent angular velocity calculation UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 23, 2014, 00:25
Default Time dependent angular velocity calculation UDF
  #1
New Member
 
shashank mishra
Join Date: Sep 2011
Posts: 12
Rep Power: 15
shashankmechguy is on a distinguished road
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
shashankmechguy is offline   Reply With Quote

Old   July 26, 2018, 03:23
Default
  #2
New Member
 
mamly
Join Date: Sep 2010
Posts: 12
Rep Power: 16
mamly is on a distinguished road
Hello
Did you solve your problem?
I want to do the same
mamly is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Axisymmetric swirl - angular velocity for UDF NTSbike Fluent UDF and Scheme Programming 13 July 12, 2022 03:08
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 16:33
dynamic Mesh is faster than MRF???? sharonyue OpenFOAM Running, Solving & CFD 14 August 26, 2013 08:47
Problem with FloatingObject Leech OpenFOAM Running, Solving & CFD 10 March 29, 2012 16:24
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 10:11


All times are GMT -4. The time now is 03:52.