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

UDF - compiling errors

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 7, 2014, 10:33
Default UDF - compiling errors
  #1
Member
 
Join Date: Nov 2014
Posts: 36
Rep Power: 11
Tscar is on a distinguished road
Hello,
I have few errors while compiling the UDF in Fluent and I was wondering if someone here would be so kind to help me. I have Fluent 15, windows 8.1 and I use Visual Studio 13. I launched Fluent using VS2013 x64 Cross Tools Command Prompt. My .c code and errors after pressing "build" are stated below.
Thank you!



#include "udf.h"

DEFINE_PROFILE(unsteady_pressure, thread, position)
{
face_t f;
real t = CURRENT_TIME;

begin_f_loop(f, thread)
{
F_PROFILE(f, thread, position) = 101325.0 + 1000.0*sin(628.32*t);
}
end_f_loop(f, thread)
}



Copied C:\Users\Tom\Desktop\Fluent_thermoacoustic\CASE_1\ Source11.c to libudf\src
udf_names.c and user_nt.udf files in 3d are upto date.
(system "copy "C:\PROGRA~1\ANSYSI~1\v150\fluent"\fluent15.0.0\sr c\makefile_nt.udf "libudf\win64\3d\makefile" ")
1 file(s) copied.
(chdir "libudf")(chdir "win64\3d")# Generating ud_io1.h
Source11.c
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(482) : error C2059: syntax error : ','
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(482) : error C2143: syntax error : missing ')' before 'constant'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(482) : error C2143: syntax error : missing '{' before 'constant'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(482) : error C2059: syntax error : 'constant'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(482) : error C2059: syntax error : ')'

Done.
Tscar is offline   Reply With Quote

Old   March 21, 2018, 23:24
Default
  #2
New Member
 
ahmad
Join Date: Mar 2018
Posts: 21
Rep Power: 8
ahmad_xjtu is on a distinguished road
though this was posted long ago and I am replying too late, actually, I faced the same problem today.
The solution is to simply remove line 482 from math.h file.
ahmad_xjtu 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
About UDF compiling issues: 'nmake' Haoyin Shan Fluent UDF and Scheme Programming 15 November 4, 2019 19:05
Verification of UDF - getting errors kkondaveeti Fluent UDF and Scheme Programming 3 April 11, 2014 14:25
Error during Compiling UDF for Rotor Motion deepak.dce06 Fluent UDF and Scheme Programming 1 October 15, 2013 13:51
Compiling UDF on a cluster Adya FLUENT 1 December 14, 2009 12:30
UDF compiling problem in Flient 6.3 jeevan kumar FLUENT 2 February 25, 2009 01:43


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