[ANSYS, Inc. Logo] return to home search
next up previous contents index


5.3.1 Set Up the Directory Structure

The folder/directory structures for Windows systems and UNIX/Linux systems are different, so the procedure for setting up the folder/directory structure is described separately for each.



Windows Systems


For compiled UDFs on Windows systems, two ANSYS FLUENT files are required to build your shared UDF library: makefile_nt.udf and user_nt.udf . The file user_nt.udf has a user-modifiable section that allows you to specify source file parameters.

The procedure below outlines steps that you need to follow in order to set up the folder structure required for the shared library.

1.   In your working folder, make a folder that will store your UDF library (e.g., libudf).

2.   Make a folder below this called src.

3.   Put all your UDF source files into this folder (e.g., libudf\src).

4.   Make an architecture folder below the library folder called ntx86 or win64 for Intel systems running Windows (e.g., libudf\ntx86).

5.   In the architecture folder (e.g., libudf\ntx86), create folders for the ANSYS FLUENT versions you want to build for your architecture. (e.g., ntx86\2d and ntx86\3d). Possible versions are:


2d or 3d single-precision serial 2D or 3D
2ddp or 3ddp double-precision serial 2D or 3D
2d_node and 2d_host single-precision parallel 2D
3d_node and 3d_host single-precision parallel 3D
2ddp_node and 2ddp_host double-precision parallel 2D
3ddp_node and 3ddp_host double-precision parallel 3D
   

figure   

Note that you must create two build folders for each parallel version of the solver (two for the 3D version, two for the 2D double-precision version, etc.), regardless of the number of compute nodes.

6.   Copy user_nt.udf from

path $\backslash$ ANSYS Inc $\backslash$ v120 $\backslash$ fluent $\backslash$ fluent12.0. $\stackrel{\Downarrow}{x} \backslash$ src $\backslash$

to all the version subfolders you have made (e.g., libudf\ntx86\3d).

Note that path is the folder in which you have installed ANSYS FLUENT (by default, the path is C: $\backslash$ Program Files), and $x$ is replaced by the appropriate number for the release (e.g., 9 for fluent12.0.9).

7.   Copy makefile_nt.udf from

path $\backslash$ ANSYS Inc $\backslash$ v120 $\backslash$ fluent $\backslash$ fluent12.0. $\stackrel{\Downarrow}{x} \backslash$ src $\backslash$

to all the version subfolders you have made (e.g., libudf\ntx86\3d) and rename it makefile.

Note that path is the folder in which you have installed ANSYS FLUENT (by default, the path is C: $\backslash$ Program Files), and $x$ is replaced by the appropriate number for the release (e.g., 9 for fluent12.0.9).



UNIX and Linux Systems


For compiled UDFs on UNIX systems, two ANSYS FLUENT files are required to build your shared UDF library: makefile.udf and makefile.udf2 . The file makefile has a user-modifiable section that allows you to specify source file parameters. The procedure below outlines steps that you need to follow in order to set up the directory structure required for the shared library.

1.   In your working directory, make a directory that will store your UDF library (e.g., libudf).

2.   Copy makefile.udf2 from

path /ansys_inc/v120/fluent/fluent12.0. $\stackrel{\Downarrow}{x}$ /src/makefile.udf2

to the library directory (e.g., libudf), and name it Makefile.

Note that path is the directory in which you have installed ANSYS FLUENT, and $x$ is replaced by the appropriate number for the release (e.g., 9 for fluent12.0.9).

3.   In the library directory you just created in Step 1, make a directory that will store your source file and name it src.

4.   Copy your source file (e.g., myudf.c) to the source directory ( /src).

5.   Copy makefile.udf from

path /ansys_inc/v120/fluent/fluent12.0. $\stackrel{\Downarrow}{x}$ /src/makefile.udf

to the /src directory, and name it makefile.

Note that path is the directory in which you have installed ANSYS FLUENT, and $x$ is replaced by the appropriate number for the release (e.g., 9 for fluent12.0.9).

6.   Identify the architecture name of the machine on which you are running (e.g., ultra). This can be done by either typing the command (fluent-arch) in the ANSYS FLUENT TUI window, or running the ANSYS FLUENT utility program fluent_arch at the command line of a UNIX shell.

figure   

Note that if you are running a 64-bit version of ANSYS FLUENT the architecture name will have a _64 appended to it (e.g., ultra_64).

7.   In the library directory (e.g., libudf), create an architecture directory that is named after the architecture identifier determined in the previous step (e.g., ultra).

8.   In the architecture directory, create directories named after the ANSYS FLUENT versions for which you want to build shared libraries (e.g., ultra/2d and ultra/3d). Possible versions are:


2d or 3d single-precision serial 2D or 3D
2ddp or 3ddp double-precision serial 2D or 3D
2d_node and 2d_host single-precision parallel 2D
3d_node and 3d_host single-precision parallel 3D
2ddp_node and 2ddp_host double-precision parallel 2D
3ddp_node and 3ddp_host double-precision parallel 3D
   

figure   

Note that you must create two build directories for each parallel version of the solver (two for the 3D version, two for the 2D double-precision version, etc.), regardless of the number of compute nodes.


next up previous contents index Previous: 5.3 Compile a UDF
Up: 5.3 Compile a UDF
Next: 5.3.2 Build the UDF
Release 12.0 © ANSYS, Inc. 2009-01-14