|
[Sponsors] |
November 7, 2018, 23:22 |
UDF error in Fluent for flapping wing
|
#1 |
Member
|
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. |
|
November 9, 2018, 05:43 |
|
#2 |
Member
mohamed
Join Date: Apr 2016
Posts: 34
Rep Power: 10 |
Hi you need to show the udf code
|
|
November 10, 2018, 03:59 |
UDF error
|
#3 |
Member
|
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]); } |
|
November 11, 2018, 06:05 |
|
#4 |
Member
mohamed
Join Date: Apr 2016
Posts: 34
Rep Power: 10 |
hi check this line t=DT_THREAD((Dynamic_Thread*)dt);
if you tray to define time the program do not need that |
|
|
|
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 |