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

How to compile UDF in Linux

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 23, 2019, 10:14
Default How to compile UDF in Linux
  #1
New Member
 
wuming
Join Date: Nov 2018
Posts: 26
Rep Power: 8
wuming is on a distinguished road
Hello there,
when I try to compile UDF for fluent15.0 in the Linux. When I try to compile with GCC, I get the following error. GS.c:1:17: fatal error: udf.h: No such file or directory
#include "udf.h"
When I compile in fluent. The following message appears in the window, I think udf is not opened correctly. Could anyone help me, please
Working...
for d in lnamd64/[23]*; do \
( \
cd $d; \
rm -rf *.{c,h,cpp,hpp}; \
for f in ../../src/*.{c,h,cpp,hpp} ../../src/makefile ../../src/user.udf; do \
if [ -f $f -a ! -f `basename $f` ]; then \
echo "# linking to" $f "in" $d; \
ln -s $f .; \
fi; \
done; \
echo ""; \
echo "# building library in" $d; \
if [ "" = "1" ]; then \
echo "# using gcc64"; \
make ARCHC=gcc64 -k>makelog 2>&1; \
else \
if [ "" = "1" ]; then \
echo "# using gcc"; \
make ARCHC=gcc -k>makelog 2>&1; \
else \
make -k>makelog 2>&1; \
fi; \
fi;\
cat makelog; \
) \
done
# linking to ../../src/GS0.67.c in lnamd64/3ddp
wuming is offline   Reply With Quote

Old   July 23, 2019, 22:55
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
add in the header (1 line) of your udf
Code:
#include "udf.h"
if you do have this line, that it means, that your compiler is not installer properly
check in Ansys Fluent Customization manual how to compile UDF in Linux

best regards
AlexanderZ is offline   Reply With Quote

Old   July 26, 2019, 23:27
Default
  #3
New Member
 
wuming
Join Date: Nov 2018
Posts: 26
Rep Power: 8
wuming is on a distinguished road
thank you, I will read it
wuming is offline   Reply With Quote

Old   July 26, 2019, 23:28
Default
  #4
New Member
 
wuming
Join Date: Nov 2018
Posts: 26
Rep Power: 8
wuming is on a distinguished road
Quote:
Originally Posted by AlexanderZ View Post
add in the header (1 line) of your udf
Code:
#include "udf.h"
if you do have this line, that it means, that your compiler is not installer properly
check in Ansys Fluent Customization manual how to compile UDF in Linux

best regards
thank you, I will read it
wuming is offline   Reply With Quote

Reply

Tags
udf complie linux


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
Helping to compile the UDF file bulu789 Fluent UDF and Scheme Programming 5 August 30, 2017 06:15
problem with UDF compile sridhar palla Fluent UDF and Scheme Programming 8 November 3, 2016 08:19
how to compile a user fortran routine in linux xyq916 CFX 1 May 3, 2016 07:17
Fluent UDF c source file problem (Linux) jayilosa Fluent UDF and Scheme Programming 1 November 21, 2011 09:25
UDF compile error Steve FLUENT 0 October 16, 2004 14:59


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