CFD Online Logo CFD Online URL
Home > Forums > Fluent UDF and Scheme Programming

Position of the center of gravity

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

LinkBack Thread Tools Display Modes
Old   September 25, 2013, 10:27
Default Position of the center of gravity
New Member
Damien Geslain
Join Date: Sep 2013
Posts: 3
Rep Power: 5
dam114 is on a distinguished road
Sponsored Links
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
Sponsored Links


Thread Tools
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 On
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 15: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 20:37
Combustion Convergence problems Art Stretton Phoenics 5 April 2, 2002 05:59

Sponsored Links

All times are GMT -4. The time now is 16:15.