Beruflich Dokumente
Kultur Dokumente
Object : UDF
All about UDF:
http://orange.engr.ucdavis.edu/Documentation12.0/120/FLUENT/fludf.pdf
https://www.sharcnet.ca/Software/Ansys/16.0/en-us/help/flu_udf/flu_udf.html
If fluent is running on Windows (x64), the compiled udf approach need some
process first. Lots of users find it is hard at the beginning of UDF use. Most of the
time, there is an error:
This is just the problem of binding between FLUENT and VC++. To know more
about this problem, firstly please refer to following post :
http://www.cfd-online.com/Wiki/Fluen...at_is_wrong.3F
http://www.cfd-online.com/Forum/flue...cgi?read=47472
http://www.ansys-blog.com/user-defined-functions-udfs-2/
gives a long solution about how to solve this problem, but my experience following
this did not give me a solution.
Pagina 1
Giacomo Marani 07 / 02 / 2016
3. The most important thing is to try to open FLUENT in Visual Studio Command
Prompt, which is in 'Start-All programs-Microsoft Visual Studio-Microsoft
Visual Studio Tools-Visual Studio Command Prompt'. Then type FLUENT in
the command window, FLUENT is starting. Now you can close the Visual
Studio Command Prompt, it does not impact the compiling of UDF.
That is it. Very simple, remember to open FLUENT in the Visual Studio Command
Prompt, you will be always OK.
Pagina 2
Giacomo Marani 07 / 02 / 2016
More About :
http://www.nus.edu.sg/comcen/svu/publications/hpc_nus/sept_2004/parallel_fluent.pdf
A) Multiprocessor Machine :
Use FLUENT Launcher to start the 2/3D parallel version of ANSYS FLUENT on a
Windows, Linux, or UNIX machine using 2/4 processes.
3. Click OK.
fluent 2d -t4
If you type fluent at the command prompt, then FLUENT Launcher will appear.
B) Network of Computers :
Pagina 3
Giacomo Marani 07 / 02 / 2016
5. Click the Show More >> button and select the Parallel Settings tab.
• Retain the selection of default in the Interconnects and MPI Types drop-
down lists.
• Make sure that File Containing Machine Names is selected to specify the
file.
• Type the name and location of the hosts text file in the text box below File
Containing Machine Names, or browse and select it using the Browsing
Machine File dialog box.
Alternatively, you can select Machine Names and type the names of the ma-
chines in the text box.
6. Click OK.
You can also start parallel ANSYS FLUENT by typing the following at the
command prompt:
where -cnf indicates the location of the hosts text file. The hosts file is a text file
that contains a list of the computers on which you want to run the parallel job. If the
hosts file is not located in the directory where you are typing the startup command,
you will need to supply the full pathname to the file. For example, the fluent.hosts
file may look like the following:
my_computer
another_computer
Pagina 4
Giacomo Marani 07 / 02 / 2016
Note that some lines have a few words in round brackets at the end. These are just
description comments and therefore should NOT be included in your journal file.
To change a line in our journal file to be a comment simply put a semi-colon ; in
front and it will be ignored by fluent.
First its recommended to open your cas file in fluent-gui and click Define --> User-
Defined --> Functions --> Interpreted --> Unset File Name then re-save the cas file
before using it in the following journal file templates when submitting jobs to the
queue. Please do not include the contents between the round brackets shown in
either of the following two journal files, as these are just descriptive comments.
- Initialize Domain:
This journal file (sample1.jou) reads cas and dat files with a common prefix ie)
CasDatFileName.cas, CasDatFileName.dat then initializes the computational
domain and runs 1000 iterations:
Note : On the first line “cpp” is for windows, when you run on UNIX or Linux this
must be changed in “gcc”
Pagina 5
Giacomo Marani 07 / 02 / 2016
- Restart Domain:
In this journal file (sample2.jou) the cas and dat files have a different prefix. It
restarts calculations using CasDatFileName.cas and itrCasDatFileName-1000.dat
output from sample1.jou therefore the command to initialize the domain is
commented out using a semicolon as follows:
Please note that you cannot simply upload your libudf directory to sharcnet from
your local workstation, it will not work. You must build it on a sharcnet centos6
machine such as vdi-centos6 as described in the How to Compile a UDF section
below.
First its recommended to open your cas file in fluent-gui and click:
Define --> User-Defined --> Functions --> Interpreted --> (unset Source File Name)
Define --> User-Defined --> Functions --> Compiled --> (add/build or load libudf)
Define --> User-Defined --> Functions --> Manage --> (unload all UDF bibraries)
Define --> User-defined --> Functions --> Manage --> Load (type libudf then click
Load)
Pagina 6
Giacomo Marani 07 / 02 / 2016
where:
Assuming boundary conditions were defined using interpreted UDF(s) during the
case file construction/setup then its worthwhile to verify such conditions are still
defined before running large jobs. This can be done by first interpreting the UDF
then second reading in the corresponding cas file using "fluent-gui" and then
inspect Define --> Boundary Condition --> Click inlet --> Click Set --> Velocity
Magnitide and these should reference the udf profile velocity profiles defined such
as ie) udf YourProfileName. If this procedure is done with compiled UDF one will
find the boundary conditions are not defined unless either interpreted first or
hooked in, as shown in the Compiled UDF example journal file above.
Pagina 7
Giacomo Marani 07 / 02 / 2016
http://www.afs.enea.it/project/neptunius/docs/fluent/html/tuilist/main_pre.htm
Pagina 8