diff --git a/Cantera/matlab/cantera/@Interface/Interface.m b/Cantera/matlab/cantera/@Interface/Interface.m index ac28888b4..b8f63259b 100644 --- a/Cantera/matlab/cantera/@Interface/Interface.m +++ b/Cantera/matlab/cantera/@Interface/Interface.m @@ -1,10 +1,6 @@ function s = Interface(src, id, p1, p2, p3, p4) % Interface - class Interface constructor. % -% -if nargin ~= 3 - error('wrong number of arguments'); -end doc = XML_Node('doc',src); node = findByID(doc,id); t = ThermoPhase(node); diff --git a/Cantera/matlab/cantera/@Kinetics/Kinetics.m b/Cantera/matlab/cantera/@Kinetics/Kinetics.m index cd2d4437e..bd57602e3 100755 --- a/Cantera/matlab/cantera/@Kinetics/Kinetics.m +++ b/Cantera/matlab/cantera/@Kinetics/Kinetics.m @@ -6,7 +6,6 @@ function k = Kinetics(r, ph, neighbor1, neighbor2, neighbor3, neighbor4) % that manage reaction mechanisms. The reaction mechanism % attributes are specified in a CTML file. % -% % indices for bulk phases in a heterogeneous mechanism. % initialize < 0 so that bulk phases will not be included. @@ -15,9 +14,10 @@ ineighbor2 = -1; ineighbor3 = -1; ineighbor4 = -1; +% if only one argument is supplied, and it is an instance of +% 'Kinetics', return a copy of this instance if nargin == 1 if isa(r,'Kinetics') - % create a copy k = r; return else @@ -25,7 +25,8 @@ if nargin == 1 end end - +% if more than one arguement, first one must be an XML_Node +% instance representing the XML tree if ~isa(r,'XML_Node') error('first argument must be an XML_Node object') end @@ -33,6 +34,8 @@ end k.owner = 1; ixml = hndl(r); +% get the integer indices used to find the stored objects +% representing the phases participating in the mechanism. iphase = thermo_hndl(ph); if nargin > 2 ineighbor1 = thermo_hndl(neighbor1) diff --git a/Cantera/matlab/cantera/@XML_Node/XML_Node.m b/Cantera/matlab/cantera/@XML_Node/XML_Node.m index 341c72eb8..d6907e460 100644 --- a/Cantera/matlab/cantera/@XML_Node/XML_Node.m +++ b/Cantera/matlab/cantera/@XML_Node/XML_Node.m @@ -1,7 +1,8 @@ function x = XML_Node(name, src, wrap) % -% XML_Node Cantera XML_Node class constructor +% XML_Node - Cantera XML_Node class constructor % + x.id = 0; if nargin == 3 x.id = wrap; diff --git a/Cantera/matlab/cantera/importPhase.m b/Cantera/matlab/cantera/importPhase.m index 5db3697a5..19bad1cb1 100644 --- a/Cantera/matlab/cantera/importPhase.m +++ b/Cantera/matlab/cantera/importPhase.m @@ -1,5 +1,5 @@ function s = importPhase(file, name) -% IMPORTPHASE - import a phase +% IMPORTPHASE - import a phase from a CTI file % if nargin == 1 s = Solution(file); diff --git a/Cantera/matlab/cantera/private/xmlmethods.cpp b/Cantera/matlab/cantera/private/xmlmethods.cpp index d326579c9..97ea8aadb 100644 --- a/Cantera/matlab/cantera/private/xmlmethods.cpp +++ b/Cantera/matlab/cantera/private/xmlmethods.cpp @@ -105,7 +105,7 @@ void xmlmethods( int nlhs, mxArray *plhs[], break; case 15: file = getString(prhs[3]); - iok = xml_get_XML_File(file); // xml_preprocess_and_build(i, file); + iok = xml_get_XML_File(file); break; default: mexErrMsgTxt("unknown job parameter"); diff --git a/Cantera/python/Cantera/set.py b/Cantera/python/Cantera/set.py index baaa82e62..2a8d290e9 100755 --- a/Cantera/python/Cantera/set.py +++ b/Cantera/python/Cantera/set.py @@ -49,9 +49,12 @@ def setByName(a, options): elif o == 'Entropy' or o == 'S': sval = val ns += 1 - elif o == 'Sat' or o == 'Vapor' or o == 'Vap': + elif o == 'Vapor' or o == 'Vap': nq += 1 qval = val + elif o == 'Liquid' or o == 'Liq': + nq += 1 + qval = 1.0 - val else: raise CanteraError('unknown property: '+o) @@ -59,20 +62,27 @@ def setByName(a, options): if nx + ny > 1: raise CanteraError('composition specified multiple times') + nn = [nt, np, nv, ns, nh, nu, nq] + for n in nn: + if n > 1: + raise CanteraError('property specified multiple times') + ntot = nt + np + nv + ns + nh + nu + nq + # set individual properties if ntot == 1: if nt == 1: a.setTemperature(tval) elif nv == 1: a.setDensity(1.0/vval) elif np == 1: - a.seetPressure(pval) + a.setPressure(pval) else: props = options.keys() raise CanteraError('property '+props[0]+ ' can only be set in combination with ' +'another property') + # set property pairs elif ntot == 2: if np == 1 and nh == 1: a.setState_HP(hval, pval) diff --git a/Cantera/python/Cantera/solution.py b/Cantera/python/Cantera/solution.py index dca438f62..7d706366c 100755 --- a/Cantera/python/Cantera/solution.py +++ b/Cantera/python/Cantera/solution.py @@ -43,6 +43,8 @@ class Solution(ThermoPhase, Kinetics, Transport): else: s = root.child(name = "phase") + self._name = s['id'] + # initialize the equation of state ThermoPhase.__init__(self, xml_phase=s) @@ -62,6 +64,9 @@ class Solution(ThermoPhase, Kinetics, Transport): def __repr__(self): return _cantera.phase_report(self._phase_id, self.verbose) + def name(self): + return self._name + def set(self, **options): """Set various properties. T --- temperature [K] diff --git a/Cantera/python/tutorial/tut3.py b/Cantera/python/tutorial/tut3.py index b6aa5d57d..aeb67257a 100644 --- a/Cantera/python/tutorial/tut3.py +++ b/Cantera/python/tutorial/tut3.py @@ -6,18 +6,30 @@ print """ """ ###################################################### -# Python has a built-in help facility. To get help on any class or -# function (in Cantera or not), import it and the call 'help' with the -# class or function as the argument +# Suppose you have created a Cantera object and want to know what +# methods are available for it, and get help on using the methods. +from Cantera import * +g = GRI30() -from Cantera import Solution -help(Solution) +# The first thing you need to know is the Python class that object g +# belongs to. In Python, the class an object belongs to is stored in +# data member __class__: + +print g.__class__ + +# To get help on this class, type +help(g.__class__) -from Cantera import Reactor -help(Reactor) # You can also use the Python module browser to view this same -# information in a web browser. Under Windows, goto -# Programs/Python2.x/Module Docs on the Start menu. On unix or Mac -# OSX, type 'pydoc -g' at a shell prompt, A small pop-up window will -# appear. Click on 'open browser', then navigate to the Cantera module +# information in a web browser. +# Under Windows, on the Start menu +# select Programs/Python2.x/Module Docs. On unix or Mac OSX, type +# 'pydoc -g' at a shell prompt, A small pop-up window will +# appear. Click on 'open browser', then navigate to the Cantera module, and then select what you want documentation about. + +# The module browser can also be started from within a Python script +# as follows: +import pydoc +pydoc.gui() + diff --git a/Cantera/src/PureFluidPhase.h b/Cantera/src/PureFluidPhase.h index 9e27392f4..de07c5e8b 100644 --- a/Cantera/src/PureFluidPhase.h +++ b/Cantera/src/PureFluidPhase.h @@ -73,7 +73,7 @@ namespace Cantera { virtual doublereal enthalpy_mole() const { setTPXState(); doublereal h = m_sub->h() * m_mw; - check(); + check(h); return h; } @@ -83,7 +83,7 @@ namespace Cantera { virtual doublereal intEnergy_mole() const { setTPXState(); doublereal u = m_sub->u() * m_mw; - check(); + check(u); return u; } @@ -93,7 +93,7 @@ namespace Cantera { virtual doublereal entropy_mole() const { setTPXState(); doublereal s = m_sub->s() * m_mw; - check(); + check(s); return s; } @@ -103,7 +103,7 @@ namespace Cantera { virtual doublereal gibbs_mole() const { setTPXState(); doublereal g = m_sub->g() * m_mw; - check(); + check(g); return g; } @@ -114,7 +114,7 @@ namespace Cantera { virtual doublereal cp_mole() const { setTPXState(); doublereal cp = m_sub->cp() * m_mw; - check(); + check(cp); return cp; } @@ -125,7 +125,7 @@ namespace Cantera { virtual doublereal cv_mole() const { setTPXState(); doublereal cv = m_sub->cv() * m_mw; - check(); + check(cv); return cv; } @@ -136,7 +136,7 @@ namespace Cantera { virtual doublereal pressure() const { setTPXState(); doublereal p = m_sub->P(); - check(); + check(p); return p; } @@ -177,7 +177,7 @@ namespace Cantera { /// saturation temperature virtual doublereal satTemperature(doublereal p) const { doublereal ts = m_sub->Tsat(p); - check(); + check(ts); return ts; } @@ -220,14 +220,14 @@ namespace Cantera { doublereal ps = m_sub->Ps(); m_sub->Set(tpx::TV,tsv,vsv); - check(); + check(ps); return ps; } virtual doublereal vaporFraction() const { setTPXState(); doublereal x = m_sub->x(); - check(); + check(x); return x; } @@ -235,14 +235,16 @@ namespace Cantera { setTemperature(t); setTPXState(); m_sub->Set(tpx::TX, t, x); - setDensity(1.0/m_sub->v()); + setDensity(1.0/m_sub->v()); + check(); } virtual void setState_Psat(doublereal p, doublereal x) { setTPXState(); m_sub->Set(tpx::PX, p, x); setTemperature(m_sub->Temp()); - setDensity(1.0/m_sub->v()); + setDensity(1.0/m_sub->v()); + check(); } @@ -252,8 +254,8 @@ protected: m_sub->Set(tpx::TV, temperature(), 1.0/density()); } - void check() const { - if (m_sub->Error()) { + void check(doublereal v = 0.0) const { + if (m_sub->Error() || v == tpx::Undef) { throw CanteraError("PureFluidPhase",string(tpx::errorMsg( m_sub->Error()))); } diff --git a/Cantera/src/ct2ctml.cpp b/Cantera/src/ct2ctml.cpp index 7ae6a670a..2f328e069 100644 --- a/Cantera/src/ct2ctml.cpp +++ b/Cantera/src/ct2ctml.cpp @@ -21,24 +21,26 @@ #include #include "ctml.h" -//#ifndef WIN32 -//#include "pypath.h" -//#endif - using namespace Cantera; namespace ctml { + // return the full path to the Python interpreter. Use + // environment variable PYTHON_CMD if it is set, otherwise use the + // definition PYTHON_EXE if it is defined. Failing that, return + // the string 'python'. static string pypath() { string s = "python"; -#ifdef PYTHON_EXE - s = string(PYTHON_EXE); - return s; -#else const char* py = getenv("PYTHON_CMD"); - if (py) s = string(py); - return s; + if (py) { + s = string(py); + } +#ifdef PYTHON_EXE + else { + s = string(PYTHON_EXE); + } #endif + return s; } static bool checkPython() { @@ -59,7 +61,7 @@ namespace ctml { ierr = system(cmd.c_str()); if (ierr != 0) { string msg; - msg = cmd + "\n\n########################################################################\n\n" + msg = cmd +"\n\n########################################################################\n\n" "The Cantera Python interface is required in order to process\n" "Cantera input files, but it does not seem to be correctly installed.\n\n" "Check that you can invoke the Python interpreter with \n" @@ -113,7 +115,6 @@ namespace ctml { ifstream ferr("ct2ctml.log"); if (ferr) { while (!ferr.eof()) { - //msg += "\n"; ferr.get(ch); s += ch; if (ch == '\n') { @@ -125,7 +126,7 @@ namespace ctml { } } catch (...) { - ; //writelog("could not print error message.\n"); + ; } if (ierr != 0) { string msg = cmd; diff --git a/Cantera/src/misc.cpp b/Cantera/src/misc.cpp index a6c66f101..cd2e654b5 100755 --- a/Cantera/src/misc.cpp +++ b/Cantera/src/misc.cpp @@ -203,9 +203,14 @@ namespace Cantera { string lastErrorMessage() { appinit(); - if (nErrors() > 0) - return "\nProcedure: "+__app->errorRoutine.back() - +"\nError: "+__app->errorMessage.back(); + if (nErrors() > 0) { + string head = + "\n\n************************************************\n" + " Cantera Error! \n" + "************************************************\n\n"; + return head+string("\nProcedure: ")+__app->errorRoutine.back() + +string("\nError: ")+__app->errorMessage.back(); + } else return ""; } diff --git a/Cantera/user/Makefile.in b/Cantera/user/Makefile.in index 3e7740fbf..1a38d2ed2 100644 --- a/Cantera/user/Makefile.in +++ b/Cantera/user/Makefile.in @@ -8,6 +8,16 @@ # ############################################################### +############################################################### +# list your object files here +# This is probably the only thing you need to change in this file. + +OBJS = user.o + +############################################################### + + + SUFFIXES= SUFFIXES= .cpp .d .o @@ -15,8 +25,6 @@ OBJDIR = . CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) -# list your object files here -OBJS = user.o CXX_INCLUDES = -I../src diff --git a/Makefile.in b/Makefile.in index dee4f91bb..999d88ebd 100755 --- a/Makefile.in +++ b/Makefile.in @@ -25,14 +25,19 @@ all: kernel user cxxlib hdr-collect clib python matlab particles \ # use this target on a Windows machine to build the Python and # MATLAB interfaces after building the project in Visual C++ -win: hdr-collect python matlab - +win: hdr-collect python matlab + @echo + @echo Now type \'make win-install\' to install Cantera in @ct_dir@. + @echo install: hdr-install kernel-install data-install python-install \ matlab-install particles-install tools-install finish-install win-install: hdr-install win-kernel-install data-install python-install \ matlab-install particles-install finish-install + @echo + @echo Cantera has been successfully installed in @ct_dir@. + @echo demos: example_codes @@ -146,10 +151,10 @@ ifeq ($(build_matlab),1) cd Cantera/matlab; @MAKE@ endif -win-matlab: -ifeq ($(build_matlab),1) - cd Cantera/matlab; @MAKE@ win -endif +#win-matlab: +#ifeq ($(build_matlab),1) +# cd Cantera/matlab; @MAKE@ win +#endif matlab-install: ifeq ($(build_matlab),1) diff --git a/config/configure b/config/configure index 335c946f9..61955a0ee 100755 --- a/config/configure +++ b/config/configure @@ -966,6 +966,10 @@ if test -z "$BLAS_LIBRARY"; then BLAS_LIBRARY=-lctblas; build_blas=1; fi LOCAL_LIBS= +if test -n "$INCL_USER_CODE" +then LOCAL_LIBS=$LOCAL_LIBS' '-luser +fi + if test -n "$NEED_ONED" then LOCAL_LIBS=$LOCAL_LIBS' '-loneD fi @@ -978,13 +982,8 @@ if test -n "$NEED_TRANSPORT" then LOCAL_LIBS=$LOCAL_LIBS' '-ltransport fi -#if test -n "$NEED_CKREADER" -#then LOCAL_LIBS=$LOCAL_LIBS' '-lconverters -#fi - LOCAL_LIBS=$LOCAL_LIBS' '-lcantera - if test -n "$NEED_RECIPES" then LOCAL_LIBS=$LOCAL_LIBS' '-lrecipes fi @@ -1060,7 +1059,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1064: checking for $ac_word" >&5 +echo "configure:1063: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PYTHON_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1102,7 +1101,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1106: checking for $ac_word" >&5 +echo "configure:1105: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_WIN_PYTHON_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1175,7 +1174,7 @@ if test "$BUILD_MATLAB_TOOLBOX" != "n"; then # Extract the first word of "matlab", so it can be a program name with args. set dummy matlab; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1179: checking for $ac_word" >&5 +echo "configure:1178: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MATLAB_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1239,7 +1238,7 @@ export_name=$target # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1243: checking for a BSD compatible install" >&5 +echo "configure:1242: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1302,7 +1301,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1306: checking for $ac_word" >&5 +echo "configure:1305: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1334,7 +1333,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1338: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:1337: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1345,12 +1344,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 1349 "configure" +#line 1348 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:1354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1376,12 +1375,12 @@ if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1380: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1379: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:1385: checking whether we are using GNU C++" >&5 +echo "configure:1384: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1390,7 +1389,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -1409,7 +1408,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:1413: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:1412: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1443,7 +1442,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1447: checking for $ac_word" >&5 +echo "configure:1446: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1473,7 +1472,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1477: checking for $ac_word" >&5 +echo "configure:1476: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1524,7 +1523,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1528: checking for $ac_word" >&5 +echo "configure:1527: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1556,7 +1555,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1560: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1559: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1567,12 +1566,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1571 "configure" +#line 1570 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1598,12 +1597,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1602: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1601: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1607: checking whether we are using GNU C" >&5 +echo "configure:1606: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1612,7 +1611,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1631,7 +1630,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1635: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1634: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1664,7 +1663,7 @@ fi echo $ac_n "checking for ability to precompile headers""... $ac_c" 1>&6 -echo "configure:1668: checking for ability to precompile headers" >&5 +echo "configure:1667: checking for ability to precompile headers" >&5 if test -n "$GCC"; then msg=`rm -f *h.gch; $CXX testpch.h &> /dev/null` @@ -1676,7 +1675,7 @@ echo "$ac_t""${precompile_headers}" 1>&6 has_sstream=no echo $ac_n "checking for sstream""... $ac_c" 1>&6 -echo "configure:1680: checking for sstream" >&5 +echo "configure:1679: checking for sstream" >&5 cat >> testsstream.cpp << EOF #include main() {} @@ -1704,7 +1703,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1708: checking for $ac_word" >&5 +echo "configure:1707: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1737,7 +1736,7 @@ done fi echo $ac_n "checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1741: checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works" >&5 +echo "configure:1740: checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works" >&5 ac_ext=f ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' @@ -1750,7 +1749,7 @@ cat > conftest.$ac_ext << EOF end EOF -if { (eval echo configure:1754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_f77_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1776,12 +1775,12 @@ if test $ac_cv_prog_f77_works = no; then { echo "configure: error: installation or configuration problem: Fortran 77 compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1780: checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1779: checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_f77_cross" 1>&6 cross_compiling=$ac_cv_prog_f77_cross echo $ac_n "checking whether we are using GNU Fortran 77""... $ac_c" 1>&6 -echo "configure:1785: checking whether we are using GNU Fortran 77" >&5 +echo "configure:1784: checking whether we are using GNU Fortran 77" >&5 if eval "test \"`echo '$''{'ac_cv_prog_g77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1790,7 +1789,7 @@ else yes #endif EOF -if { ac_try='$F77 -E conftest.fpp'; { (eval echo configure:1794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='$F77 -E conftest.fpp'; { (eval echo configure:1793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_g77=yes else ac_cv_prog_g77=no @@ -1805,7 +1804,7 @@ if test $ac_cv_prog_g77 = yes; then ac_save_FFLAGS="$FFLAGS" FFLAGS= echo $ac_n "checking whether $F77 accepts -g""... $ac_c" 1>&6 -echo "configure:1809: checking whether $F77 accepts -g" >&5 +echo "configure:1808: checking whether $F77 accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_f77_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1843,7 +1842,7 @@ if test -n "$G77"; then fi echo $ac_n "checking for Fortran 77 libraries""... $ac_c" 1>&6 -echo "configure:1847: checking for Fortran 77 libraries" >&5 +echo "configure:1846: checking for Fortran 77 libraries" >&5 if eval "test \"`echo '$''{'ac_cv_flibs'+set}'`\" = set"; then @@ -2003,13 +2002,13 @@ esac echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:2007: checking for object suffix" >&5 +echo "configure:2006: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:2013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -2027,12 +2026,12 @@ OBJEXT=$ac_cv_objext ac_objext=$ac_cv_objext echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:2031: checking for Cygwin environment" >&5 +echo "configure:2030: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -2060,19 +2059,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:2064: checking for mingw32 environment" >&5 +echo "configure:2063: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -2091,7 +2090,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:2095: checking for executable suffix" >&5 +echo "configure:2094: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2101,7 +2100,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:2105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:2104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; @@ -2191,7 +2190,7 @@ fi # SO is the extension of shared libraries `(including the dot!) # -- usually .so, .sl on HP-UX, .dll on Cygwin echo $ac_n "checking SO""... $ac_c" 1>&6 -echo "configure:2195: checking SO" >&5 +echo "configure:2194: checking SO" >&5 if test -z "$SO" then case $ac_sys_system in diff --git a/config/configure.in b/config/configure.in index d18e87074..8c68c0685 100755 --- a/config/configure.in +++ b/config/configure.in @@ -330,6 +330,10 @@ AC_SUBST(build_blas) LOCAL_LIBS= +if test -n "$INCL_USER_CODE" +then LOCAL_LIBS=$LOCAL_LIBS' '-luser +fi + if test -n "$NEED_ONED" then LOCAL_LIBS=$LOCAL_LIBS' '-loneD fi @@ -342,13 +346,8 @@ if test -n "$NEED_TRANSPORT" then LOCAL_LIBS=$LOCAL_LIBS' '-ltransport fi -#if test -n "$NEED_CKREADER" -#then LOCAL_LIBS=$LOCAL_LIBS' '-lconverters -#fi - LOCAL_LIBS=$LOCAL_LIBS' '-lcantera - if test -n "$NEED_RECIPES" then LOCAL_LIBS=$LOCAL_LIBS' '-lrecipes fi diff --git a/data/inputs/liquidvapor.cti b/data/inputs/liquidvapor.cti index 0ab15984d..d93ceb7ce 100644 --- a/data/inputs/liquidvapor.cti +++ b/data/inputs/liquidvapor.cti @@ -44,17 +44,18 @@ liquid_vapor(name = "oxygen", #------------------------------------------------------------------ # Note that these species definitions are used ONLY to set the -# reference state values for the entropy and enthalpy, and to define the -# elemental composition. They are not used to compute properties. +# reference state values for the entropy and enthalpy at 298.15 K, +# and to define the elemental composition. They are not used to +# compute properties. #------------------------------------------------------------------ species(name = "H2O", atoms = " H:2 O:1 ", thermo = ( - NASA( [ 200.00, 1000.00], [ 4.198640560E+00, -2.036434100E-03, + NASA( [ 273.16, 1000.00], [ 4.198640560E+00, -2.036434100E-03, 6.520402110E-06, -5.487970620E-09, 1.771978170E-12, -3.029372670E+04, -8.490322080E-01] ), - NASA( [ 1000.00, 3500.00], [ 3.033992490E+00, 2.176918040E-03, + NASA( [ 1000.00, 1600.00], [ 3.033992490E+00, 2.176918040E-03, -1.640725180E-07, -9.704198700E-11, 1.682009920E-14, -3.000429710E+04, 4.966770100E+00] ) ) @@ -63,10 +64,10 @@ species(name = "H2O", species(name = "N2", atoms = " N:2 ", thermo = ( - NASA( [ 300.00, 1000.00], [ 3.298677000E+00, 1.408240400E-03, + NASA( [ 63.15, 1000.00], [ 3.298677000E+00, 1.408240400E-03, -3.963222000E-06, 5.641515000E-09, -2.444854000E-12, -1.020899900E+03, 3.950372000E+00] ), - NASA( [ 1000.00, 5000.00], [ 2.926640000E+00, 1.487976800E-03, + NASA( [ 1000.00, 2000.00], [ 2.926640000E+00, 1.487976800E-03, -5.684760000E-07, 1.009703800E-10, -6.753351000E-15, -9.227977000E+02, 5.980528000E+00] ) ) @@ -75,10 +76,10 @@ species(name = "N2", species(name = "CH4", atoms = " C:1 H:4 ", thermo = ( - NASA( [ 200.00, 1000.00], [ 5.149876130E+00, -1.367097880E-02, + NASA( [ 90.68, 1000.00], [ 5.149876130E+00, -1.367097880E-02, 4.918005990E-05, -4.847430260E-08, 1.666939560E-11, -1.024664760E+04, -4.641303760E+00] ), - NASA( [ 1000.00, 3500.00], [ 7.485149500E-02, 1.339094670E-02, + NASA( [ 1000.00, 1700.00], [ 7.485149500E-02, 1.339094670E-02, -5.732858090E-06, 1.222925350E-09, -1.018152300E-13, -9.468344590E+03, 1.843731800E+01] ) ) @@ -87,10 +88,10 @@ species(name = "CH4", species(name = "O2", atoms = " O:2 ", thermo = ( - NASA( [ 200.00, 1000.00], [ 3.782456360E+00, -2.996734160E-03, + NASA( [ 54.34, 1000.00], [ 3.782456360E+00, -2.996734160E-03, 9.847302010E-06, -9.681295090E-09, 3.243728370E-12, -1.063943560E+03, 3.657675730E+00] ), - NASA( [ 1000.00, 3500.00], [ 3.282537840E+00, 1.483087540E-03, + NASA( [ 1000.00, 2000.00], [ 3.282537840E+00, 1.483087540E-03, -7.579666690E-07, 2.094705550E-10, -2.167177940E-14, -1.088457720E+03, 5.453231290E+00] ) ) @@ -99,10 +100,10 @@ species(name = "O2", species(name = "H2", atoms = " H:2 ", thermo = ( - NASA( [ 200.00, 1000.00], [ 2.344331120E+00, 7.980520750E-03, + NASA( [ 13.8, 1000.00], [ 2.344331120E+00, 7.980520750E-03, -1.947815100E-05, 2.015720940E-08, -7.376117610E-12, -9.179351730E+02, 6.830102380E-01] ), - NASA( [ 1000.00, 3500.00], [ 3.337279200E+00, -4.940247310E-05, + NASA( [ 1000.00, 5000.00], [ 3.337279200E+00, -4.940247310E-05, 4.994567780E-07, -1.795663940E-10, 2.002553760E-14, -9.501589220E+02, -3.205023310E+00] ) )