From c48da0d14f9d8f531ffecb9c6078451bb2dc88b4 Mon Sep 17 00:00:00 2001 From: Dave Goodwin Date: Sun, 23 Apr 2006 06:02:35 +0000 Subject: [PATCH] *** empty log message *** --- Cantera/python/Cantera/SurfacePhase.py | 6 +++- Cantera/python/Cantera/importFromFile.py | 9 +++++ Cantera/src/EdgeKinetics.cpp | 9 ++--- Cantera/src/EdgeKinetics.h | 8 +---- Cantera/src/Kinetics.cpp | 2 ++ Cantera/src/Kinetics.h | 2 +- Cantera/src/State.cpp | 2 ++ Cantera/src/State.h | 43 ++++++++++++++---------- Cantera/src/oneD/Makefile.in | 5 ++- Cantera/src/transport/Makefile.in | 5 ++- ext/f2c_libs/arith.h | 5 +-- 11 files changed, 54 insertions(+), 42 deletions(-) diff --git a/Cantera/python/Cantera/SurfacePhase.py b/Cantera/python/Cantera/SurfacePhase.py index 250bd522a..33310131b 100644 --- a/Cantera/python/Cantera/SurfacePhase.py +++ b/Cantera/python/Cantera/SurfacePhase.py @@ -42,4 +42,8 @@ class SurfacePhase(ThermoPhase): return _cantera.surf_getconcentrations(self._phase_id) - +class EdgePhase(SurfacePhase): + """A one-dimensonal edge.""" + + def __init__(self, xml_phase=None, index=-1): + SurfacePhase.__init__(self, xml_phase=xml_phase, index=index) diff --git a/Cantera/python/Cantera/importFromFile.py b/Cantera/python/Cantera/importFromFile.py index 8459fff05..6b8202b57 100755 --- a/Cantera/python/Cantera/importFromFile.py +++ b/Cantera/python/Cantera/importFromFile.py @@ -5,6 +5,7 @@ application programs.""" import solution import Interface +import Edge import XML __revision__ = "$Id$" @@ -52,4 +53,12 @@ def importInterface(file, name = '', phases = []): else: src = file return Interface.Interface(src = src, phases = phases) + + +def importEdge(file, name = '', surfaces = []): + if name: + src = file+'#'+name + else: + src = file + return Edge.Edge(src = src, surfaces = surfaces) diff --git a/Cantera/src/EdgeKinetics.cpp b/Cantera/src/EdgeKinetics.cpp index a2ca8a540..e420d015b 100644 --- a/Cantera/src/EdgeKinetics.cpp +++ b/Cantera/src/EdgeKinetics.cpp @@ -29,15 +29,10 @@ namespace Cantera { /** * Construct an empty EdgeKinetics reaction mechanism. - * @param thermo This is an optional parameter that may be - * used to initialize the inherited Kinetics class with - * one ThermoPhase class object -> in other words it's - * useful for initialization of homogeneous kinetics - * mechanisms. */ EdgeKinetics:: - EdgeKinetics(thermo_t* thermo) : - Kinetics(thermo), + EdgeKinetics() : + Kinetics(), m_kk(0), m_redo_rates(false), m_nirrev(0), diff --git a/Cantera/src/EdgeKinetics.h b/Cantera/src/EdgeKinetics.h index 57c4734f0..213a82d13 100644 --- a/Cantera/src/EdgeKinetics.h +++ b/Cantera/src/EdgeKinetics.h @@ -63,14 +63,8 @@ namespace Cantera { /** * Constructor * - * @param thermo The optional parameter may be used to initialize - * the object with one ThermoPhase object. - * HKM Note -> Since the interface kinetics - * object will probably require multiple thermophase - * objects, this is probably not a good idea - * to have this parameter. */ - EdgeKinetics(thermo_t* thermo = 0); + EdgeKinetics(); /// Destructor. virtual ~EdgeKinetics(); diff --git a/Cantera/src/Kinetics.cpp b/Cantera/src/Kinetics.cpp index 3450bf4d0..da5df7228 100644 --- a/Cantera/src/Kinetics.cpp +++ b/Cantera/src/Kinetics.cpp @@ -26,6 +26,7 @@ namespace Cantera { m_index(-1), m_surfphase(-1), m_rxnphase(-1), m_mindim(4) {} + /* Kinetics::Kinetics(thermo_t* thermo) : m_ii(0), m_index(-1), @@ -38,6 +39,7 @@ namespace Cantera { deprecatedMethod("Kinetics","Kinetics(thermo_t*)","Kinetics()"); removeAtVersion("Kinetics(thermo_t*)","1.6.0"); } + */ Kinetics::~Kinetics(){} diff --git a/Cantera/src/Kinetics.h b/Cantera/src/Kinetics.h index 7be2c4209..d51f39c5a 100755 --- a/Cantera/src/Kinetics.h +++ b/Cantera/src/Kinetics.h @@ -137,7 +137,7 @@ namespace Cantera { /// This constructor initializes with a starting phase. /// @deprecated - Kinetics(thermo_t* thermo); + // Kinetics(thermo_t* thermo); /// Destructor. virtual ~Kinetics(); diff --git a/Cantera/src/State.cpp b/Cantera/src/State.cpp index 3fb54a01b..748147f57 100644 --- a/Cantera/src/State.cpp +++ b/Cantera/src/State.cpp @@ -19,9 +19,11 @@ #include "ctexceptions.h" #include "stringUtils.h" #include "State.h" + #ifdef DARWIN #include #endif + namespace Cantera { State::State() : m_kk(0), m_temp(0.0), m_dens(0.001), m_mmw(0.0) {} diff --git a/Cantera/src/State.h b/Cantera/src/State.h index 680ae626b..838b88a3e 100755 --- a/Cantera/src/State.h +++ b/Cantera/src/State.h @@ -2,7 +2,7 @@ * * @file State.h * - * This file implements class State. + * This is the header file for class State. */ /* @@ -25,7 +25,7 @@ namespace Cantera { /** * Manages the independent variables of temperature, mass density, - * and mass/mole species fraction that define the thermodynamic + * and species mass/mole fraction that define the thermodynamic * state. Class State stores just enough information about a * multicomponent solution to specify its intensive thermodynamic * state. It stores values for the temperature, mass density, and @@ -70,6 +70,7 @@ namespace Cantera { /// @name Species Information + /// /// The only thing class State knows about the species is their /// molecular weights. //@{ @@ -83,7 +84,6 @@ namespace Cantera { /// @name Composition //@{ - /** * Get the species mole fractions. * @param x On return, x contains the mole fractions. Must have a @@ -93,7 +93,9 @@ namespace Cantera { /// The mole fraction of species k. If k is ouside the valid - /// range, an exception will be thrown. + /// range, an exception will be thrown. Note that it is + /// somewhat more efficent to call getMoleFractions if the + /// mole fractions of all species are desired. doublereal moleFraction(int k) const; /** @@ -118,12 +120,14 @@ namespace Cantera { * Get the species mass fractions. * @param y On return, y * contains the mass fractions. Array \a y must have a length - * greater than or equal to the number of species. + * greater than or equal to the number of species. */ void getMassFractions(doublereal* y) const; /// Mass fraction of species k. If k is outside the valid - /// range, an exception will be thrown. + /// range, an exception will be thrown. Note that it is + /// somewhat more efficent to call getMassFractions if the + /// mass fractions of all species are desired. doublereal massFraction(int k) const; /** @@ -137,15 +141,18 @@ namespace Cantera { /** * Set the mass fractions to the specified values without - * normalizing. + * normalizing. This is useful when the normalization + * condition is being handled by some other means, for example + * by a constraint equation as part of a larger set of + * equations. */ void setMassFractions_NoNorm(const doublereal* y); /** - * Get the species concentrations (kmol/m^3). - * @param c On return, \a c contains the concentrations. - * Array \a c must have a length greater than or equal to - * the number of species. + * Get the species concentrations (kmol/m^3). @param c On + * return, \a c contains the concentrations for all species. + * Array \a c must have a length greater than or equal to the + * number of species. */ void getConcentrations(doublereal* c) const; @@ -163,16 +170,17 @@ namespace Cantera { void setConcentrations(const doublereal* c); /** - * Returns a pointer to the start of the massFraction array + * Returns a read-only pointer to the start of the + * massFraction array */ const doublereal* massFractions() const { return m_y.begin(); } /** - * Returns a pointer to the start of the moleFraction/MW array. - * This array is the array of mole fractions, each divided by - * the mean molecular weight. + * Returns a read-only pointer to the start of the + * moleFraction/MW array. This array is the array of mole + * fractions, each divided by the mean molecular weight. */ - const doublereal* moleFractdivMMW() const { return m_ym.begin();} + const doublereal* moleFractdivMMW() const { return m_ym.begin();} //@} @@ -279,7 +287,7 @@ namespace Cantera { doublereal m_temp; /** - * Density -> this is an independent variable except in + * Density. This is an independent variable except in * the incompressible degenerate case. Thus, * the pressure is determined from this variable * not the other way round. @@ -291,7 +299,6 @@ namespace Cantera { * m_mmw is the mean molecular weight of the mixture * (kg kmol-1) */ - doublereal m_mmw; /** diff --git a/Cantera/src/oneD/Makefile.in b/Cantera/src/oneD/Makefile.in index 130ac6128..d31dd09cf 100644 --- a/Cantera/src/oneD/Makefile.in +++ b/Cantera/src/oneD/Makefile.in @@ -18,9 +18,8 @@ CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) CXX_INCLUDES = -I.. @CXX_INCLUDES@ # stirred reactors -OBJS = oneD_files.o -#MultiJac.o MultiNewton.o newton_utils.o OneDim.o\ -# StFlow.o boundaries1D.o refine.o Sim1D.o +OBJS = MultiJac.o MultiNewton.o newton_utils.o OneDim.o\ + StFlow.o boundaries1D.o refine.o Sim1D.o ONED_H = Inlet1D.h MultiJac.h Sim1D.h StFlow.h \ Surf1D.h Domain1D.h MultiNewton.h OneDim.h \ Resid1D.h Solid1D.h refine.h diff --git a/Cantera/src/transport/Makefile.in b/Cantera/src/transport/Makefile.in index 802fce2d5..b8a2e275d 100644 --- a/Cantera/src/transport/Makefile.in +++ b/Cantera/src/transport/Makefile.in @@ -18,9 +18,8 @@ do_ranlib = @DO_RANLIB@ CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) # Transport Object Files -OBJS = transport_files.o -#TransportFactory.o MultiTransport.o MixTransport.o MMCollisionInt.o \ -# SolidTransport.o DustyGasTransport.o +OBJS = 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 FtnTransport.h TransportParams.h diff --git a/ext/f2c_libs/arith.h b/ext/f2c_libs/arith.h index 995e5b254..508eb414f 100644 --- a/ext/f2c_libs/arith.h +++ b/ext/f2c_libs/arith.h @@ -1,3 +1,4 @@ -#define IEEE_8087 -#define Arith_Kind_ASL 1 +#define IEEE_MC68k +#define Arith_Kind_ASL 2 #define Double_Align +#define NANCHECK