CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Unable to open file when loading UDF (https://www.cfd-online.com/Forums/fluent-udf/242735-unable-open-file-when-loading-udf.html)

Rampa May 8, 2022 05:30

Unable to open file when loading UDF
 
Hi everyone, I'm trying to simulate 2D hybrid rocket combustion using an UDF for the inlet mass flow rate at the solid fuel boundary. When I compile the UDF (using the method involving the Visual Studio command prompt) everything works fine and fluent returns this:


Code:

Copied C:\Users\alera\OneDrive\Desktop\UDF/udf_rr_HTPB_gradFL.c to libudf\src
Creating user_nt.udf file for 2ddp_host ...
(system "copy "C:\PROGRA~1\ANSYSI~1\v192\fluent"\fluent19.2.0\src\udf\makefile_nt.udf "libudf\win64\2ddp_host\makefile" ")
        1 file copied.
(chdir "libudf")(chdir "win64\2ddp_host")# Generating ud_io1.h
udf_rr_HTPB_gradFL.c
# Generating udf_names.c because of makefile udf_rr_HTPB_gradFL.obj
udf_names.c
# Linking libudf.dll because of makefile user_nt.udf udf_names.obj udf_rr_HTPB_gradFL.obj
Microsoft (R) Incremental Linker Version 14.29.30038.1
Copyright (C) Microsoft Corporation.  All rights reserved.

  Creation of library libudf.lib and object libudf.exp
Creating user_nt.udf file for 2ddp_node ...
(system "copy "C:\PROGRA~1\ANSYSI~1\v192\fluent"\fluent19.2.0\src\udf\makefile_nt.udf "libudf\win64\2ddp_node\makefile" ")
        1 file copied.
(chdir "libudf")(chdir "win64\2ddp_node")# Generating ud_io1.h
udf_rr_HTPB_gradFL.c
# Generating udf_names.c because of makefile udf_rr_HTPB_gradFL.obj
udf_names.c
# Linking libudf.dll because of makefile user_nt.udf udf_names.obj udf_rr_HTPB_gradFL.obj
Microsoft (R) Incremental Linker Version 14.29.30038.1
Copyright (C) Microsoft Corporation.  All rights reserved.

  Creation of library libudf.lib and object libudf.exp

Done.


Then when I press load fluent prints this thing below and "crashes" (it doesn't close but basically becomes unusable and weird, commands are no more executed for example, I can't retry loading and the only way is to close the application):


Code:

Opening library "C:\Users\alera\OneDrive\Desktop\UDF\libudf"...
Library "C:\Users\alera\OneDrive\Desktop\UDF\libudf\win64\2ddp_host\libudf.dll" opened

Unable to open file

 The fl process could not be started.
MPI Application rank 0 exited before MPI_Finalize() with status -1073740791


I've already tried starting fluent in parallel and serial mode, in single and double precision, and basically searched through all internet but found nothing. Can someone please help me? I'm going crazy with this error.

P.S. my Ansys version is 19.2 and my OS is windows 11

Thank you in advance

Rampa May 8, 2022 05:54

Solved: The problem was in the UDF itself that executed a piece of code that would force fluent to exit if a .txt input file was not present in the src folder. The error was so generic that I couldn't understand it. I wish my prof that gave me the UDF said me this beforehand :(.

Sorry for the bothering


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