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

How to extract Angular Velocity from Simulation?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 12, 2020, 17:09
Default How to extract Angular Velocity from Simulation?
  #1
New Member
 
David
Join Date: Aug 2020
Posts: 5
Rep Power: 6
David12 is on a distinguished road
Hello, I currently am simulating the rotation of a propeller in ANSYS (transient solver). I've used a UDF macro (DEFINE_ZONE_MOTION) to have my propeller cell zone to rotate at a constantly changing RPM. However, I'd like to be able to see the angular velocity values for each time step, and see it's graph. I don't see an option to graph angular velocity in the report definitions, nor could I figure out how to do it through another UDF or expression. Can anybody help me figure out how to extract the angular velocity? Thank you, I'd appreciate it alot.
David12 is offline   Reply With Quote

Old   August 12, 2020, 22:07
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
this is definition of DEFINE_ZONE_MOTION
Code:
DEFINE_ZONE_MOTION (name, omega, axis, origin, velocity, time, dtime)
omega here is angular velocity, you may write it to file on each timestep
David12 likes this.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   August 13, 2020, 19:48
Default
  #3
New Member
 
David
Join Date: Aug 2020
Posts: 5
Rep Power: 6
David12 is on a distinguished road
Quote:
Originally Posted by AlexanderZ View Post
this is definition of DEFINE_ZONE_MOTION
Code:
DEFINE_ZONE_MOTION (name, omega, axis, origin, velocity, time, dtime)
omega here is angular velocity, you may write it to file on each timestep
Hi AlexanderZ, thank you for your advice, I did exactly just that and was able to export the data to a text file when the simulation runs. I do now have a different problem now since the data is posted twice in the data file as if function was ran twice. I am currently trying to solve that and if you had any advice on that, I'd love it hear it.
David12 is offline   Reply With Quote

Old   August 14, 2020, 01:26
Default
  #4
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
Code:
#include "udf.h"
static int last_ts = -1;

DEFINE_ZONE_MOTION (name, omega, axis, origin, velocity, time, dtime)
{
int curr_ts;

curr_ts = N_TIME;
if (last_ts != curr_ts)
{
last_ts = curr_ts;
***your code***
}
}
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Reply

Tags
angular velocity


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
Velocity Sampling in parallel simulation Torii_Nagi Fluent UDF and Scheme Programming 1 July 20, 2020 02:29
kindly help me .. i have and error at line number 147.. m zubair Fluent UDF and Scheme Programming 0 February 10, 2019 12:25
UDF comilation error. urgent help please m zubair Fluent UDF and Scheme Programming 4 February 10, 2019 12:19
Velocity monitoring in Star-CCM+ after the simulation conducted aroma STAR-CCM+ 3 January 4, 2016 17:42
SixDoFRigidBodyMotion under OF2.3 ( self oscillating cylinder) Scabbard OpenFOAM Running, Solving & CFD 1 July 22, 2014 05:50


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