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

UDF error in Fluent for flapping wing

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 7, 2018, 23:22
Default UDF error in Fluent for flapping wing
  #1
Member
 
Join Date: Nov 2012
Location: Kuala Lumpur
Posts: 33
Rep Power: 14
rsdsaurav is on a distinguished road
Send a message via Skype™ to rsdsaurav
Hello,
I am new to UDF usage in Fluent and for my project on flapping wing, the udfis not working and the rror message says that

cpp -I"C:\PROGRA~1\ANSYSI~1\v150\fluent\fluent15.0.7/src" -I"C:\PROGRA~1\ANSYSI~1\v150\fluent\fluent15.0.7/cortex/src" -I"C:\PROGRA~1\ANSYSI~1\v150\fluent\fluent15.0.7/client/src" -I"C:\PROGRA~1\ANSYSI~1\v150\fluent\fluent15.0.7/multiport/src" -I. -DUDF
ONFIG_H="<udfconfig.h>" "F:\Akij Paper\Model_2\flapping.c"
Error: F:\\Akij Paper\\Model_2\\flapping.c: line 21: structure reference not implemented


I have attached the flow diagram for reference.


Thanks in advance.
Attached Images
File Type: jpeg Flow diagram.jpeg (52.2 KB, 6 views)
rsdsaurav is offline   Reply With Quote

Old   November 9, 2018, 05:43
Default
  #2
Member
 
mohamed
Join Date: Apr 2016
Posts: 34
Rep Power: 10
moh_zain is on a distinguished road
Hi you need to show the udf code
moh_zain is offline   Reply With Quote

Old   November 10, 2018, 03:59
Default UDF error
  #3
Member
 
Join Date: Nov 2012
Location: Kuala Lumpur
Posts: 33
Rep Power: 14
rsdsaurav is on a distinguished road
Send a message via Skype™ to rsdsaurav
Hello,
I am attaching the code for your reference.

Thanks again.



#include "udf.h"
#include "dynamesh_tools.h"

real w, pi, Aroll, Apitch, roll, droll, pitch, dpitch, frequency, T;
real Ar, Ap, Ay;

DEFINE_CG_MOTION(asymflap, dt, v_cg, omega, time, dtime)

{
Thread *t;

NV_S(v_cg, =, 0.0);
NV_S(omega, =, 0.0);

if (!Data_Valid_P())
{
Message("Wrong\n");
return;
}

t=DT_THREAD((Dynamic_Thread*)dt);

frequency = 3.0;

pi = 3.141592654;

/* define motion variables */

Ar = 30.0; /*roll amplitude*/
Ap = 5.0; /*pitch amplitude*/
Ay = 0.0; /*yaw amplitude*/

Aroll = Ar*pi/180.0; /*conversion to radians*/
Apitch = Ap*pi/180.0; /*conversion to radians*/

w=2.0*pi*frequency; /*omega (radians)*/
T=1.0/frequency;

roll = Aroll*sin(w*time + pi/2);
droll = w*Aroll*cos(w*time + pi/2);

pitch = Apitch*sin(w*time);
dpitch = w*Apitch*cos(w*time);

/*euler angles initial frame mod 1*/

omega[0] = droll;
omega[1] = dpitch*1.0*cos(roll);
omega[2] = dpitch*1.0*sin(roll);

Message("time:%f omegax:%f omegay:%f omegaz:%f \n", time, omega[0], omega[1],omega[2]);
}
rsdsaurav is offline   Reply With Quote

Old   November 11, 2018, 06:05
Default
  #4
Member
 
mohamed
Join Date: Apr 2016
Posts: 34
Rep Power: 10
moh_zain is on a distinguished road
hi check this line t=DT_THREAD((Dynamic_Thread*)dt);
if you tray to define time the program do not need that
moh_zain 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
Problem running fluent with udf on batch tobi b. Fluent UDF and Scheme Programming 3 April 14, 2016 14:54
implementing UDF for fluent in workbench for running multiple simulations faizan_habib7 Fluent UDF and Scheme Programming 0 March 18, 2016 23:29
Running UDF with Supercomputer roi247 FLUENT 4 October 15, 2015 14:41
solving a conduction problem in FLUENT using UDF Avin2407 Fluent UDF and Scheme Programming 1 March 13, 2015 03:02
UDF of Zimont model in fluent Z Main CFD Forum 0 February 17, 2005 04:07


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