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

Error compiling UDF in Fluent

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 7, 2019, 07:27
Default Error compiling UDF in Fluent
  #1
New Member
 
Join Date: Jul 2019
Posts: 9
Rep Power: 7
Shuvadeep is on a distinguished road
I am trying to compile the udf of motion. But error pops up each time. It shows

Error: The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform (win64).\n\nThe system cannot find the file specified.

\n\nD:\Flapping Wing Simulations\moving mesh Piezofan simulation\Test1\MMPiezoFan_files\dp0\FFF\Fluent\l ibudf\win64\3ddp_host\libudf.dll

Error Object: #f

#include "udf.h"

DEFINE_CG_MOTION (rotational_motion, dt, cg_vel, cg omega, time, dtime)
{
Domain *d =Get Domain(1);
Thread *t_object = Lookup_Thread(d, 2);
real moment [ND_ND], cg[ND_ND], force [ND_ND];

Compute_Force_And_Moment(d, t_object, cg, force, moment, TRUE)
real moment_z= moment [3]; \* To compute the moment at the beginning of the time step and feed into the equation of motion */

real i1 = exp(-0.823*time);
real i2 = cos (8.19*time);
real i3 = 48870 sin(8.19*time);
real i4 = 2.893 pow(10,-8);
real omega = -i4 * moment_z * i1 * (i2-i3);

cg_vel[0]=0.0;
cg_vel [1]=0.0;
cg_ve1[2]=0.0;

cg omega [0]-0.0 ;
cg omega (1)-0.0;
cg omega [2]=real omega;
}

Fluent version is 18.2 and VS 2015.

Please help!
Shuvadeep is offline   Reply With Quote

Old   August 19, 2019, 08:41
Default
  #2
Member
 
Sebi
Join Date: Mar 2019
Posts: 49
Rep Power: 7
bloodflow is on a distinguished road
I assume you have setup your cimputer with VisualStudio as a compiler and can compile other UDF's.

It looks like in your definitions "cg omega" has a space which is probably causes issues with it reading it as two variables or expecting a ',' or ':' .
bloodflow is offline   Reply With Quote

Old   August 20, 2019, 01:41
Default
  #3
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
open VS console, run fluent, compile

best regards
AlexanderZ 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
fluent UDF external library lapack problem Rick FLUENT 0 May 7, 2008 11:16
UDF problem caused by various version of Fluent Yurong FLUENT 3 January 15, 2006 11:57


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