Split the TransportParams class into three entities. The base class

of the same name holds core components including the thermo object,
XML nodes, species names and molecular weights.  

A derived class GasTransportParams holds
kinetic-theory-of-gases-related parameters.  

LiquidTransportParams in LiquidTransportParams.h now derives from
TransportParams class. Removed kinetic-theory-of-gases-related
parameters.
This commit is contained in:
John Hewson 2009-09-19 00:25:57 +00:00
parent eaeefd4f47
commit 00c36ac250
2 changed files with 58 additions and 46 deletions

View file

@ -5,27 +5,38 @@
#include "ct_defs.h"
#include "TransportBase.h"
#include "TransportParams.h"
#include "xml.h"
#include "XML_Writer.h"
namespace Cantera {
/**
*
* Holds transport data. Used by TransportFactory.
*
* Holds transport model parameters relevant to transport in
* liquids for which activated jump processes limit transport
* (giving Arrhenius type transport properties).
* Used by TransportFactory.
*/
class LiquidTransportParams {
class LiquidTransportParams :public TransportParams {
public:
LiquidTransportParams() : thermo(0), xml(0) {}
virtual ~LiquidTransportParams();
int nsp;
LiquidTransportParams() {}
~LiquidTransportParams() {}
// phase_t* mix;
thermo_t* thermo;
vector_fp mw;
//section for liquid transport properties
//Arrhenius parameters for transport coefficients
// std::vector<vector_fp> viscParams;
vector_fp visc_A;
vector_fp visc_n;
vector_fp visc_Tact;
vector_fp thermCond_A;
vector_fp thermCond_n;
vector_fp thermCond_Tact;
//Hydrodynamic radius of transported molecule
vector_fp hydroRadius;
//! Coefficients for the limiting conductivity of ions
//! in solution: A_k
@ -47,26 +58,6 @@ namespace Cantera {
vector_fp B_k_cond;
// polynomial fits
std::vector<vector_fp> viscCoeffsVector_;
std::vector<vector_fp> condcoeffs;
std::vector<vector_fp> diffcoeffs ;
std::vector<bool> polar;
//vector_fp alpha;
vector_fp fitlist;
vector_fp eps;
vector_fp sigma;
DenseMatrix reducedMass;
DenseMatrix diam;
DenseMatrix epsilon;
DenseMatrix dipole;
DenseMatrix delta;
doublereal tmax, tmin;
int mode;
XML_Writer* xml;
int log_level;
};
}

View file

@ -3,7 +3,6 @@
#include <vector>
#include "ct_defs.h"
#include "TransportBase.h"
#include "xml.h"
@ -11,10 +10,9 @@
namespace Cantera {
/**
*
* Holds transport data. Used by TransportFactory.
*
/**
* Base class to hold transport model parameters.
* Used by TransportFactory.
*/
class TransportParams {
@ -22,18 +20,43 @@ namespace Cantera {
TransportParams() : thermo(0), xml(0) {}
virtual ~TransportParams();
int nsp;
int nsp_;
// phase_t* mix;
thermo_t* thermo;
vector_fp mw;
// polynomial fits
std::vector<vector_fp> visccoeffs;
std::vector<vector_fp> condcoeffs;
std::vector<vector_fp> diffcoeffs;
vector_fp polytempvec;
//temperature-fit viscosity
std::vector<vector_fp> visccoeffs;
//temperature-fit heat conduction
std::vector<vector_fp> condcoeffs;
//temperature-fit diffusivity
std::vector<vector_fp> diffcoeffs;
vector_fp polytempvec;
//minimum and maximum temperatures for parameter fits
doublereal tmax, tmin;
int mode;
XML_Writer* xml;
int log_level;
};
/**
* Holds transport model parameters relevant to transport in ideal
* gases with a kinetic theory of gases derived transport model.
* Used by TransportFactory.
*/
class GasTransportParams : public TransportParams {
public:
GasTransportParams() {}
~GasTransportParams() {}
std::vector<std::vector<int> > poly;
std::vector<vector_fp > omega22_poly;
std::vector<vector_fp > astar_poly;
@ -53,11 +76,9 @@ namespace Cantera {
DenseMatrix epsilon;
DenseMatrix dipole;
DenseMatrix delta;
doublereal tmax, tmin;
int mode;
XML_Writer* xml;
int log_level;
};
}
#endif
#endif //CT_TRANSPORTPARAMS_H