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

Put a Dynamic Mesh MACRO in DEFINE_EXECUTE_AT_END MACRO in ANSYS FLUENT ?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 11, 2017, 10:36
Default Put a Dynamic Mesh MACRO in DEFINE_EXECUTE_AT_END MACRO in ANSYS FLUENT ?
  #1
New Member
 
Haryana
Join Date: Sep 2017
Posts: 1
Rep Power: 0
Sj5n13 is on a distinguished road
I want to Sense RPM of a wind turbine blade after every time step and for this I have written a UDF as follows:

#include "udf.h"

DEFINE_EXECUTE_AT_END(rpm_sensing)
{
int zone_ID = 7;
Domain *domain;
domain = Get_Domain(1);
Dynamic_Thread *dt;


Thread *t = Lookup_Thread(domain,zone_ID);
face_t *f;
t = DT_THREAD(dt);


real omega;
real rpm;
omega = NV_MAG(DT_OMEGA_CG(dt));
rpm = (omega*60)/(2*3.14);
}

but whenever I compile it, it gives me a warning: warning C4700: uninitialized local variable 'dt' used.

My question is, how can I assign a Thread to be a Dynamic Thread? If that is not possible how should I go about sensing the angular velocity of the whole thread at every timestep?
Sj5n13 is offline   Reply With Quote

Old   September 13, 2017, 12:31
Default
  #2
Senior Member
 
Cees Haringa
Join Date: May 2013
Location: Delft
Posts: 607
Rep Power: 0
CeesH is on a distinguished road
can't answer your question, but a certain problem is that you did not assign dt.

you did:
Thread *t = Lookup_Thread(domain,zone_ID);

for a regular thread, but not for dt.
CeesH is offline   Reply With Quote

Reply

Tags
ansys, fluent - udf


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
Ansys Fluent Mesh to be Used in Mechanical Thermal System jjlt ANSYS 0 January 26, 2017 02:50
error in ansys fluent while solving dynamic mesh problem of moving wall classified FLUENT 3 November 23, 2016 02:21
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 10:38
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 07:20
The fluent stopped and errors with "Emergency: received SIGHUP signal" yuyuxuan FLUENT 0 December 3, 2013 23:56


All times are GMT -4. The time now is 12:52.