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

UDF ansys fluent error that I ́m unable to identify, happens when I compile the UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 3, 2022, 09:58
Question UDF ansys fluent error that I ́m unable to identify, happens when I compile the UDF
  #1
New Member
 
Juan M Reyes
Join Date: Jul 2022
Posts: 3
Rep Power: 3
JuanReyes is on a distinguished road
hi everyone, I'm trying to run a simple UDF on ansys fluent but when i compile it (build buttom) it shows me 1 error along with several warnings I will appreciate if anyone could give me a hand on this.
this si the error :

In file included from udf_names.c:3:
C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ udf\udf.h(79,12): fatal error: 'ud_io1.h' file not found
# include "ud_io1.h"

This is the complete output of the console along with the code
(console)

Please help me

Copied D:\Ingenieria Mecatronica\proyecto de grado (auxiliar de investigacion)\ejemplos\UDFexample\ejemplo1_files\ dp0\FFF\Fluent/D:\Ingenieria Mecatronica\proyecto de grado (auxiliar de investigacion)\ejemplos\UDFexample\ejemplo1_files\ dp0\FFF\Fluent\UDFex1.C to libudf\src
(system "copy "C:\PROGRA~1\ANSYSI~1\v212\fluent"\fluent21.2.0\sr c\udf\sconstruct.udf "libudf\win64\2d_host\SConstruct" ")
1 archivo(s) copiado(s).
(system "copy "C:\PROGRA~1\ANSYSI~1\v212\fluent"\fluent21.2.0\sr c\udf\scons_default.bat "libudf\win64\2d_host\scons_test.bat" ")
1 archivo(s) copiado(s).
Creating user_nt.udf file for 2d_host ...
(system "copy "C:\PROGRA~1\ANSYSI~1\v212\fluent"\fluent21.2.0\sr c\udf\makefile_nt.udf "libudf\win64\2d_host\makefile" ")
1 archivo(s) copiado(s).
(chdir "libudf")(chdir "win64\2d_host")
D:\Ingenieria Mecatronica\proyecto de grado (auxiliar de investigacion)\ejemplos\UDFexample\ejemplo1_files\ dp0\FFF\Fluent\libudf\win64\2d_host>rem
D:\Ingenieria Mecatronica\proyecto de grado (auxiliar de investigacion)\ejemplos\UDFexample\ejemplo1_files\ dp0\FFF\Fluent\libudf\win64\2d_host>rem Copyright 1987-2021 ANSYS, Inc. All Rights Reserved.
D:\Ingenieria Mecatronica\proyecto de grado (auxiliar de investigacion)\ejemplos\UDFexample\ejemplo1_files\ dp0\FFF\Fluent\libudf\win64\2d_host>rem
"cl.exe" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
"clang-cl" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
scons: Reading SConscript files ...
scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "D:\Ingenieria Mecatronica\proyecto de grado (auxiliar de investigacion)\ejemplos\UDFexample\ejemplo1_files\ dp0\FFF\Fluent\libudf\win64\2d_host\SConstruct", line 8, in <module>
scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "D:\Ingenieria Mecatronica\proyecto de grado (auxiliar de investigacion)\ejemplos\UDFexample\ejemplo1_files\ dp0\FFF\Fluent\libudf\win64\2d_host\SConstruct", line 18, in <module>
Compiler used is "C:\PROGRA~1\ANSYSI~1\v212\fluent"\ntbin\clang\bin \clang-cl
Linker used is "C:\PROGRA~1\ANSYSI~1\v212\fluent"\ntbin\clang\bin \lld-link
scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "D:\Ingenieria Mecatronica\proyecto de grado (auxiliar de investigacion)\ejemplos\UDFexample\ejemplo1_files\ dp0\FFF\Fluent\libudf\win64\2d_host\SConstruct", line 148, in <module>
Copy("D:\Ingenieria Mecatronica\proyecto de grado (auxiliar de investigacion)\ejemplos\UDFexample\ejemplo1_files\ dp0\FFF\Fluent\libudf\win64\2d_host\resolve.exe", "C:\PROGRA~1\ANSYSI~1\v212\fluent\ntbin\win64\reso lve.exe")
c_sources ['UDFex1.C', 'udf_names.c']
c_sources_ []
scons: done reading SConscript files.
scons: Building targets ...
"C:\PROGRA~1\ANSYSI~1\v212\fluent"\ntbin\clang\bin \clang-cl /c /DUDF_EXPORTING /DUDF_NT /DWIN64 /EHa /wd4224 -Wno-return-type -Wno-implicit-function-declaration -Wno-comment -Wno-incompatible-library-redeclaration -Wno-reserved-user-defined-literal /clang:-std=c99 -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\win6 4\2d_host -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ main -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ addon-wrapper -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ io -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ species -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ pbns -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ numerics -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ sphysics -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ storage -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ mphase -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ bc -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ models -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ material -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ amg -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ util -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ mesh -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ udf -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ ht -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ dx -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ turbulence -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ acoustics -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ parallel -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ etc -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ ue -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ dpm -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ dbns -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\cort ex\src -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\clie nt\src -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\tgri d\src -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\PRIM E\tgrid\src -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\mult iport\src -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\mult iport\mpi_wrapper\src -I C:\PROGRA~1\ANSYSI~1\v212\fluent\include -I "D:\Ingenieria Mecatronica\proyecto de grado (auxiliar de investigacion)\ejemplos\UDFexample\ejemplo1_files\ dp0\FFF\Fluent\libudf\win64\2d_host" -I C:\PROGRA~1\ANSYSI~1\v212\fluent\ntbin\clang\MSVC\ 14.10.25017\include -I C:\PROGRA~1\ANSYSI~1\v212\fluent\ntbin\clang\x64\l ib\clang\10.0.0\include -I C:\PROGRA~1\ANSYSI~1\v212\fluent\ntbin\clang\10\In clude\10.0.18362.0\shared -I C:\PROGRA~1\ANSYSI~1\v212\fluent\ntbin\clang\10\In clude\10.0.18362.0\ucrt -I C:\PROGRA~1\ANSYSI~1\v212\fluent\ntbin\clang\10\In clude\10.0.18362.0\um udf_names.c
In file included from udf_names.c:3:
In file included from C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ udf\udf.h:22:
In file included from C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ main\global.h:258:
In file included from C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ storage\var.h:10:
C:\PROGRA~1\ANSYSI~1\v212\fluent\ntbin\clang\10\In clude\10.0.18362.0\shared\basetsd.h(322,12): warning: cast to 'void * __ptr32' from smaller integer type 'unsigned long' [-Wint-to-void-pointer-cast]
return((void * POINTER_32) (unsigned long) (ULONG_PTR) p);
^
In file included from udf_names.c:3:
C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ udf\udf.h(79,12): fatal error: 'ud_io1.h' file not found
# include "ud_io1.h"
^~~~~~~~~~
1 warning and 1 error generated.
scons: *** [udf_names.obj] Error 1
scons: building terminated because of errors.
(system "copy "C:\PROGRA~1\ANSYSI~1\v212\fluent"\fluent21.2.0\sr c\udf\sconstruct.udf "libudf\win64\2d_node\SConstruct" ")
1 archivo(s) copiado(s).
(system "copy "C:\PROGRA~1\ANSYSI~1\v212\fluent"\fluent21.2.0\sr c\udf\scons_default.bat "libudf\win64\2d_node\scons_test.bat" ")
1 archivo(s) copiado(s).
Creating user_nt.udf file for 2d_node ...
(system "copy "C:\PROGRA~1\ANSYSI~1\v212\fluent"\fluent21.2.0\sr c\udf\makefile_nt.udf "libudf\win64\2d_node\makefile" ")
1 archivo(s) copiado(s).
(chdir "libudf")(chdir "win64\2d_node")
D:\Ingenieria Mecatronica\proyecto de grado (auxiliar de investigacion)\ejemplos\UDFexample\ejemplo1_files\ dp0\FFF\Fluent\libudf\win64\2d_node>rem
D:\Ingenieria Mecatronica\proyecto de grado (auxiliar de investigacion)\ejemplos\UDFexample\ejemplo1_files\ dp0\FFF\Fluent\libudf\win64\2d_node>rem Copyright 1987-2021 ANSYS, Inc. All Rights Reserved.
D:\Ingenieria Mecatronica\proyecto de grado (auxiliar de investigacion)\ejemplos\UDFexample\ejemplo1_files\ dp0\FFF\Fluent\libudf\win64\2d_node>rem
"cl.exe" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
"clang-cl" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
scons: Reading SConscript files ...
scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "D:\Ingenieria Mecatronica\proyecto de grado (auxiliar de investigacion)\ejemplos\UDFexample\ejemplo1_files\ dp0\FFF\Fluent\libudf\win64\2d_node\SConstruct", line 8, in <module>
scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "D:\Ingenieria Mecatronica\proyecto de grado (auxiliar de investigacion)\ejemplos\UDFexample\ejemplo1_files\ dp0\FFF\Fluent\libudf\win64\2d_node\SConstruct", line 18, in <module>
Compiler used is "C:\PROGRA~1\ANSYSI~1\v212\fluent"\ntbin\clang\bin \clang-cl
Linker used is "C:\PROGRA~1\ANSYSI~1\v212\fluent"\ntbin\clang\bin \lld-link
scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "D:\Ingenieria Mecatronica\proyecto de grado (auxiliar de investigacion)\ejemplos\UDFexample\ejemplo1_files\ dp0\FFF\Fluent\libudf\win64\2d_node\SConstruct", line 148, in <module>
Copy("D:\Ingenieria Mecatronica\proyecto de grado (auxiliar de investigacion)\ejemplos\UDFexample\ejemplo1_files\ dp0\FFF\Fluent\libudf\win64\2d_node\resolve.exe", "C:\PROGRA~1\ANSYSI~1\v212\fluent\ntbin\win64\reso lve.exe")
c_sources ['UDFex1.C', 'udf_names.c']
c_sources_ []
scons: done reading SConscript files.
scons: Building targets ...
"C:\PROGRA~1\ANSYSI~1\v212\fluent"\ntbin\clang\bin \clang-cl /c /DUDF_EXPORTING /DUDF_NT /DWIN64 /EHa /wd4224 -Wno-return-type -Wno-implicit-function-declaration -Wno-comment -Wno-incompatible-library-redeclaration -Wno-reserved-user-defined-literal /clang:-std=c99 -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\win6 4\2d_node -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ main -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ addon-wrapper -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ io -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ species -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ pbns -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ numerics -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ sphysics -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ storage -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ mphase -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ bc -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ models -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ material -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ amg -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ util -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ mesh -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ udf -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ ht -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ dx -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ turbulence -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ acoustics -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ parallel -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ etc -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ ue -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ dpm -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ dbns -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\cort ex\src -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\clie nt\src -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\tgri d\src -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\PRIM E\tgrid\src -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\mult iport\src -I C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\mult iport\mpi_wrapper\src -I C:\PROGRA~1\ANSYSI~1\v212\fluent\include -I "D:\Ingenieria Mecatronica\proyecto de grado (auxiliar de investigacion)\ejemplos\UDFexample\ejemplo1_files\ dp0\FFF\Fluent\libudf\win64\2d_node" -I C:\PROGRA~1\ANSYSI~1\v212\fluent\ntbin\clang\MSVC\ 14.10.25017\include -I C:\PROGRA~1\ANSYSI~1\v212\fluent\ntbin\clang\x64\l ib\clang\10.0.0\include -I C:\PROGRA~1\ANSYSI~1\v212\fluent\ntbin\clang\10\In clude\10.0.18362.0\shared -I C:\PROGRA~1\ANSYSI~1\v212\fluent\ntbin\clang\10\In clude\10.0.18362.0\ucrt -I C:\PROGRA~1\ANSYSI~1\v212\fluent\ntbin\clang\10\In clude\10.0.18362.0\um udf_names.c
In file included from udf_names.c:3:
In file included from C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ udf\udf.h:22:
In file included from C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ main\global.h:258:
In file included from C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ storage\var.h:10:
C:\PROGRA~1\ANSYSI~1\v212\fluent\ntbin\clang\10\In clude\10.0.18362.0\shared\basetsd.h(322,12): warning: cast to 'void * __ptr32' from smaller integer type 'unsigned long' [-Wint-to-void-pointer-cast]
return((void * POINTER_32) (unsigned long) (ULONG_PTR) p);
^
In file included from udf_names.c:3:
C:\PROGRA~1\ANSYSI~1\v212\fluent\fluent21.2.0\src\ udf\udf.h(79,12): fatal error: 'ud_io1.h' file not found
# include "ud_io1.h"
^~~~~~~~~~
1 warning and 1 error generated.
scons: *** [udf_names.obj] Error 1
scons: building terminated because of errors.
Done.


