Ansys Learning Forum Forums Discuss Simulation Fluids Running Chemkin through fortran Reply To: Running Chemkin through fortran

jcooper
Ansys Employee

Hi Neeraj:

The Chemkin API document details some preparation steps for Chemkin compilation on Unix. I would suggest going over these if you haven't already.  The primary issue here seems to be a missing library, however:

/home/neeraj/Documents/Ansys_inst/ansys_inc/v222/reaction/chemkinpro_linuxx8664/bin/sksample: error while loading shared libraries: libxerces-c-3.2.so: cannot open shared object file

The Ansys Chemkin-Pro installation file include/chemkin_make_unix.inc (include\chemkin_make_pc.inc for PC), defines make (nmake) macros for required compile and link flags, as well as library names and locations. You MUST use this installation file when compiling your own code to ensure that the compiler directives are consistent with those used in Chemkin-Pro, and to avoid errors during linking. A user makefile can set a few additional macros to compile and link a program; the user macro, CKROOT for example, must be defined as the root location of your Chemkin-Pro installation.  This should be included in the make file as below:

(Please see the Chemkin installation test files in ...ANSYS Inc\v231\reaction\chemkinpro.win64\samples\chemkin_cfd_api\test01 for another test program that uses the make file below.)

#
# This make file is used to build the Chemkin chemkin_cfd_api sample.

ALL : chemkin_cfd_api.out

# relative path to the CHEMKIN install directory
CKROOT  = ../../..

# global CHEMKIN make directives
include $(CKROOT)/include/chemkin_make_unix.inc

ALL_OBJS = $(CKROOT)/samples/chemkin_cfd_api/cpp_interface/KINetics_Driver$(OBJECT) $(CKROOT)/samples/chemkin_cfd_api/cpp_interface/KINeticsLibrary$(OBJECT)

ALL_LIBS = $(CPPF77_LIBFLAGS) -lKINetics -lkinetics_usr $(SAX_ONLY_LIBFLAGS) $(CPPF77_SYSTEM_LIBS)

CHEMKININCLUDE = -I. -I$(CKROOT)/include/ -I$(CKROOT)/samples/chemkin_cfd_api/API/

# make directives for this problem
include chemkin_cfd_api_test01_make.inc

chemkin_cfd_api.out     : chemkin_cfd_test$(EXE)
    $(CK_DISPLAY) Running chemkin_cfd_test
    .$(SLASH)chemkin_cfd_test$(EXE) > chemkin_cfd_api.out

I hope this helps.

Best Regards,

Judy