|
[Sponsors] |
May 8, 2018, 11:16 |
How to define an axis in UDF?
|
#1 |
New Member
Join Date: Nov 2016
Posts: 10
Rep Power: 9 |
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; } |
|
|
|
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 |