|
[Sponsors] |
Trying to run an oscilating plate transient simulation |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Join Date: Jan 2024
Posts: 11
Rep Power: 3 ![]() |
As the tile suggest I am trying to run an oscilating plate transient simulations.
Basically I repeating all the steps from this video: https://www.youtube.com/watch?v=YTxch2vyphk&t=987s But instead of Mesh Motion Rotation I am trying to insert the UDF (Cell Zones-> Inner Plate -> Mesh Motion) But Ansys cannot recognize the UDF in that tab. (It recognizes it in the 6DOF tab though) Can someone guide me on how should I load my UDF for that specific case and also maybe help me with the code? My current code is this one. #include "udf.h" #define AMP 5.0 // Amplitude of pitch oscillation (degrees) #define FREQ 1.0 // Frequency of oscillation (Hz) #define PHASE 0.0 // Phase shift (radians) DEFINE_CG_MOTION(pitching_airfoil, dt, vel, omega, time, dtime) { real angle_of_attack; real angular_velocity; // Calculate the oscillating angle of attack (in degrees) angle_of_attack = AMP * sin(2 * M_PI * FREQ * time + PHASE); // Sinusoidal oscillation from -AMP to +AMP // Convert the angle of attack to radians (since Fluent uses radians for rotation) angle_of_attack = angle_of_attack * M_PI / 180.0; // Convert degrees to radians // Calculate the angular velocity (time derivative of angle of attack) angular_velocity = 2 * M_PI * FREQ * AMP * cos(2 * M_PI * FREQ * time + PHASE); // Derivative of sin for velocity // Apply the angular velocity to the airfoil's rotation (about the z-axis, for pitch) omega[0] = 0.0; // No rotation about x-axis omega[1] = 0.0; // No rotation about y-axis omega[2] = angular_velocity; // Rotation about the z-axis for pitching // Translational velocity components (no translation in this case) vel[0] = 0.0; // No velocity in the x-direction vel[1] = 0.0; // No velocity in the y-direction vel[2] = 0.0; // No velocity in the z-direction } This code is with the help of ChatGPT. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to continute a CFX transient run without losing previous time steps result file? | Scar123111 | CFX | 5 | January 31, 2020 06:14 |
Steady-state solution as IC for transient simulation | pardoa | OpenFOAM Running, Solving & CFD | 3 | July 24, 2019 06:49 |
Transient run continues from last time (when startover is desired) | bongbang | CFX | 2 | March 22, 2015 23:05 |
Resume Transient simulation | HMR | CFX | 1 | June 28, 2011 21:13 |
transient simulation: natural convection problem? | Basics | CFX | 3 | September 25, 2002 09:42 |