diff --git a/Cantera/src/transport/AqueousTransport.cpp b/Cantera/src/transport/AqueousTransport.cpp index 085b07391..520f9cad4 100644 --- a/Cantera/src/transport/AqueousTransport.cpp +++ b/Cantera/src/transport/AqueousTransport.cpp @@ -15,7 +15,7 @@ #endif #include "ThermoPhase.h" -#include "LiquidTransport.h" +#include "AqueousTransport.h" #include "utilities.h" #include "TransportParams.h" @@ -437,14 +437,14 @@ namespace Cantera { doublereal pres = m_thermo->pressure(); // Check for changes in the mole fraction vector. - int iStateNew = m_thermo->getIStateMF(); - if (iStateNew == m_iStateMF) { - if (pres == m_press) { - return; - } - } else { - m_iStateMF = iStateNew; - } + //int iStateNew = m_thermo->getIStateMF(); + //if (iStateNew == m_iStateMF) { + // if (pres == m_press) { + // return; + // } + // } else { + // m_iStateMF = iStateNew; + //} m_press = pres; // signal that concentration-dependent quantities will need to @@ -688,7 +688,7 @@ namespace Cantera { } //! invert and solve the system Ax = b. Answer is in m_B - solve(m_A, m_B); + //solve(m_A, m_B); m_flux = m_B; @@ -718,7 +718,7 @@ namespace Cantera { } //! invert and solve the system Ax = b. Answer is in m_B - solve(m_A, m_B); + //solve(m_A, m_B); m_flux = m_B; diff --git a/Cantera/src/transport/LiquidTransport.cpp b/Cantera/src/transport/LiquidTransport.cpp index 07143106e..8bf2ff4ae 100644 --- a/Cantera/src/transport/LiquidTransport.cpp +++ b/Cantera/src/transport/LiquidTransport.cpp @@ -424,14 +424,14 @@ namespace Cantera { doublereal pres = m_thermo->pressure(); // Check for changes in the mole fraction vector. - int iStateNew = m_thermo->getIStateMF(); - if (iStateNew == m_iStateMF) { - if (pres == m_press) { - return; - } - } else { - m_iStateMF = iStateNew; - } + //int iStateNew = m_thermo->getIStateMF(); + //if (iStateNew == m_iStateMF) { + // if (pres == m_press) { +// return; + // } + // } else { + // m_iStateMF = iStateNew; + //} m_press = pres; // signal that concentration-dependent quantities will need to @@ -675,7 +675,7 @@ namespace Cantera { } //! invert and solve the system Ax = b. Answer is in m_B - solve(m_A, m_B); + //solve(m_A, m_B); m_flux = m_B; @@ -705,7 +705,7 @@ namespace Cantera { } //! invert and solve the system Ax = b. Answer is in m_B - solve(m_A, m_B); + //solve(m_A, m_B); m_flux = m_B; diff --git a/Cantera/src/transport/Makefile.in b/Cantera/src/transport/Makefile.in index caf985c79..ed985e530 100644 --- a/Cantera/src/transport/Makefile.in +++ b/Cantera/src/transport/Makefile.in @@ -1,6 +1,6 @@ #/bin/sh ############################################################### -# $Author$ +# # $Date$ # $Revision$ # @@ -15,6 +15,10 @@ INCDIR = ../../../build/include/cantera/kernel INSTALL_TSC = ../../../bin/install_tsc do_ranlib = @DO_RANLIB@ +do_electro = @COMPILE_ELECTROLYTES@ +do_issp = @COMPILE_IDEAL_SOLUTIONS@ + + PURIFY=@PURIFY@ PIC_FLAG=@PIC@ @@ -27,25 +31,40 @@ else endif - CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG) $(DEBUG_FLAG) -# Transport Object Files -OBJS = TransportFactory.o MultiTransport.o MixTransport.o MMCollisionInt.o \ - SolidTransport.o DustyGasTransport.o LiquidTransport.o +# Base Transport Object Files +TRAN_OBJ = TransportFactory.o MultiTransport.o MixTransport.o MMCollisionInt.o \ + SolidTransport.o DustyGasTransport.o TRAN_H = TransportFactory.h MultiTransport.h MixTransport.h \ MMCollisionInt.h SolidTransport.h DustyGasTransport.h \ - TransportBase.h L_matrix.h TransportParams.h LiquidTransport.h + TransportBase.h L_matrix.h TransportParams.h + +ifeq ($(do_electro),1) +do_issp = 1 +ELECTRO_OBJ = AqueousTransport.o +ELECTRO_H = AqueousTransport.h +endif + +ifeq ($(do_issp),1) +ISSP_OBJ = LiquidTransport.o +ISSP_H = LiquidTransport.h LiquidTransportParams.h +endif + + +CATRAN_OBJ = $(TRAN_OBJ) $(ELECTRO_OBJ) $(ISSP_OBJ) + +CATRAN_H = $(TRAN_H) $(ELECTRO_H) $(ISSP_H) CXX_INCLUDES = -I../base -I../thermo -I../numerics @CXX_INCLUDES@ LIB = @buildlib@/libtransport.a -DEPENDS = $(OBJS:.o=.d) +DEPENDS = $(CATRAN_OBJ:.o=.d) all: $(LIB) .depends @(@INSTALL@ -d $(INCDIR)) - @(for lh in $(TRAN_H) ; do \ + @(for lh in $(CATRAN_H) ; do \ $(INSTALL_TSC) "$${lh}" $(INCDIR) ; \ done) %.d: Makefile %.o @@ -54,14 +73,14 @@ all: $(LIB) .depends .cpp.o: $(PURIFY) @CXX@ -c $< $(CXX_FLAGS) $(CXX_INCLUDES) -$(LIB): $(OBJS) $(TRAN_H) - @ARCHIVE@ $(LIB) $(OBJS) > /dev/null +$(LIB): $(CATRAN_OBJ) $(CATRAN_H) + @ARCHIVE@ $(LIB) $(CATRAN_OBJ) > /dev/null ifeq ($(do_ranlib),1) @RANLIB@ $(LIB) endif clean: - @(for lh in $(TRAN_H) ; do \ + @(for lh in $(CATRAN_H) ; do \ th=$(INCDIR)/"$${lh}" ; \ if test -f "$${th}" ; then \ $(RM) "$${th}" ; \ @@ -83,9 +102,8 @@ depends: .depends: $(DEPENDS) cat *.d > .depends -$(OBJS): Makefile +$(CATRAN_OBJ): Makefile -$(OBJS): Makefile TAGS: etags *.h *.cpp diff --git a/Cantera/src/transport/TransportFactory.cpp b/Cantera/src/transport/TransportFactory.cpp index b31ee702c..35411f696 100755 --- a/Cantera/src/transport/TransportFactory.cpp +++ b/Cantera/src/transport/TransportFactory.cpp @@ -337,14 +337,18 @@ namespace Cantera { dtr = (DustyGasTransport*)tr; dtr->initialize(phase, gastr); break; +#ifdef WITH_IDEAL_SOLUTIONS case cLiquidTransport: tr = new LiquidTransport; tr->setThermo(*phase); break; +#endif +#ifdef WITH_ELECTROLYTES case cAqueousTransport: tr = new AqueousTransport; tr->setThermo(*phase); break; +#endif default: throw CanteraError("newTransport","unknown transport model"); }