sidjou
Subscriber

I'm not able to load the udf.library when using an input parameter. I report the compile console script at the end.

Error: The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform (win64).\n\nLe fichier sp�cifi� est introuvable.

\n\nC:\Users\...\TRIAL UDF\Trial UDF input_files\dp0\FLU-1\Fluent\libudf\win64\3ddp_host\libudf.dll

Error Object: #f


I have registered the frequency as the input parameter in fluent. My UDF like :

#include "udf.h"
/*#define freq 100.0*/
#define freq RP_Get_Input_Parameter(“real-1”)
#define angular_freq 2.0*M_PI*freq
#define amp 0.5

DEFINE_CG_MOTION(plate, dt, cg_vel, cg_omega, time, dtime)
{
    real disp;
 
  disp = amp*angular_freq*cos(angular_freq*time); /*displacement speed*/

  cg_vel [0] = 0.0;
  cg_vel [1] = 0.0;
  cg_vel [2] = disp;
 
  cg_omega [0] = 0.0;
  cg_omega [1] = 0.0;
  cg_omega [2] = 0.0;
}
 
Compiled console script:

Copied C:\Users\...\TRIAL UDF\UDF\platetest_input.c to libudf\src

(system "copy "C:\PROGRA~1\ANSYSI~1\v212\fluent"\fluent21.2.0\src\udf\sconstruct.udf "libudf\win64\3ddp_host\SConstruct" ")

1 fichier(s) copi?(s).

(system "copy "C:\PROGRA~1\ANSYSI~1\v212\fluent"\fluent21.2.0\src\udf\scons_default.bat "libudf\win64\3ddp_host\scons_test.bat" ")

1 fichier(s) copi?(s).

Creating user_nt.udf file for 3ddp_host ...

(system "copy "C:\PROGRA~1\ANSYSI~1\v212\fluent"\fluent21.2.0\src\udf\makefile_nt.udf "libudf\win64\3ddp_host\makefile" ")

1 fichier(s) copi?(s).

(chdir "libudf")(chdir "win64\3ddp_host")

C:\Users\...\TRIAL UDF\Trial UDF input_files\dp0\FLU-1\Fluent\libudf\win64\3ddp_host>rem

C:\Users\...\TRIAL UDF\Trial UDF input_files\dp0\FLU-1\Fluent\libudf\win64\3ddp_host>rem Copyright 1987-2021 ANSYS, Inc. All Rights Reserved.

C:\Users\...\TRIAL UDF\Trial UDF input_files\dp0\FLU-1\Fluent\libudf\win64\3ddp_host>rem

'cl.exe' n'est pas reconnu en tant que commande interne

ou externe, un programme ex?cutable ou un fichier de commandes.

'clang-cl' n'est pas reconnu en tant que commande interne

ou externe, un programme ex?cutable ou un fichier de commandes.

scons: Reading SConscript files ...

scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly

File "C:\Users\...\TRIAL UDF\Trial UDF input_files\dp0\FLU-1\Fluent\libudf\win64\3ddp_host\SConstruct", line 8, in

scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly

File "C:\Users\...\TRIAL UDF\Trial UDF input_files\dp0\FLU-1\Fluent\libudf\win64\3ddp_host\SConstruct", line 18, in

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 "C:\Users\...\TRIAL UDF\Trial UDF input_files\dp0\FLU-1\Fluent\libudf\win64\3ddp_host\SConstruct", line 148, in

Copy("C:\Users\...\TRIAL UDF\Trial UDF input_files\dp0\FLU-1\Fluent\libudf\win64\3ddp_host\resolve.exe", "C:\PROGRA~1\ANSYSI~1\v212\fluent\ntbin\win64\resolve.exe")

Copy("C:\Users\...\TRIAL UDF\Trial UDF input_files\dp0\FLU-1\Fluent\libudf\win64\3ddp_host\platetest_input.c", "C:\Users\...\TRIAL UDF\Trial UDF input_files\dp0\FLU-1\Fluent\libudf\src\platetest_input.c")

UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 324: character maps to :

