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

Not able to use Interpreted in User Defined Function (UDF)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 8, 2017, 19:15
Default Not able to use Interpreted in User Defined Function (UDF)
  #1
Member
 
Guiliguili
Join Date: Aug 2010
Location: Montréal
Posts: 97
Rep Power: 15
Touré is on a distinguished road
Hello,

Sorry for my long post but here is my story. Troubles started when I've got ANSYS 18 installed on Ubuntu 16.04 LTS.

1st trouble: ANSYS Fluent on Linux. Enjoy!
Solution : Forget about Windows and get the work done. :-)

2nd trouble: Problem starting a graphic window with ANSYS Fluent: The following error messages appear in the terminal:
Unable to resolve function glXQueryExtension
Unable to resolve function glXMakeCurrent
Unable to resolve function glXUseXFont
Solution: Locate locating where the file libGL.so.1 where on my computer then doing the link
locate -b libGL.so.1
/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
sudo ln -s /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 /usr/lib/libGL.so.1

3rd trouble: Problem starting parallel computation with Ansys Fluent because no mpi installed on the computer
Solution: Check if mpi is installed with one of the three command below
mpiexec --version
mpirun --version
ompi_info

If there is no mpi on the machine, install openmpi with the command below.
sudo apt-get install openmpi-bin openmpi-common openssh-client openssh-server libopenmpi1.3 libopenmpi-dbg libopenmpi-dev

4th trouble: Problem starting parallel computation with Ansys Fluent
sudo /usr/local/Ansys/v180/fluent/bin/fluent
/usr/local/Ansys/v180/fluent/fluent18.0.0/bin/fluent -r18.0.0 3d -pshmem -host -alnamd64 -t4 -mpi=ibmmpi -path/usr/local/Ansys/v180/fluent -ssh -cx blablabla:blablabla:blablabla
/usr/local/Ansys/v180/fluent/fluent18.0.0/bin/fluent: 513: [: ibmmpi: unexpected operator
/usr/local/Ansys/v180/fluent/fluent18.0.0/bin/fluent: 516: [: ibmmpi: unexpected operator
/usr/local/Ansys/v180/fluent/fluent18.0.0/bin/fluent: 2143: /usr/local/Ansys/v180/fluent/fluent18.0.0/bin/fluent: Bad substitution
The fluent process could not be started.

Error: eval: unassigned variable
Error Object: rp-3d?

Solution : (Fluent 16.0.0 and Ubuntu 12.04)
The problem is /bin/sh, the default command interpreter for shell scripts. In RHEL/CentOS distribution /bin/sh is linked to /bin/bash, while in debian based linux distributions /bin/sh points to /bin/dash.

You can set /bin/bash as default shell scripts interpreter with console command:
sudo dpkg-reconfigure dash

and answer No to the question:
Use dash as the default system shell (/bin/sh)?


4th trouble: Trying a tutorial that uses Interpreted for UDF, it's not working. The error I get when I use interpreted is below. What is strange is that I am able to find the file cpp in the directory /usr/local/Ansys/v180/fluent/contrib/lnamd64/ and I tried the dos2unix command because the inlet1.c attached comes from a zipped file vof_r180.zip . Why interpreted is not working?
Thank you.


cpp -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/src/main" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/src/addon-wrapper" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/src/io" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/src/species" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/src/pbns" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/src/numerics" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/src/sphysics" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/src/storage" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/src/mphase" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/src/bc" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/src/models" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/src/material" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/src/amg" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/src/util" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/src/mesh" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/src/udf" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/src/ht" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/src/dx" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/src/turbulence" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/src/parallel" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/src/etc" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/src/ue" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/src/dpm" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/src/dbns" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/tgrid/src" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/cortex/src" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/client/src" -I"/usr/local/Ansys/v180/fluent/fluent18.0.0/multiport/src" -I. -DUDFCONFIG_H="<udfconfig.h>" "/home/ubuntu/Desktop/vof/inlet1.c"
sh: /usr/local/Ansys/v180/fluent/contrib/lnamd64/cpp: No such file or directory
Error: "/home/ubuntu/Desktop/vof/inlet1.c": line 1: syntax error.



By the way after struggling with it for many hours, I discovered that Compiled UDF works fine. And again why Compiled works and why not Interpreted?
Attached Files
File Type: c inlet1.c (572 Bytes, 10 views)
Touré 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
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 17:22
Running UDF with Supercomputer roi247 FLUENT 4 October 15, 2015 13:41
using METIS functions in fortran dokeun Main CFD Forum 7 January 29, 2013 04:06
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 09:56
user defined function Thomas Lescot FLUENT 1 May 4, 2007 10:13


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