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

Position of the center of gravity

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 25, 2013, 10:27
Default Position of the center of gravity
  #1
New Member
 
Damien Geslain
Join Date: Sep 2013
Posts: 3
Rep Power: 12
dam114 is on a distinguished road
Hi everyone,

I am working on a "Vortex induced vibration" simulation and for now I managed to simulated a plate which is moving because of the air flow..

The thing is I would be glad if I can output the position of the center of gravity for each timestep in a transient simulation..

I spent a lot of time in CDF-Post and I have no idea how I can do that.. That is why I did a "DEFINE_EXECUTE_AT_END" UDF.. However I am not able to compile it with Ansys Fluent..

I will be very thankful if somebody can help me with this issue..

This is my UDF ==========================================

#include "udf.h"


DEFINE_EXECUTE_AT_END (execute_at_end, dt, time, dtime)
{

FILE * fp; /* Declaring file variable */

/* record the kinematic data in the file */
fp = fopen ("Motion.txt", "a"); /* Open a file to add data to the end */

/* Format output data file */

fprintf (fp, "% E", CURRENT_TIME); /* Current time in */
fprintf (fp, "% E", DT_CG(dt)[0]); /* center of gravity position */


fclose (fp); /* Closing the file */
}
dam114 is offline   Reply With Quote

Reply


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
center of gravity orientation wujinlao5 FLUENT 4 June 27, 2014 08:53
center of gravity motion Jessica.S Fluent UDF and Scheme Programming 0 March 9, 2012 14:46
DPM UDF particle position using the macro P_POS(p)[i] dm2747 FLUENT 0 April 17, 2009 01:29
RE: Applying forces / Center of Gravity in CFX Janusz CFX 1 November 16, 2008 19:37
Combustion Convergence problems Art Stretton Phoenics 5 April 2, 2002 05:59


All times are GMT -4. The time now is 10:33.