File "C:\Users\...\TRIAL UDF\Trial UDF input_files\dp0\FLU-1\Fluent\libudf\win64\3ddp_host\SConstruct", line 172:

generate_udf_source(t,s,env)

File "C:\Users\...\TRIAL UDF\Trial UDF input_files\dp0\FLU-1\Fluent\libudf\win64\3ddp_host\SConstruct", line 87:

for line in f:

File "C:\PROGRA~1\ANSYSI~1\v212\fluent/../commonfiles/CPython/3_7/winx64/Release/python\lib\encodings\cp1252.py", line 23:

return codecs.charmap_decode(input,self.errors,decoding_table)[0]

(system "copy "C:\PROGRA~1\ANSYSI~1\v212\fluent"\fluent21.2.0\src\udf\sconstruct.udf "libudf\win64\3ddp_node\SConstruct" ")

1 fichier(s) copi?(s).

(system "copy "C:\PROGRA~1\ANSYSI~1\v212\fluent"\fluent21.2.0\src\udf\scons_default.bat "libudf\win64\3ddp_node\scons_test.bat" ")

1 fichier(s) copi?(s).

Creating user_nt.udf file for 3ddp_node ...

(system "copy "C:\PROGRA~1\ANSYSI~1\v212\fluent"\fluent21.2.0\src\udf\makefile_nt.udf "libudf\win64\3ddp_node\makefile" ")

1 fichier(s) copi?(s).

(chdir "libudf")(chdir "win64\3ddp_node")

C:\Users\...\TRIAL UDF\Trial UDF input_files\dp0\FLU-1\Fluent\libudf\win64\3ddp_node>rem

C:\Users\...\TRIAL UDF\Trial UDF input_files\dp0\FLU-1\Fluent\libudf\win64\3ddp_node>rem Copyright 1987-2021 ANSYS, Inc. All Rights Reserved.

C:\Users\...\TRIAL UDF\Trial UDF input_files\dp0\FLU-1\Fluent\libudf\win64\3ddp_node>rem

'cl.exe' n'est pas reconnu en tant que commande interne

ou externe, un programme ex?cutable ou un fichier de commandes.

'clang-cl' n'est pas reconnu en tant que commande interne

ou externe, un programme ex?cutable ou un fichier de commandes.

scons: Reading SConscript files ...

scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly

File "C:\Users\...\TRIAL UDF\Trial UDF input_files\dp0\FLU-1\Fluent\libudf\win64\3ddp_node\SConstruct", line 8, in

scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly

File "C:\Users\...\TRIAL UDF\Trial UDF input_files\dp0\FLU-1\Fluent\libudf\win64\3ddp_node\SConstruct", line 18, in

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 "C:\Users\...\TRIAL UDF\Trial UDF input_files\dp0\FLU-1\Fluent\libudf\win64\3ddp_node\SConstruct", line 148, in

Copy("C:\Users\...\TRIAL UDF\Trial UDF input_files\dp0\FLU-1\Fluent\libudf\win64\3ddp_node\resolve.exe", "C:\PROGRA~1\ANSYSI~1\v212\fluent\ntbin\win64\resolve.exe")

Copy("C:\Users\...\TRIAL UDF\Trial UDF input_files\dp0\FLU-1\Fluent\libudf\win64\3ddp_node\platetest_input.c", "C:\Users\...\TRIAL UDF\Trial UDF input_files\dp0\FLU-1\Fluent\libudf\src\platetest_input.c")

UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 324: character maps to :

File "C:\Users\...\TRIAL UDF\Trial UDF input_files\dp0\FLU-1\Fluent\libudf\win64\3ddp_node\SConstruct", line 172:

generate_udf_source(t,s,env)

File "C:\Users\...\TRIAL UDF\Trial UDF input_files\dp0\FLU-1\Fluent\libudf\win64\3ddp_node\SConstruct", line 87:

for line in f:

File "C:\PROGRA~1\ANSYSI~1\v212\fluent/../commonfiles/CPython/3_7/winx64/Release/python\lib\encodings\cp1252.py", line 23:

return codecs.charmap_decode(input,self.errors,decoding_table)[0]

Done.