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

2.11.1 Compiling the Customized Fuel Cell and Electrolysis Source Code

This section includes instructions on how to compile a customized Fuel Cell and Electrolysis user-defined module. Note that you can also refer to the file INSTRUCTIONS-CLIENT that comes with your distribution (see addons/fuelcells).

figure   

It is assumed that you have a basic familiarity with compiling user-defined functions (UDFs). For an introduction on how to compile UDFs, please refer to the separate UDF manual.

You will first want to use a local copy of the fuelcells directory in the addons directory before you recompile the Fuel Cell and Electrolysis module.



Compiling the Customized Source Code Under Linux/UNIX


1.   Make a local copy of the fuelcells directory. Do not create a symbolic link.

figure   

The custom version of the library must be named according to the convention used by ANSYS FLUENT: e.g., fuelcells.

2.   Change directories to the fuelcells/src directory.

3.   Make changes to the pem_user.c file.

4.   Edit the makefile located in the src/ directory and make sure that the FLUENT_INC variable correctly refers to the current ANSYS FLUENT installation directory. Be careful not to leave any trailing spaces when you make your changes.

5.   Define the FLUENT_ADDONS environment variable to correspond to your customized version of the Fuel Cell and Electrolysis module.

6.   Change directories to the fuelcells/ directory.

7.   Issue the following make command:

make FLUENT_INC=[ansys_inc/v120/fluent] FLUENT_ARCH=[arch]
   -f Makefile-client

where your_arch is lnx86 on LINUX, or ultra on the Sun operating system, etc.

The following example demonstrates the steps required to set up and run a customized version of the Fuel Cell and Electrolysis module that is located in a folder call home/sample:



Compiling the Customized Source Code Under Windows


1.   Open Visual Studio .NET at the DOS prompt.

2.   Make sure that the $FLUENT_INC environment variable is correctly set to the current ANSYS FLUENT installation directory (e.g., ANSYS Inc\v120\fluent).

3.   Make a local copy of the fuelcells folder. Do not create a shortcut.

4.   Enter the fuelcells\src folder.

5.   Make changes to the pem_user.c file.

6.   Define the FLUENT_ADDONS environment variable to correspond to your customized version of the Fuel Cell and Electrolysis module.

7.   Return to the fuelcells folder.

8.   Issue the following command in the command window:

     nmake /f makefile_master-client.nt


next up previous contents Previous: 2.11 User-Accessible Functions
Up: 2.11 User-Accessible Functions
Next: 2.12 Using the Fuel
Release 12.0 © ANSYS, Inc. 2009-01-23