AND the code tha I'm using
#include "udf.h"
static real velx=0.0;
DEFINE_CG_MOTION(box,dt,vel,omega,time,dtime)
{
NV_S(vel, =, 0.0);
NV_S(omega, =, 0.0);
velx= 0.05*sin(3.1415927 * time / 10.);
vel[0]=velx;
message("Time=%f, vel[0]=%f/n",time,vel[0]);
}

Last edited by JuanReyes; August 3, 2022 at 13:33.
JuanReyes is offline   Reply With Quote

Old   August 8, 2022, 22:07
Smile error solved
  #2
New Member
 
Juan M Reyes
Join Date: Jul 2022
Posts: 3
Rep Power: 3
JuanReyes is on a distinguished road
Hi everyone, I solved the problem by reinstalling visual studio 2022, also the code had an inner error, lastly I followed this guide for solve other issues https://www.cfd-online.com/Wiki/Flue...with_Fluent_13

the new code

/* Moving grid problem -CG movement of a box*/

#include "udf.h"

static real velx = 0.0;
DEFINE_CG_MOTION(box, dt, vel, omega, time, dtime)
{
NV_S(vel, =, 0.0);
NV_S(omega, =, 0.0);

velx = 0.05 * sin(3.1415927 * time / 10.);
vel[1] = velx;
Message("Time=%f, vel[1]=%f/n", time, vel[1]);
}
JuanReyes is offline   Reply With Quote

Old   August 14, 2023, 11:01
Default
  #3
New Member
 
Join Date: Aug 2023
Posts: 1
Rep Power: 0
Cagatay_toygun is on a distinguished road
hi,
I tried lots of time to reload visual studio but again ı got these messages. Like "nmake" is not recognized as an internal or external command. Is there any extra setup settings to load visual studio, or just default download settings is enough?
Cagatay_toygun is offline   Reply With Quote

Reply

Tags
compiling error, udf, wind blade


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
Compile UDF outside of Fluent with Visual Studio Maddy1984 Fluent UDF and Scheme Programming 0 July 25, 2022 02:14
Compile Fluent UDF with Windows 10 daniel_pramudita FLUENT 15 May 13, 2020 22:29
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM Rizwan Fluent UDF and Scheme Programming 40 March 18, 2018 06:05
Implementing the UDF Barotropic state law of cavitation in ANSYS Fluent 17.1 ullaspk1990 Fluent UDF and Scheme Programming 8 January 6, 2017 05:17
Ansys SIG$ILL error loth ANSYS 3 December 24, 2015 05:31


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