Added forward declarations references to
class LiquidTransportParams; Changed the init(TransportParams& tr) method to initLiquid( LiquidTransportParams& tr ) Removed a number of gas-related transport parameters from the init/initLiquid() method including m_poly, m_diam, m_eps, m_alpha In AqueousTransport.cpp there was a method to return a struct to a GasTransportData. This now returns LiquidTransportData struct, but is not yet working. In LiquidTransport.cpp removed all references to m_polytempvec, a vector of 5 entries of the form - m_polytempvec[0] = 1.0; - m_polytempvec[1] = m_logt; - m_polytempvec[2] = m_logt*m_logt; - m_polytempvec[3] = m_logt*m_logt*m_logt; - m_polytempvec[4] = m_logt*m_logt*m_logt*m_logt; We might want these back soon. This allowed up to comment out the code in the methods that evaluate the temperature dependence of the viscosity, thermal conductivity and diffusivity using polynomials in these variables. --This line, and those below, will be ignored-- M AqueousTransport.h M LiquidTransport.h M AqueousTransport.cpp M LiquidTransport.cpp
This commit is contained in:
parent
53e1c8fd78
commit
eaeefd4f47
4 changed files with 29 additions and 39 deletions
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include "utilities.h"
|
||||
#include "TransportParams.h"
|
||||
#include "LiquidTransportParams.h"
|
||||
#include "TransportFactory.h"
|
||||
|
||||
#include "ctlapack.h"
|
||||
|
|
@ -72,7 +73,7 @@ namespace Cantera {
|
|||
/*
|
||||
* This is where we dimension everything.
|
||||
*/
|
||||
bool AqueousTransport::init(TransportParams& tr) {
|
||||
bool AqueousTransport::initLiquid( LiquidTransportParams& tr ) {
|
||||
|
||||
// constant substance attributes
|
||||
m_thermo = tr.thermo;
|
||||
|
|
@ -86,15 +87,11 @@ namespace Cantera {
|
|||
m_thermo->molecularWeights().end(), m_mw.begin());
|
||||
|
||||
// copy polynomials and parameters into local storage
|
||||
m_poly = tr.poly;
|
||||
m_visccoeffs = tr.visccoeffs;
|
||||
m_condcoeffs = tr.condcoeffs;
|
||||
m_diffcoeffs = tr.diffcoeffs;
|
||||
|
||||
m_mode = tr.mode;
|
||||
m_diam = tr.diam;
|
||||
m_eps = tr.eps;
|
||||
m_alpha = tr.alpha;
|
||||
|
||||
m_phi.resize(m_nsp, m_nsp, 0.0);
|
||||
|
||||
|
|
@ -585,17 +582,15 @@ namespace Cantera {
|
|||
* This function returns a Transport data object for a given species.
|
||||
*
|
||||
*/
|
||||
struct GasTransportData AqueousTransport::
|
||||
getGasTransportData(int kSpecies)
|
||||
struct LiquidTransportData AqueousTransport::
|
||||
getLiquidTransportData(int kSpecies)
|
||||
{
|
||||
struct GasTransportData td;
|
||||
struct LiquidTransportData td;
|
||||
td.speciesName = m_thermo->speciesName(kSpecies);
|
||||
|
||||
|
||||
td.wellDepth = m_eps[kSpecies] / Boltzmann;
|
||||
td.diameter = m_diam(kSpecies, kSpecies) * 1.0E10;
|
||||
td.polarizability = m_alpha[kSpecies] * 1.0E30;
|
||||
|
||||
/* NEEDS WORK
|
||||
td.hydroradius = ???;
|
||||
*/
|
||||
|
||||
return td;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,13 +11,15 @@
|
|||
|
||||
|
||||
#ifndef CT_AQUEOUSTRAN_H
|
||||
#define CT_AQYEOUSTRAN_H
|
||||
#define CT_AQUEOUSTRAN_H
|
||||
|
||||
using namespace std;
|
||||
|
||||
// Cantera includes
|
||||
#include "TransportBase.h"
|
||||
#include "DenseMatrix.h"
|
||||
#include "TransportParams.h"
|
||||
#include "LiquidTransportParams.h"
|
||||
|
||||
|
||||
#include <vector>
|
||||
|
|
@ -29,7 +31,7 @@ using namespace std;
|
|||
namespace Cantera {
|
||||
|
||||
|
||||
class TransportParams;
|
||||
class LiquidTransportParams;
|
||||
|
||||
|
||||
//! Class AqueousTransport implements mixture-averaged transport
|
||||
|
|
@ -275,7 +277,7 @@ namespace Cantera {
|
|||
* @param tr Transport parameters for all of the species
|
||||
* in the phase.
|
||||
*/
|
||||
virtual bool init(TransportParams& tr);
|
||||
virtual bool initLiquid( LiquidTransportParams& tr );
|
||||
|
||||
friend class TransportFactory;
|
||||
|
||||
|
|
@ -286,7 +288,7 @@ namespace Cantera {
|
|||
*
|
||||
* @param k Species number to obtain the properties about.
|
||||
*/
|
||||
struct GasTransportData getGasTransportData(int k);
|
||||
struct LiquidTransportData getLiquidTransportData(int k);
|
||||
|
||||
|
||||
//! Solve the stefan_maxell equations for the diffusive fluxes.
|
||||
|
|
|
|||
|
|
@ -174,13 +174,11 @@ namespace Cantera {
|
|||
m_thermo->molecularWeights().end(), m_mw.begin());
|
||||
|
||||
// copy polynomials and parameters into local storage
|
||||
viscCoeffsVector_ = tr.viscCoeffsVector_;
|
||||
viscCoeffsVector_ = tr.visccoeffs;
|
||||
m_condcoeffs = tr.condcoeffs;
|
||||
//m_diffcoeffs = tr.diffcoeffs;
|
||||
|
||||
m_mode = tr.mode;
|
||||
m_diam = tr.diam;
|
||||
m_eps = tr.eps;
|
||||
|
||||
m_phi.resize(m_nsp, m_nsp, 0.0);
|
||||
|
||||
|
|
@ -547,14 +545,6 @@ namespace Cantera {
|
|||
m_t32 = m_temp * m_sqrt_t;
|
||||
m_sqrt_kbt = sqrt(Boltzmann*m_temp);
|
||||
|
||||
// compute powers of log(T)
|
||||
// -> may move this
|
||||
m_polytempvec[0] = 1.0;
|
||||
m_polytempvec[1] = m_logt;
|
||||
m_polytempvec[2] = m_logt*m_logt;
|
||||
m_polytempvec[3] = m_logt*m_logt*m_logt;
|
||||
m_polytempvec[4] = m_logt*m_logt*m_logt*m_logt;
|
||||
|
||||
// temperature has changed so temp flags are flipped
|
||||
m_visc_temp_ok = false;
|
||||
m_diff_temp_ok = false;
|
||||
|
|
@ -690,17 +680,19 @@ namespace Cantera {
|
|||
void LiquidTransport::updateCond_temp() {
|
||||
|
||||
int k;
|
||||
/*
|
||||
if (m_mode == CK_Mode) {
|
||||
for (k = 0; k < m_nsp; k++) {
|
||||
m_cond[k] = exp(dot4(m_polytempvec, m_condcoeffs[k]));
|
||||
m_cond[k] = exp(m_condcoeffs[k]);
|
||||
}
|
||||
} else {
|
||||
for (k = 0; k < m_nsp; k++) {
|
||||
m_cond[k] = m_sqrt_t * dot5(m_polytempvec, m_condcoeffs[k]);
|
||||
m_cond[k] = m_sqrt_t * m_condcoeffs[k];
|
||||
}
|
||||
}
|
||||
m_cond_temp_ok = true;
|
||||
m_cond_mix_ok = false;
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -713,10 +705,11 @@ namespace Cantera {
|
|||
// evaluate binary diffusion coefficients at unit pressure
|
||||
int i,j;
|
||||
int ic = 0;
|
||||
/*
|
||||
if (m_mode == CK_Mode) {
|
||||
for (i = 0; i < m_nsp; i++) {
|
||||
for (j = i; j < m_nsp; j++) {
|
||||
m_bdiff(i,j) = exp(dot4(m_polytempvec, m_diffcoeffs[ic]));
|
||||
m_bdiff(i,j) = exp(m_diffcoeffs[ic]);
|
||||
m_bdiff(j,i) = m_bdiff(i,j);
|
||||
ic++;
|
||||
}
|
||||
|
|
@ -725,8 +718,7 @@ namespace Cantera {
|
|||
else {
|
||||
for (i = 0; i < m_nsp; i++) {
|
||||
for (j = i; j < m_nsp; j++) {
|
||||
m_bdiff(i,j) = m_temp * m_sqrt_t*dot5(m_polytempvec,
|
||||
m_diffcoeffs[ic]);
|
||||
m_bdiff(i,j) = m_temp * m_sqrt_t*m_diffcoeffs[ic];
|
||||
m_bdiff(j,i) = m_bdiff(i,j);
|
||||
ic++;
|
||||
}
|
||||
|
|
@ -735,6 +727,7 @@ namespace Cantera {
|
|||
|
||||
m_diff_temp_ok = true;
|
||||
m_diff_mix_ok = false;
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -756,16 +749,17 @@ namespace Cantera {
|
|||
int k;
|
||||
doublereal vratiokj, wratiojk, factor1;
|
||||
|
||||
/*
|
||||
if (m_mode == CK_Mode) {
|
||||
for (k = 0; k < m_nsp; k++) {
|
||||
viscSpecies_[k] = exp(dot4(m_polytempvec, viscCoeffsVector_[k]));
|
||||
viscSpecies_[k] = exp(viscCoeffsVector_[k]);
|
||||
m_sqvisc[k] = sqrt(viscSpecies_[k]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (k = 0; k < m_nsp; k++) {
|
||||
// the polynomial fit is done for sqrt(visc/sqrt(T))
|
||||
m_sqvisc[k] = m_t14*dot5(m_polytempvec, viscCoeffsVector_[k]);
|
||||
m_sqvisc[k] = m_t14 * viscCoeffsVector_[k];
|
||||
viscSpecies_[k] = (m_sqvisc[k]*m_sqvisc[k]);
|
||||
}
|
||||
}
|
||||
|
|
@ -788,6 +782,7 @@ namespace Cantera {
|
|||
|
||||
m_visc_temp_ok = true;
|
||||
m_visc_mix_ok = false;
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ using namespace std;
|
|||
// Cantera includes
|
||||
#include "TransportBase.h"
|
||||
#include "DenseMatrix.h"
|
||||
#include "TransportParams.h"
|
||||
#include "LiquidTransportParams.h"
|
||||
|
||||
namespace Cantera {
|
||||
|
|
@ -39,7 +40,7 @@ namespace Cantera {
|
|||
|
||||
|
||||
|
||||
class TransportParams;
|
||||
class LiquidTransportParams;
|
||||
|
||||
|
||||
//! Class LiquidTransport implements mixture-averaged transport
|
||||
|
|
@ -507,9 +508,6 @@ namespace Cantera {
|
|||
*/
|
||||
vector_fp m_cond;
|
||||
|
||||
//! Polynomials of the log of the temperature
|
||||
vector_fp m_polytempvec;
|
||||
|
||||
//! State of the mole fraction vector.
|
||||
int m_iStateMF;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue