Doxygen update - Still lots to do here.
This commit is contained in:
parent
23732968c6
commit
6de5cb2e99
9 changed files with 159 additions and 159 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* @file MixTransport.cpp
|
||||
* Mixture-averaged transport properties for ideal gas mixtures.
|
||||
* @file AqueousTransport.cpp
|
||||
* Transport properties for aqueous systems
|
||||
*/
|
||||
/*
|
||||
* $Revision: 1.4 $
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @file LiquidTransport.h
|
||||
* @file AqueousTransport.h
|
||||
* Header file defining class AqueousTransport
|
||||
*/
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -148,35 +148,11 @@ namespace Cantera {
|
|||
}
|
||||
}
|
||||
|
||||
// void DustyGasTransport::getMolarFluxes(const double* grad_conc,
|
||||
// double grad_P, double* fluxes) {
|
||||
// updateMultiDiffCoeffs();
|
||||
// copy(grad_conc, grad_conc + m_nsp, m_spwork.begin());
|
||||
// multiply(m_multidiff, m_spwork.begin(), fluxes);
|
||||
// m_thermo->getConcentrations(m_spwork.begin());
|
||||
// divide_each(m_spwork.begin(), m_spwork.end(), m_dk.begin());
|
||||
void DustyGasTransport::getMolarFluxes(const doublereal* const state1,
|
||||
const doublereal * const state2,
|
||||
const doublereal delta,
|
||||
doublereal * const fluxes) {
|
||||
|
||||
// // if no permeability has been specified, use result for
|
||||
// // close-packed spheres
|
||||
// double b = 0.0;
|
||||
// if (m_perm < 0.0) {
|
||||
// double p = m_porosity;
|
||||
// double d = m_diam;
|
||||
// double t = m_tortuosity;
|
||||
// b = p*p*p*d*d/(72.0*t*(1.0-p)*(1.0-p));
|
||||
// }
|
||||
// else {
|
||||
// b = m_perm;
|
||||
// }
|
||||
// b *= grad_P / m_gastran->viscosity();
|
||||
// scale(m_spwork.begin(), m_spwork.end(), m_spwork.begin(), b);
|
||||
// increment(m_multidiff, m_spwork.begin(), fluxes);
|
||||
// scale(fluxes, fluxes + m_nsp, fluxes, -1.0);
|
||||
// }
|
||||
|
||||
|
||||
void DustyGasTransport::getMolarFluxes(const doublereal* state1,
|
||||
const doublereal* state2, double delta, double* fluxes) {
|
||||
int k;
|
||||
doublereal conc1, conc2;
|
||||
doublereal* cbar = DATA_PTR(m_spwork);
|
||||
|
|
|
|||
|
|
@ -19,143 +19,152 @@
|
|||
|
||||
namespace Cantera {
|
||||
|
||||
///
|
||||
/// Class DustyGasTransport implements the Dusty Gas model for
|
||||
/// transport in porous media. As implemented here, only species
|
||||
/// transport is handled. The viscosity, thermal conductivity, and
|
||||
/// thermal diffusion coefficients are not implemented.
|
||||
///
|
||||
class DustyGasTransport : public Transport {
|
||||
///
|
||||
/// Class DustyGasTransport implements the Dusty Gas model for
|
||||
/// transport in porous media. As implemented here, only species
|
||||
/// transport is handled. The viscosity, thermal conductivity, and
|
||||
/// thermal diffusion coefficients are not implemented.
|
||||
///
|
||||
class DustyGasTransport : public Transport {
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
/// default constructor
|
||||
DustyGasTransport(thermo_t* thermo=0);
|
||||
/// default constructor
|
||||
DustyGasTransport(thermo_t* thermo=0);
|
||||
|
||||
/// Destructor. Does nothing, since class allocates no memory
|
||||
/// on the heap.
|
||||
virtual ~DustyGasTransport() {}
|
||||
/// Destructor. Does nothing, since class allocates no memory
|
||||
/// on the heap.
|
||||
virtual ~DustyGasTransport() {}
|
||||
|
||||
|
||||
//---------------------------------------------------------
|
||||
// overloaded base class methods
|
||||
//---------------------------------------------------------
|
||||
// overloaded base class methods
|
||||
|
||||
virtual int model() const { return cDustyGasTransport; }
|
||||
virtual int model() const { return cDustyGasTransport; }
|
||||
|
||||
virtual void setParameters(const int type, const int k, const doublereal* const p);
|
||||
virtual void setParameters(const int type, const int k, const doublereal* const p);
|
||||
|
||||
virtual void getMultiDiffCoeffs(const int ld, doublereal* const d);
|
||||
virtual void getMultiDiffCoeffs(const int ld, doublereal* const d);
|
||||
|
||||
virtual void getMolarFluxes(const doublereal* state1,
|
||||
const doublereal* state2, doublereal delta,
|
||||
doublereal* fluxes);
|
||||
//! Get the molar fluxes [kmol/m^2/s], given the thermodynamic
|
||||
//! state at two nearby points.
|
||||
/*!
|
||||
* @param state1 Array of temperature, density, and mass
|
||||
* fractions for state 1.
|
||||
* @param state2 Array of temperature, density, and mass
|
||||
* fractions for state 2.
|
||||
* @param delta Distance from state 1 to state 2 (m).
|
||||
*/
|
||||
virtual void getMolarFluxes(const doublereal * const state1,
|
||||
const doublereal* const state2, const doublereal delta,
|
||||
doublereal* const fluxes);
|
||||
|
||||
//-----------------------------------------------------------
|
||||
// new methods added in this class
|
||||
//-----------------------------------------------------------
|
||||
// new methods added in this class
|
||||
|
||||
/// Set the porosity (dimensionless)
|
||||
void setPorosity(doublereal porosity) {
|
||||
m_porosity = porosity;
|
||||
m_knudsen_ok = false;
|
||||
m_bulk_ok = false;
|
||||
}
|
||||
/// Set the porosity (dimensionless)
|
||||
void setPorosity(doublereal porosity) {
|
||||
m_porosity = porosity;
|
||||
m_knudsen_ok = false;
|
||||
m_bulk_ok = false;
|
||||
}
|
||||
|
||||
/// Set the tortuosity (dimensionless)
|
||||
void setTortuosity(doublereal tort) {
|
||||
m_tortuosity = tort;
|
||||
m_knudsen_ok = false;
|
||||
m_bulk_ok = false;
|
||||
}
|
||||
/// Set the tortuosity (dimensionless)
|
||||
void setTortuosity(doublereal tort) {
|
||||
m_tortuosity = tort;
|
||||
m_knudsen_ok = false;
|
||||
m_bulk_ok = false;
|
||||
}
|
||||
|
||||
/// Set the mean pore radius (m)
|
||||
void setMeanPoreRadius(doublereal rbar) {
|
||||
m_pore_radius = rbar;
|
||||
m_knudsen_ok = false;
|
||||
}
|
||||
/// Set the mean pore radius (m)
|
||||
void setMeanPoreRadius(doublereal rbar) {
|
||||
m_pore_radius = rbar;
|
||||
m_knudsen_ok = false;
|
||||
}
|
||||
|
||||
/// Set the mean particle diameter
|
||||
void setMeanParticleDiameter(doublereal dbar) {
|
||||
m_diam = dbar;
|
||||
}
|
||||
/// Set the mean particle diameter
|
||||
void setMeanParticleDiameter(doublereal dbar) {
|
||||
m_diam = dbar;
|
||||
}
|
||||
|
||||
/// Set the permeability. If not set, the value for
|
||||
/// close-packed spheres will be used by default.
|
||||
void setPermeability(doublereal B) {
|
||||
m_perm = B;
|
||||
}
|
||||
/// Set the permeability. If not set, the value for
|
||||
/// close-packed spheres will be used by default.
|
||||
void setPermeability(doublereal B) {
|
||||
m_perm = B;
|
||||
}
|
||||
|
||||
/// Return a reference to the transport manager used to compute the gas
|
||||
/// binary diffusion coefficients and the visdcosity.
|
||||
Transport& gasTransport() { return *m_gastran; }
|
||||
/// Return a reference to the transport manager used to compute the gas
|
||||
/// binary diffusion coefficients and the visdcosity.
|
||||
Transport& gasTransport() { return *m_gastran; }
|
||||
|
||||
|
||||
friend class TransportFactory;
|
||||
friend class TransportFactory;
|
||||
|
||||
|
||||
protected:
|
||||
protected:
|
||||
|
||||
// called by TransportFactory
|
||||
void initialize(ThermoPhase* phase, Transport* gastr);
|
||||
// called by TransportFactory
|
||||
void initialize(ThermoPhase* phase, Transport* gastr);
|
||||
|
||||
|
||||
private:
|
||||
private:
|
||||
|
||||
void updateTransport_T();
|
||||
void updateTransport_C();
|
||||
void updateTransport_T();
|
||||
void updateTransport_C();
|
||||
|
||||
void updateBinaryDiffCoeffs();
|
||||
void updateMultiDiffCoeffs();
|
||||
void updateKnudsenDiffCoeffs();
|
||||
void eval_H_matrix();
|
||||
void updateBinaryDiffCoeffs();
|
||||
void updateMultiDiffCoeffs();
|
||||
void updateKnudsenDiffCoeffs();
|
||||
void eval_H_matrix();
|
||||
|
||||
|
||||
// gas attributes
|
||||
int m_nsp;
|
||||
doublereal m_tmin, m_tmax;
|
||||
vector_fp m_mw;
|
||||
// gas attributes
|
||||
int m_nsp;
|
||||
doublereal m_tmin, m_tmax;
|
||||
vector_fp m_mw;
|
||||
|
||||
// property values
|
||||
// property values
|
||||
|
||||
/// binary diffusion coefficients
|
||||
DenseMatrix m_d;
|
||||
/// binary diffusion coefficients
|
||||
DenseMatrix m_d;
|
||||
|
||||
/// mole fractions
|
||||
vector_fp m_x;
|
||||
/// mole fractions
|
||||
vector_fp m_x;
|
||||
|
||||
/// Knudsen diffusion coefficients
|
||||
vector_fp m_dk;
|
||||
/// Knudsen diffusion coefficients
|
||||
vector_fp m_dk;
|
||||
|
||||
/// temperature
|
||||
doublereal m_temp;
|
||||
/// temperature
|
||||
doublereal m_temp;
|
||||
|
||||
/// multicomponent diffusion coefficients
|
||||
DenseMatrix m_multidiff;
|
||||
/// multicomponent diffusion coefficients
|
||||
DenseMatrix m_multidiff;
|
||||
|
||||
// work space
|
||||
vector_fp m_spwork;
|
||||
vector_fp m_spwork2;
|
||||
// work space
|
||||
vector_fp m_spwork;
|
||||
vector_fp m_spwork2;
|
||||
|
||||
// concentration gradients
|
||||
//vector_fp m_gradConc;
|
||||
//vector_fp m_conc;
|
||||
// concentration gradients
|
||||
//vector_fp m_gradConc;
|
||||
//vector_fp m_conc;
|
||||
|
||||
doublereal m_gradP; /// pressure gradient
|
||||
doublereal m_gradP; /// pressure gradient
|
||||
|
||||
bool m_knudsen_ok;
|
||||
bool m_bulk_ok;
|
||||
bool m_conc_set;
|
||||
bool m_gradConc_set;
|
||||
bool m_gradP_set;
|
||||
bool m_knudsen_ok;
|
||||
bool m_bulk_ok;
|
||||
bool m_conc_set;
|
||||
bool m_gradConc_set;
|
||||
bool m_gradP_set;
|
||||
|
||||
doublereal m_porosity; /// porosity
|
||||
doublereal m_tortuosity; /// tortuosity
|
||||
doublereal m_pore_radius; /// pore radius (m)
|
||||
doublereal m_diam; /// particle diameter (m)
|
||||
doublereal m_perm; /// permeability
|
||||
doublereal m_porosity; /// porosity
|
||||
doublereal m_tortuosity; /// tortuosity
|
||||
doublereal m_pore_radius; /// pore radius (m)
|
||||
doublereal m_diam; /// particle diameter (m)
|
||||
doublereal m_perm; /// permeability
|
||||
|
||||
Transport* m_gastran; /// pointer to gas transport manager
|
||||
Transport* m_gastran; /// pointer to gas transport manager
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
/**
|
||||
* @file MixTransport.h
|
||||
* Header file defining class MixTransport
|
||||
* Headers for the MixTransport object, which models transport properties
|
||||
* in ideal gas solutions using a mixture averaged approximation
|
||||
* (see \ref tranprops and \link Cantera::MixTransport MixTransport \endlink) .
|
||||
*
|
||||
*/
|
||||
|
||||
/* $Author: hkmoffa $
|
||||
* $Revision: 1.11 $
|
||||
* $Date: 2009/03/27 18:24:39 $
|
||||
*/
|
||||
|
||||
// Copyright 2001 California Institute of Technology
|
||||
|
||||
|
||||
#ifndef CT_MIXTRAN_H
|
||||
#define CT_MIXTRAN_H
|
||||
|
||||
|
||||
// turn off warnings under Windows
|
||||
#ifdef WIN32
|
||||
#pragma warning(disable:4786)
|
||||
|
|
@ -28,8 +28,6 @@
|
|||
#include <numeric>
|
||||
#include <algorithm>
|
||||
|
||||
using namespace std;
|
||||
|
||||
// Cantera includes
|
||||
#include "TransportBase.h"
|
||||
#include "DenseMatrix.h"
|
||||
|
|
@ -152,9 +150,9 @@ namespace Cantera {
|
|||
vector_fp m_mw;
|
||||
|
||||
// polynomial fits
|
||||
vector<vector_fp> m_visccoeffs;
|
||||
vector<vector_fp> m_condcoeffs;
|
||||
vector<vector_fp> m_diffcoeffs;
|
||||
std::vector<vector_fp> m_visccoeffs;
|
||||
std::vector<vector_fp> m_condcoeffs;
|
||||
std::vector<vector_fp> m_diffcoeffs;
|
||||
vector_fp m_polytempvec;
|
||||
|
||||
// property values
|
||||
|
|
@ -165,11 +163,11 @@ namespace Cantera {
|
|||
|
||||
array_fp m_molefracs;
|
||||
|
||||
vector<vector<int> > m_poly;
|
||||
vector<vector_fp > m_astar_poly;
|
||||
vector<vector_fp > m_bstar_poly;
|
||||
vector<vector_fp > m_cstar_poly;
|
||||
vector<vector_fp > m_om22_poly;
|
||||
std::vector<std::vector<int> > m_poly;
|
||||
std::vector<vector_fp > m_astar_poly;
|
||||
std::vector<vector_fp > m_bstar_poly;
|
||||
std::vector<vector_fp > m_cstar_poly;
|
||||
std::vector<vector_fp > m_om22_poly;
|
||||
DenseMatrix m_astar;
|
||||
DenseMatrix m_bstar;
|
||||
DenseMatrix m_cstar;
|
||||
|
|
|
|||
|
|
@ -672,9 +672,10 @@ namespace Cantera {
|
|||
}
|
||||
}
|
||||
|
||||
void MultiTransport::getMolarFluxes(const doublereal* state1,
|
||||
const doublereal* state2, doublereal delta,
|
||||
doublereal* fluxes) {
|
||||
void MultiTransport::getMolarFluxes(const doublereal* const state1,
|
||||
const doublereal * const state2,
|
||||
const doublereal delta,
|
||||
doublereal * const fluxes) {
|
||||
getMassFluxes(state1, state2, delta, fluxes);
|
||||
int k, nsp = m_thermo->nSpecies();
|
||||
for (k = 0; k < nsp; k++) {
|
||||
|
|
|
|||
|
|
@ -139,9 +139,19 @@ namespace Cantera {
|
|||
int ldf,
|
||||
doublereal* fluxes);
|
||||
|
||||
virtual void getMolarFluxes(const doublereal* state1,
|
||||
const doublereal* state2, doublereal delta,
|
||||
doublereal* fluxes);
|
||||
//! Get the molar fluxes [kmol/m^2/s], given the thermodynamic
|
||||
//! state at two nearby points.
|
||||
/*!
|
||||
* @param state1 Array of temperature, density, and mass
|
||||
* fractions for state 1.
|
||||
* @param state2 Array of temperature, density, and mass
|
||||
* fractions for state 2.
|
||||
* @param delta Distance from state 1 to state 2 (m).
|
||||
*/
|
||||
virtual void getMolarFluxes(const doublereal* const state1,
|
||||
const doublereal* const state2,
|
||||
const doublereal delta,
|
||||
doublereal* const fluxes);
|
||||
|
||||
virtual void getMassFluxes(const doublereal* state1,
|
||||
const doublereal* state2, doublereal delta,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
/**
|
||||
* @file TransportBase.h
|
||||
* Headers for the Transport object, which is the virtual base class
|
||||
* for all transport property evaluators and also includes the tranprops group definition
|
||||
* (see \ref tranprops and \link Cantera::Transport Transport \endlink) .
|
||||
*
|
||||
* Provides class Transport.
|
||||
*/
|
||||
|
||||
|
|
@ -301,18 +305,21 @@ namespace Cantera {
|
|||
getSpeciesFluxes( ndim, grad_T, ldx, grad_X, ldf, fluxes );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the molar fluxes [kmol/m^2/s], given the thermodynamic
|
||||
* state at two nearby points.
|
||||
|
||||
//! Get the molar fluxes [kmol/m^2/s], given the thermodynamic
|
||||
//! state at two nearby points.
|
||||
/*!
|
||||
* @param state1 Array of temperature, density, and mass
|
||||
* fractions for state 1.
|
||||
* fractions for state 1.
|
||||
* @param state2 Array of temperature, density, and mass
|
||||
* fractions for state 2.
|
||||
* @param delta Distance from state 1 to state 2 (m).
|
||||
* fractions for state 2.
|
||||
* @param delta Distance from state 1 to state 2 (m).
|
||||
*/
|
||||
virtual void getMolarFluxes(const doublereal* state1,
|
||||
const doublereal* state2, doublereal delta,
|
||||
doublereal* fluxes) { err("getMolarFluxes"); }
|
||||
virtual void getMolarFluxes(const doublereal * const state1,
|
||||
const doublereal * const state2, const doublereal delta,
|
||||
doublereal * const fluxes) {
|
||||
err("getMolarFluxes");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the mass fluxes [kg/m^2/s], given the thermodynamic
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
/**
|
||||
*
|
||||
* @file LiquidTransport.h
|
||||
* @file WaterTransport.h
|
||||
* Header file defining class LiquidTransport
|
||||
*/
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue