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

UDF Changing Rotational Velocity

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 18, 2017, 11:36
Default UDF Changing Rotational Velocity
  #1
New Member
 
Darma Yuda
Join Date: Sep 2017
Location: Germany
Posts: 18
Rep Power: 9
sdarmayuda is on a distinguished road
Hi,

I'm quite new to this Forum and this Software. I'm trying to simulate an Fluid Coupling (Hydraulic Coupling) using ANSYS Fluent r17.2 (Academic Ver.). I want to give a Torque instead of a constant rotational velocity as my input. Therefore, it looks like I have to write an UDF File for a changing rotational velocity (ramp) in respect of time. And until certain rotational velocity, it will rotate constantly. I have found a similar code for this case and tried to modify the code.

Here it is:

#include "udf.h"
#define omega_a 0.001 /* starting omega */
#define omega_b 7500 /* final omega */
#define delta_omega 0.1 /* incremental omega */
#define Niter 10 /* iteration update interval */
DEFINE_ADJUST (myadjust,domain)
{
int zoneID;
int iter= (nres==0)?(1):((int)count2[nres-1]);
float omega;
Thread *tc;
zoneID = 2;
tc = Lookup_Thread(domain,zoneID);
if ((iter%Niter)==0)
{
omega = omega_a + (iter/Niter)*delta_omega;
if (omega > omega_b)
{omega = omega_b;}
THREAD_VAR(tc).fluid.omega = omega;
Message("At iter=%d - update omega to %fn",iter,omega);
}
}

When I try to interpret the c file in Fluent, it always gives me an Error: ''structure reference not implemented''. Can anyone tell me what's wrong with my udf file? Thank you very much for reading. Any help would be much appreciated.

Best regards,
Darma
sdarmayuda 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
3D UDF Paraboilc Velocity Profile (Can't Maintain) Sing FLUENT 12 August 7, 2017 07:25
Help with UDF to calculate the bubble velocity for 2 phase gas enass massoud Fluent UDF and Scheme Programming 0 October 18, 2016 07:11
[PyFoam] Problems with the new PyFoam release zfaraday OpenFOAM Community Contributions 13 December 9, 2014 19:58
SOS!! Velocity UDF prashantthaker208 FLUENT 0 April 2, 2014 11:16
UDF problem : inlet velocity in cyl. coord. system Jongdae Kim FLUENT 0 June 15, 2004 12:21


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