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

Compiled UDF on BATCH file

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Bionico

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 10, 2012, 10:44
Default Compiled UDF on BATCH file
  #1
Senior Member
 
Bionico's Avatar
 
Flavio
Join Date: Sep 2011
Location: Brescia, Italy
Posts: 181
Rep Power: 16
Bionico is on a distinguished road
Hi everybody,
I have a problem running a BATCH file: it should open a certain number of simulations (case and data saved with UDF already compiled) and run them.
Nevertheless when it load the first simulation an error appears: it seems that it can't find the library (it tries to find it in the root?!!) !!
But if I load my simulation without BATCH file it finds the library in the same folder of the simulation, obviously...
Can anybody tell me how to solve my problem?
I think that maybe I have to add some commands to my BATCH file (for example a command that re-compile my UDF...)

Please help me!

PS: my batch file is quite simple, only rcd (read case and data), it # (execute a certain number of iteration) and wcd (write case and data)
souza.emer likes this.
Bionico is offline   Reply With Quote

Old   June 1, 2012, 15:57
Default
  #2
Member
 
Fer Villa
Join Date: Apr 2012
Posts: 35
Rep Power: 14
fevi84 is on a distinguished road
This is a journal file (unsteady problem) that I'm ussing:

file/read-cas-data VOFaxiNf1000-12
define/user-defined/compiled-functions load "libudf/lnamd64/2d/libudf.so"
define/user-defined/function-hooks/initialization "gas_fraction_axis::libudf.so" ""
solve/initialize/initialize-flow
file/auto-save/case-frequency if-case-is-modified
file/auto-save/data-frequency 100 (save numbered dat file every 100 time steps)
file/auto-save/root-name VOFaxiNf1000 (file format will be VOFaxiNf1000-####.dat)
file/confirm-overwrite y
solve/set/time-step 0.0001
solve/dual-time-iterate 1000 20
file/wd finVOFaxiNf1000
exit
yes

1000 = number phisical time step specified
20 = maximum number of iterations per time step



In this journal file the initialization (line red) don't work

This journal file open the library, but not initialized the UDF (my UDF is for a initial condition), the message is the follow:


>
Opening library "/home/####/Documents/VOFaxiNf1000/libudf/lnamd64/2d/libudf.so"...
Library "/home/#####/Documents/VOFaxiNf1000/libudf/lnamd64/2d/libudf.so" opened
gas_fraction_axis
Done.

Opening library "/home/#####/Documents/VOFaxiNf1000/libudf/lnamd64/2d/libudf.so"...
Library "/home/#####/Documents/VOFaxiNf1000/libudf/lnamd64/2d/libudf.so" opened
Opening library "/home/#####/Documents/VOFaxiNf1000/libudf/lnamd64/2d/libudf.so"...
Library "/home/#####/Documents/VOFaxiNf1000/libudf/lnamd64/2d/libudf.so" opened
Opening library "/home/######/Documents/VOFaxiNf1000/libudf/lnamd64/2d/libudf.so"...
Library "/home/######/Documents/VOFaxiNf1000/libudf/lnamd64/2d/libudf.so" opened
Opening library "/home/######/Documents/VOFaxiNf1000/libudf/lnamd64/2d/libudf.so"...
Library "/home/######/Documents/VOFaxiNf1000/libudf/lnamd64/2d/libudf.so" opened
> Enter Initialization function 1 from list: ("gas_fraction_axis::libudf.so" "")
Enter Initialization function 2 from list: ("gas_fraction_axis::libudf.so" "")


>
>
>
>
>
>
>
Updating solution at time level N...
Global Courant Number : 0.00
done.
iter continuity x-velocity y-velocity time/iter
1 1.0000e+00 1.0478e+00 0.0000e+00 0:00:00 1
1 0.0000e+00 6.5424e-02 1.2007e-05

...continue iteration


If you know why the initialization don't work, PLEASE HELP ME
fevi84 is offline   Reply With Quote

Old   June 1, 2012, 17:14
Default
  #3
Member
 
Fer Villa
Join Date: Apr 2012
Posts: 35
Rep Power: 14
fevi84 is on a distinguished road
Hi, again

I found the erro. The erro is not in the initialization, the erro is in the compilation due to the file ".c" was created in Windows. The file ".c" has be to created in Linux. This manner, you can interpreted or compiled the file ".c" through a journal file for running your case on Cluster.
fevi84 is offline   Reply With Quote

Old   June 4, 2018, 17:44
Default
  #4
New Member
 
Join Date: Mar 2018
Posts: 7
Rep Power: 8
yomnag is on a distinguished road
Quote:
Originally Posted by fevi84 View Post
Hi, again

I found the erro. The erro is not in the initialization, the erro is in the compilation due to the file ".c" was created in Windows. The file ".c" has be to created in Linux. This manner, you can interpreted or compiled the file ".c" through a journal file for running your case on Cluster.
do you mean that i should create .jou file and add the udf.c commands in it
yomnag 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
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 18:22
Problem installing on Ubuntu 9.10 -> 'Cannot open : No such file or directory' mfiandor OpenFOAM Installation 2 January 25, 2010 10:50
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 11:23
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08
ParaView Compilation jakaranda OpenFOAM Installation 3 October 27, 2008 12:46


All times are GMT -4. The time now is 17:13.