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

How to define an axis in UDF?

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   May 8, 2018, 11:16
Default How to define an axis in UDF?
  #1
New Member
 
Join Date: Nov 2016
Posts: 10
Rep Power: 9
Larrabee is on a distinguished road
Hi, everyone. I am now working on a problem about a pitching 2D airfoil. I have written my UDF and it makes the airfoil oscillate. However, the airfoil is now oscillating around Z axis and I want to set the axis to be 1/4 of the chord length. What should I do to the UDF?


#include "udf.h"
#define Freq 2.0
#define w 2.0*M_PI*Freq
#define pitch 7.5*M_PI/180

DEFINE_CG_MOTION(shm, dt, cg_vel, omega, time, dtime)
{
real omega;

omega = pitch*w*cos(w*time);

cg_vel[0] = 0.0;
cg_vel[1] = 0.0;
cg_vel[2] = 0.0;

cg_omega[0] = 0.0;
cg_omega[1] = 0.0;
cg_omega[2] = omega;
}
Larrabee is offline   Reply With Quote

 


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
Hydrogen storage by metal hydride longbk FLUENT 12 August 1, 2023 20:13
Help! DMFC UDF problems Biao FLUENT 1 November 2, 2020 07:39
An odd ERROR mdakbari Fluent UDF and Scheme Programming 7 April 4, 2016 04:30
Missing math.h header Travis FLUENT 4 January 15, 2009 11:48
Help: using udf to define direction Bo FLUENT 1 July 16, 2008 06:47


All times are GMT -4. The time now is 11:04.