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

3.7.3 Compile Fiber Model UDFs

Once you have customized the UDF template fiber_fluent_interface.c for your fiber model application, you are now ready to compile the source file using the text interface. Follow the procedure below for UNIX/Linux Systems and Windows Systems, respectively.



UNIX/Linux Systems


1.   In the /src directory that is under /fiber in your working directory, execute the Makefile command that will compile your fiber mode UDF and build a shared library for the architecture you are running. To do this, type the following command at the prompt:

make -f Makefile-client FLUENT_ARCH=your_arch

where your_arch is replaced by the architecture of the machine you are running (e.g., ultra, lnx86).

For example, if your computer architecture is lnx86 type the following command in a terminal session:

make -f Makefile-client FLUENT_ARCH=lnx86

To identify the architecture of the machine you are running on, scroll up the ANSYS FLUENT console window to the message that begins with "Starting''.

When you execute the makefile process, the source code ( fluent_fiber_interface.c) will be compiled into object code and a shared library will be built for the computer architecture and version of ANSYS FLUENT you are running. Messages about the compile/build process will be displayed on the console window. You can view the compilation history in the `log' file that is saved in your working directory. Below is an example of console messages for a lnx86 architecture running a 2D version of ANSYS FLUENT.

    Working...
    for d in lnx86[23]*; do \
       ( \
         cd $d; \
         for f in ../../src*.[ch] ../../src/makefile; do \
           if [ ! -f 'basename $f' ]; then \
             echo "# linking to " $f "in" $d; \
             ln -s $f .; \
           fi; \
         done; \
         echo ""; \
         echo "# building library in" $d; \
         make -k>makelog 2>&1; \
         cat makelog; \
       ) \
    done
    # linking to ...   myudf.c in lnx86/2d

    # building library in lnx86/2d
    make[1]: Entering directory ..../udf_names.c
    # Generating udf_names 
    make[2]: Entering directory ..../fluent_fiber_interface.c
    make libudf.so ...
    # Compiling udf_names.o ...
    # Compiling profile.o ...
    # Linking libudf.so ...
    make[2]: Leaving directory ..../udf_names.c
    make[1]: Leaving directory ..../fluent_fiber_interface.c

    You can also see the 'log'-file in 
    the working directory for compilation history

    Done.



NT/Windows Systems


In the /src directory that is under /fiber in your working directory, execute the Makefile command that will compile your fiber mode UDF and build a shared library for it for the architecture you are running. To do this, type the following command at the prompt:

nmake /f makefile_master-client.nt

To identify the architecture of the machine you are running on, scroll up the ANSYS FLUENT console window to the message that begins with "Starting''.

When you execute the makefile process, the source code ( fluent_fiber_interface.c) will be compiled into object code and a shared library will be built for the computer architecture and version of ANSYS FLUENT you are running. Messages about the compile/build process will be displayed on the console window. You can view the compilation history in the `log' file that is saved in your working directory.


next up previous contents Previous: 3.7.2 Customize fiber_fluent_interface.c for
Up: 3.7 User-Defined Functions (UDFs)
Next: 3.7.4 Hook UDFs to
Release 12.0 © ANSYS, Inc. 2009-01-05