CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

CYCLO ROTOR- ANSYS Fluent- UDF for Pitching motion

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 9, 2025, 04:49
Default CYCLO ROTOR- ANSYS Fluent- UDF for Pitching motion
  #1
New Member
 
Wang Li
Join Date: May 2021
Location: China
Posts: 19
Rep Power: 6
Hanvo is on a distinguished road
Hello everyone
I am facing issue in my case using ANSYS Fluent ,pitch is not changing ,there are four blades aero foils at 0, 90 , 180 , 270, and want to change pitch at 90 and 270 degree but its not working. I can share my UDF code , case picture for better understanding , any suggestions for correction ?


/**********************************************/
/* blade_pitch.c */
/* UDF for specifying time-varying blade pitch */
/* Simulates +/- 35 deg pitch with a cycle of */
/* 20 ms for four blades. */
/**********************************************/
#include "udf.h"
#define PI 3.141592654
#define MAX_PITCH 35.0 // Maximum pitch in degrees
#define PERIOD 0.02 // Time for one full rotation (seconds)

// Function for Blade 1 (No Phase Shift)
DEFINE_TRANSIENT_PROFILE(blade_pitch_blade1, time)
{
real ampl = MAX_PITCH * (PI / 180.0); // Convert MAX_PITCH to radians
real freq = 2.0 * PI / PERIOD; // Frequency of oscillation
real omega;

omega = ampl * sin(freq * time); // Pitch variation
return omega; // Return pitch in radians
}

// Function for Blade 2 (90° Phase Shift)
DEFINE_TRANSIENT_PROFILE(blade_pitch_blade2, time)
{
real ampl = MAX_PITCH * (PI / 180.0);
real freq = 2.0 * PI / PERIOD;
real omega;

omega = ampl * sin(freq * time + (PI / 2)); // 90° phase shift
return omega;
}

// Function for Blade 3 (180° Phase Shift)
DEFINE_TRANSIENT_PROFILE(blade_pitch_blade3, time)
{
real ampl = MAX_PITCH * (PI / 180.0);
real freq = 2.0 * PI / PERIOD;
real omega;

omega = ampl * sin(freq * time + PI); // 180° phase shift
return omega;
}

// Function for Blade 4 (270° Phase Shift)
DEFINE_TRANSIENT_PROFILE(blade_pitch_blade4, time)
{
real ampl = MAX_PITCH * (PI / 180.0);
real freq = 2.0 * PI / PERIOD;
real omega;

omega = ampl * sin(freq * time + (3 * PI / 2)); // 270° phase shift
return omega;
}
Attached Images
File Type: jpg 1.jpg (133.7 KB, 7 views)
File Type: png 2.PNG (91.5 KB, 7 views)
Attached Files
File Type: c blade pitch-udf.c (1.7 KB, 3 views)
Hanvo is offline   Reply With Quote

Reply

Tags
cyclorotor, motion dynamicmesh, motion frame, pointwise mesh, udf code

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Specifying Mesh Deformation & Rigid Body Motion on a Cell Zone Using UDF zx9cp Fluent UDF and Scheme Programming 3 July 11, 2023 05:14
Mesh motion UDF for Fluent? snesmaeili Fluent UDF and Scheme Programming 0 December 26, 2016 09:58
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
The fluent stopped and errors with "Emergency: received SIGHUP signal" yuyuxuan FLUENT 0 December 3, 2013 22:56
Fluent UDF Discontinuous Motion lequi7 Fluent UDF and Scheme Programming 2 November 3, 2011 23:18


All times are GMT -4. The time now is 21:00.