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

UDF-error while reading a case

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By AlexanderZ
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 23, 2022, 10:40
Default UDF-error while reading a case
  #1
Member
 
Marcin
Join Date: Jun 2016
Posts: 96
Rep Power: 9
destroy is on a distinguished road
Dear all,

I've got several houndreds of case and data files.

In Fluent, I'm using journal that read case and data, then export some contour.

However, I receive error that you can see at the picture. It comes from Fluent trying to compile functions, that it somehow could not find. Is it possible to tell fluent, not to search/compile these functions? I don't need them, I just want to export come contour...

I was trying in TUI:
define
user-define
auto-compile-compiled-udfs?
no


But it did not help


destroy is offline   Reply With Quote

Old   January 24, 2022, 01:45
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
open your case file
make reserve copy
unload all udf from the model and save
run your journal
destroy likes this.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   January 24, 2022, 04:11
Default
  #3
Member
 
Marcin
Join Date: Jun 2016
Posts: 96
Rep Power: 9
destroy is on a distinguished road
Thank you, this seems like a solution
destroy is offline   Reply With Quote

Old   July 16, 2022, 09:00
Default
  #4
Member
 
Marcin
Join Date: Jun 2016
Posts: 96
Rep Power: 9
destroy is on a distinguished road
Hey @AlexanderZ
I am having the same problem again, but with the large amount of case and data files.
Is there a possibility to do this automatically using e.g. TUI commends?
destroy is offline   Reply With Quote

Old   July 18, 2022, 00:29
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
Code:
(ti-menu-load-string (format #f "file read-case \"CASE_FILE_NAME_HERE\" OK \n"))
(if (> (length(rpgetvar 'udf/libname)) 0) 
	(do ((k 0 (+ k 1)))((> k (+ (length(rpgetvar 'udf/libname)) 1)))
	(ti-menu-load-string (format #f "define user-defined compiled-functions unload \n"))
	(newline)
	)
	(newline)
)
(ti-menu-load-string (format #f "file write-case \"CASE_FILE_NAME_HERE\" OK \n"))

REPEAT WITH OTHER NAME
destroy likes this.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   July 18, 2022, 11:49
Default
  #6
Member
 
Marcin
Join Date: Jun 2016
Posts: 96
Rep Power: 9
destroy is on a distinguished road
@AlexanderZ, thank you very much! this work well itself, however I am still unable to execute this code automatically with large case file number, because below pop-up-window shows, and makes it impossible to execute the rest of the journal.

Is there any work-around?

destroy is offline   Reply With Quote

Old   July 24, 2022, 18:27
Default
  #7
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
Code:
(ti-menu-load-string (format #f "file read-case \"CASE_FILE_NAME_HERE\" OK \n"))
(if (> (length(rpgetvar 'udf/libname)) 0) (ti-menu-load-string (format #f "define user-defined compiled-functions unload \n"))())
(ti-menu-load-string (format #f "file write-case \"CASE_FILE_NAME_HERE\" OK \n"))
open your case file
copy and paste line by line into fluent console, press enter for each line
if it works without problems, then you can run it via journal
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   July 24, 2022, 18:36
Default
  #8
Member
 
Marcin
Join Date: Jun 2016
Posts: 96
Rep Power: 9
destroy is on a distinguished road
@AlexanderZ yeah I understand, but:
maybe I did not explained clearly what I need.
I need to create a journal which will contain these commands for lets say 500 case files:

file read-case CASE_FILE_1
do stuff
file read-case CASE_FILE_2
do stuff
.
.
.
file read-case CASE_FILE_500
do stuff

BTW, I got a Python script that prepares such journal based on the case files that the working folder contains. So I do not need to paste and change the text 500 times.
BUT, such journal will not work because I get a pop-up-window (shown at my first message in topic) that stops the journal to work - you have to click OK.

So this is my problem and I do not now how to handle it.
destroy is offline   Reply With Quote

Old   July 24, 2022, 18:44
Default
  #9
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
code above will remove any UDF folders attached to your case file and will save case file without UDF

change CASE_FILE_NAME_HERE to your name CASE_FILE_1
follow instructions
journal file should not have errors, obviously
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   July 24, 2022, 19:05
Default
  #10
Member
 
Marcin
Join Date: Jun 2016
Posts: 96
Rep Power: 9
destroy is on a distinguished road
Yes. The journal file has got no error.
But the fact itself, that there is lack of UDF library, is interpreted as error, so it causes pop-up-window to be shown. And the pop-up-window stop the rest of the journal to execute.
see my first post in this topic with the screen
destroy 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
UDF to transfer results from one case to the next case howhs Fluent UDF and Scheme Programming 4 July 16, 2013 23:31
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem Attesz OpenFOAM Meshing & Mesh Conversion 12 May 2, 2013 10:52
Problem in running ICEM grid in Openfoam Tarak OpenFOAM 6 September 9, 2011 17:51
problem when converting mesh (made by ICEM) using fluentMeshToFoam Forrest_Lei OpenFOAM 11 October 16, 2009 06:28
UDF reading species data of pdf simulations Jamiro FLUENT 0 June 20, 2001 17:15


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