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

Fluent crash / interpret UFD script

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 30, 2019, 09:15
Default Fluent crash / interpret UFD script
  #1
New Member
 
Stefanos
Join Date: Jul 2019
Posts: 3
Rep Power: 6
sleontsi is on a distinguished road
Hi all!

Allow me to describe my problem. I have a simple geometry (can be attached if requested). I open it with DesignModeler and make a group of all the components. I do this in order to avoid problems with overlap regions in meshing. After the meshing is complete, I open it in fluent, meshing is ok, assign the materials to solid (aluminum). If I assign a temperature, a heat flux and simulate it, it works.

Now I try to insert a basic UDF file, DEFINE_SOURCE and I use the basic file and I take the one from the manual. When I try to compile it I get the following. In the build stage:

Copied C:\Users\sleontsi\ThermalStudies\ThermalRunaway_fi les\dp0\FFF-1\Fluent/C:\Users\sleontsi\ThermalStudies\ThermalRunaway_fi les\dp0\FFF-1\Fluent\udfscript.c to C:\Users\sleontsi\ThermalStudies\ThermalRunaway_fi les\dp0\FFF-1\Fluent\libudf\src
udf_names.c and user_nt.udf files in 3ddp_host are upto date.
(system "copy "C:\PROGRA~1\ANSYSI~1\v191\fluent"\fluent19.1.0\sr c\udf\makefile_nt.udf "C:\Users\sleontsi\ThermalStudies\ThermalRunaway_f iles\dp0\FFF-1\Fluent\libudf\win64\3ddp_host\makefile" ")
1 file(s) copied.
(chdir "C:\Users\sleontsi\ThermalStudies\ThermalRunaway_f iles\dp0\FFF-1\Fluent\libudf")(chdir "win64\3ddp_host")udf_names.c and user_nt.udf files in 3ddp_node are upto date.
(system "copy "C:\PROGRA~1\ANSYSI~1\v191\fluent"\fluent19.1.0\sr c\udf\makefile_nt.udf "C:\Users\sleontsi\ThermalStudies\ThermalRunaway_f iles\dp0\FFF-1\Fluent\libudf\win64\3ddp_node\makefile" ")
1 file(s) copied.
(chdir "C:\Users\sleontsi\ThermalStudies\ThermalRunaway_f iles\dp0\FFF-1\Fluent\libudf")(chdir "win64\3ddp_node")
Done.

in the load part I get:

Opening library "C:\Users\sleontsi\ThermalStudies\ThermalRunaway_f iles\dp0\FFF-1\Fluent\libudf"...
Library "C:\Users\sleontsi\ThermalStudies\ThermalRunaway_f iles\dp0\FFF-1\Fluent\libudf\win64\3ddp_host\libudf.dll" opened
Opening library "C:\Users\sleontsi\ThermalStudies\ThermalRunaway_f iles\dp0\FFF-1\Fluent\libudf"...
Library "C:\Users\sleontsi\ThermalStudies\ThermalRunaway_f iles\dp0\FFF-1\Fluent\libudf\win64\3ddp_node\libudf.dll" opened
heat_flux
Done.

and the dialog box closes. The problem now is that the function is not visible in the drop-down menu.

If I interpret it though, I can see the function, but when I try to run it, it crashes with ""999999 mpt_accept error accept failed invalid argument".

Any help will be highly appreciated.

Thanks a lot,
Best,
Stefanos
sleontsi is offline   Reply With Quote

Old   July 31, 2019, 00:02
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
show your UDF.

your file was not compiled, as it said to you all files are up to date.
open your source file, type space and delete it -> save -> recompile -> check console output

if you still have problems: show your udf, logs with errors

best regards
AlexanderZ is offline   Reply With Quote

Old   July 31, 2019, 01:25
Default
  #3
New Member
 
Stefanos
Join Date: Jul 2019
Posts: 3
Rep Power: 6
sleontsi is on a distinguished road
Hi Alexander! Thanks for the reply..

So, I started again. Removed the libudf folder from the dp0/FFF-1/Fluent folder and I recompiled, making a change and saving again the UDF file. These are the messages in the log:

> Copied C:\Users\sleontsi\ThermalStudies\ThermalRunaway_fi les\dp0\FFF-1\Fluent/C:\Users\sleontsi\ThermalStudies\ThermalRunaway_fi les\dp0\FFF-1\Fluent\udfscript.c to C:\Users\sleontsi\ThermalStudies\ThermalRunaway_fi les\dp0\FFF-1\Fluent\libudf\src

************************************************** **************************
************************************************** **************************
** WARNING: Automatically switched to run in parallel -t1 mode. **
** Detected non-parallelized UDF usage, enabling parallel usage. **
** If you encounter any issues, please re-run with -t0 flag. **
************************************************** **************************
************************************************** **************************udf_names.c and user_nt.udf files in 3ddp_host are upto date.
(system "copy "C:\PROGRA~1\ANSYSI~1\v191\fluent"\fluent19.1.0\sr c\udf\makefile_nt.udf "C:\Users\sleontsi\ThermalStudies\ThermalRunaway_f iles\dp0\FFF-1\Fluent\libudf\win64\3ddp_host\makefile" ")
1 file(s) copied.
(chdir "C:\Users\sleontsi\ThermalStudies\ThermalRunaway_f iles\dp0\FFF-1\Fluent\libudf")(chdir "win64\3ddp_host")
************************************************** **************************
************************************************** **************************
** WARNING: Automatically switched to run in parallel -t1 mode. **
** Detected non-parallelized UDF usage, enabling parallel usage. **
** If you encounter any issues, please re-run with -t0 flag. **
************************************************** **************************
************************************************** **************************udf_names.c and user_nt.udf files in 3ddp_node are upto date.
(system "copy "C:\PROGRA~1\ANSYSI~1\v191\fluent"\fluent19.1.0\sr c\udf\makefile_nt.udf "C:\Users\sleontsi\ThermalStudies\ThermalRunaway_f iles\dp0\FFF-1\Fluent\libudf\win64\3ddp_node\makefile" ")
1 file(s) copied.
(chdir "C:\Users\sleontsi\ThermalStudies\ThermalRunaway_f iles\dp0\FFF-1\Fluent\libudf")(chdir "win64\3ddp_node")
Done.

Opening library "C:\Users\sleontsi\ThermalStudies\ThermalRunaway_f iles\dp0\FFF-1\Fluent\libudf"...
Library "C:\Users\sleontsi\ThermalStudies\ThermalRunaway_f iles\dp0\FFF-1\Fluent\libudf\win64\3ddp_host\libudf.dll" opened
Opening library "C:\Users\sleontsi\ThermalStudies\ThermalRunaway_f iles\dp0\FFF-1\Fluent\libudf"...
Library "C:\Users\sleontsi\ThermalStudies\ThermalRunaway_f iles\dp0\FFF-1\Fluent\libudf\win64\3ddp_node\libudf.dll" opened
heat_flux
Done.

My UDF is pretty simple. I've attached it.

Thanks again for your time!
Attached Files
File Type: c udfscript.c (531 Bytes, 3 views)
sleontsi is offline   Reply With Quote

Old   July 31, 2019, 01:30
Default
  #4
New Member
 
Stefanos
Join Date: Jul 2019
Posts: 3
Rep Power: 6
sleontsi is on a distinguished road
Just a follow-up, when I recompile, without closing fluent and removing the folder suggested by fluent, I get this error:

LINK : fatal error LNK1104: cannot open file 'libudf.dll'
sleontsi is offline   Reply With Quote

Old   August 1, 2019, 00:39
Default
  #5
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
in case of
Code:
LINK : fatal error LNK1104: cannot open file 'libudf.dll'
you should unload your UDF, as it was done

check the order once again:
1.removed the libudf folder from your working directory
2.make a change and saving again the UDF file.
3.recompile

if everything is correct you should get
Code:
Creating library libudf.lib and object libudf.exp

Done.
your udf is pretty simple and should work
Code:
#include "udf.h"

DEFINE_SOURCE(heat_flux,c,t,dS,eqn) 
{
	real source;
	source = 1e6;
	dS[eqn] = 0;
	return source;
}
best regards
AlexanderZ is offline   Reply With Quote

Reply

Tags
999999, compile a udf, interpret a udf, mpt_accept error


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
C_YI causes Fluent to crash! gholoomi Fluent UDF and Scheme Programming 2 July 25, 2019 23:52
Fluent Script Setup For HPC- Writing Surface Monitors okaldirim FLUENT 1 March 15, 2017 20:44
SGE fluent job submission script mrji8011 FLUENT 2 May 5, 2011 20:59
thread pointer comparison crash in Fluent UDF Miriam Main CFD Forum 0 August 31, 2008 16:40
Hepl!! regarding ufd in fluent sandeep Goel Main CFD Forum 0 June 28, 2007 20:59


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