Fixed errors in the formulation of the base class. This

left unsatisfied externals in applications.
This commit is contained in:
Harry Moffat 2010-01-16 18:09:44 +00:00
parent 7e39fb0ad0
commit 8c9a3bdf4b
4 changed files with 61 additions and 34 deletions

View file

@ -616,8 +616,8 @@ namespace Cantera {
}
//! Compute the electric current density in A/m^2
/**
// Compute the electric current density in A/m^2
/*
* The electric current is computed first by computing the
* species diffusive fluxes using the Stefan Maxwell solution
* and then the current, \f$ \vec{i} \f$ by summing over
@ -649,7 +649,7 @@ namespace Cantera {
set_Grad_X(grad_X);
set_Grad_V(grad_V);
doublereal *fluxes = new doublereal( m_nsp * m_nDim );
doublereal *fluxes = new doublereal(m_nsp * m_nDim);
getSpeciesFluxesExt(ldf, fluxes);

View file

@ -337,7 +337,7 @@ namespace Cantera {
//! Compute the mixture electrical conductivity from
//! the Stefan-Maxwell equation.
/**
/*!
* To compute the mixture electrical conductance, the Stefan
* Maxwell equation is solved for zero species gradients and
* for unit potential gradient, \f$ \nabla V \f$.
@ -355,10 +355,10 @@ namespace Cantera {
* \f]
*
*/
doublereal getElectricConduct( );
virtual doublereal getElectricConduct();
//! Compute the electric current density in A/m^2
/**
/*!
* The electric current is computed first by computing the
* species diffusive fluxes using the Stefan Maxwell solution
* and then the current, \f$ \vec{i} \f$ by summing over
@ -378,14 +378,13 @@ namespace Cantera {
* @param grad_V The electrostatic potential gradient.
* @param current The electric current in A/m^2.
*/
void getElectricCurrent(int ndim,
const doublereal* grad_T,
int ldx,
const doublereal* grad_X,
int ldf,
const doublereal* grad_V,
doublereal* current) ;
virtual void getElectricCurrent(int ndim,
const doublereal* grad_T,
int ldx,
const doublereal* grad_X,
int ldf,
const doublereal* grad_V,
doublereal* current);
//! Get the species diffusive velocities wrt to

View file

@ -368,26 +368,54 @@ namespace Cantera {
//@}
//! Compute the mixture electrical conductivity
doublereal getElectricConduct( );
//! Compute the electric current
//! Compute the mixture electrical conductivity (S m-1) at the current
//! conditions of the phase (Siemens m-1)
/*!
* @param ndim The number of spatial dimensions (1, 2, or 3).
* @param grad_T The temperature gradient (ignored in this model).
* @param ldx Leading dimension of the grad_X array.
* @param grad_X The gradient of the mole fraction
* @param ldf Leading dimension of the grad_V and current vectors.
* @param grad_V The electrostatic potential gradient.
* @param current The electric current in A/m^2.
* The electrical conductivity, \f$ \sigma \f$, relates the electric
* current density, J, to the electric field, E.
*
* \f[
* \vec{J} = \sigma \vec{E}
* \f]
*
* We assume here that the mixture electrical conductivity is an
* isotropic quantity, at this stage. Tensors may be included at a
* later time.
*
* The conductivity is the reciprocal of the resistivity.
*
* The units are Siemens m-1, where 1 S = 1 A / volt = 1 s^3 A^2 /kg /m^2
*/
void getElectricCurrent(int ndim,
const doublereal* grad_T,
int ldx,
const doublereal* grad_X,
int ldf,
const doublereal* grad_V,
doublereal* current) ;
virtual doublereal getElectricConductivity()
{
err("getElectricConductivity"); return 0.0;
}
//! Compute the electric current density in A/m^2
/*!
* Calculates the electric current density as a vector, given
* the gradients of the field variables.
*
* @param ndim The number of spatial dimensions (1, 2, or 3).
* @param grad_T The temperature gradient (ignored in this model).
* @param ldx Leading dimension of the grad_X array.
* @param grad_X The gradient of the mole fraction
* @param ldf Leading dimension of the grad_V and current vectors.
* @param grad_V The electrostatic potential gradient.
* @param current The electric current in A/m^2. this is a vector
* of length ndim
*/
virtual void getElectricCurrent(int ndim,
const doublereal* grad_T,
int ldx,
const doublereal* grad_X,
int ldf,
const doublereal* grad_V,
doublereal* current)
{
err("getElectricCurrent");
}
//! Get the species diffusive mass fluxes wrt to
//! the mass averaged velocity,

View file

@ -27,7 +27,7 @@ using namespace std;
#include "LiquidTransportParams.h"
namespace Cantera {
//! @{
const int LVISC_CONSTANT = 0;
const int LVISC_WILKES = 1;
const int LVISC_MIXTUREAVG = 2;
@ -35,7 +35,7 @@ namespace Cantera {
const int LDIFF_MIXDIFF_UNCORRECTED = 0;
const int LDIFF_MIXDIFF_FLUXCORRECTED = 1;
const int LDIFF_MULTICOMP_STEFANMAXWELL = 2;
//! @}
class TransportParams;