32 LiquidTransport::LiquidTransport(
thermo_t* thermo,
int ndim) :
54 m_visc_temp_ok(false),
55 m_visc_conc_ok(false),
56 m_ionCond_mix_ok(false),
57 m_ionCond_temp_ok(false),
58 m_ionCond_conc_ok(false),
59 m_mobRat_mix_ok(false),
60 m_mobRat_temp_ok(false),
61 m_mobRat_conc_ok(false),
62 m_selfDiff_mix_ok(false),
63 m_selfDiff_temp_ok(false),
64 m_selfDiff_conc_ok(false),
66 m_radi_temp_ok(false),
67 m_radi_conc_ok(false),
69 m_diff_temp_ok(false),
70 m_lambda_temp_ok(false),
71 m_lambda_mix_ok(false),
100 m_visc_mix_ok(false),
101 m_visc_temp_ok(false),
102 m_visc_conc_ok(false),
103 m_ionCond_mix_ok(false),
104 m_ionCond_temp_ok(false),
105 m_ionCond_conc_ok(false),
106 m_mobRat_mix_ok(false),
107 m_mobRat_temp_ok(false),
108 m_mobRat_conc_ok(false),
109 m_selfDiff_mix_ok(false),
110 m_selfDiff_temp_ok(false),
111 m_selfDiff_conc_ok(false),
112 m_radi_mix_ok(false),
113 m_radi_temp_ok(false),
114 m_radi_conc_ok(false),
115 m_diff_mix_ok(false),
116 m_diff_temp_ok(false),
117 m_lambda_temp_ok(false),
118 m_lambda_mix_ok(false),
132 if (&right ==
this) {
216 return (dynamic_cast<Transport*>(tr));
223 for (
size_t k = 0; k <
m_nsp; k++) {
230 for (
size_t l = 0; l <
m_nsp; l++) {
235 for (
size_t l=0; l <
m_nsp2; l++) {
255 for (
size_t k = 0; k <
m_nsp2; k++) {
301 m_mw.resize(m_nsp, 0.0);
320 for (
size_t k=0; k <
m_nsp; k++) {
323 for (
size_t k=0; k <
m_nsp2; k++) {
332 for (
size_t k = 0; k <
m_nsp; k++) {
336 for (
size_t k = 0; k <
m_nsp2; k++) {
342 for (
size_t k = 0; k <
m_nsp; k++) {
348 for (
size_t j = 0; j <
m_nsp2; j++) {
352 for (
size_t j = 0; j <
m_nsp; j++) {
372 for (
size_t k = 0; k <
m_nsp; k++) {
375 cout <<
"Warning: diffusion coefficient data for "
378 <<
"in the input file is not used for LiquidTransport model."
380 <<
"LiquidTransport model uses Stefan-Maxwell interaction "
382 <<
"parameters defined in the <transport> input block."
426 for (
size_t i = 0; i <
m_nsp; i++) {
582 for (
size_t k = 0; k <
m_nsp2; k++) {
591 for (
size_t k = 0; k <
m_nsp2; k++) {
611 for (
size_t k = 0; k <
m_nsp2; k++) {
612 for (
size_t j = 0; j <
m_nsp; j++) {
649 for (
size_t k = 0; k <
m_nsp; k++) {
653 for (
size_t k = 0; k <
m_nsp; k++) {
673 for (
size_t k=0; k<
m_nsp; k++) {
674 for (
size_t j=0; j <
m_nsp; j++) {
734 for (
size_t k = 0; k <
m_nsp; k++) {
756 throw CanteraError(
"LiquidTransport::getBinaryDiffCoeffs",
757 "First argument does not correspond to number of species in model.\nDiff Coeff matrix may be misdimensioned");
766 for (
size_t i = 0; i <
m_nsp; i++) {
767 for (
size_t j = 0; j <
m_nsp; j++) {
771 d[ld*j + i] = 1.0 /
m_bdiff(i,j);
810 for (
size_t k = 0; k <
m_nsp; k++) {
848 for (
size_t k = 0; k <
m_nsp; k++) {
859 for (
size_t a = 0; a <
m_nDim; a++) {
871 for (
size_t a = 0; a <
m_nDim; a++) {
884 for (
size_t i = 0; i < itop; i++) {
911 doublereal gradT = 0.0;
914 for (
size_t i = 0; i <
m_nDim; i++) {
915 for (
size_t k = 0; k <
m_nsp; k++) {
916 gradX[ i*m_nDim + k] = 0.0;
932 for (
size_t i = 0; i < 1; i++) {
934 for (
size_t k = 0; k <
m_nsp; k++) {
938 current /= - gradV[i];
965 const doublereal* grad_T,
967 const doublereal* grad_X,
969 const doublereal* grad_V,
982 for (
size_t i = 0; i <
m_nDim; i++) {
984 for (
size_t k = 0; k <
m_nsp; k++) {
1017 const doublereal* grad_T,
1018 int ldx,
const doublereal* grad_X,
1019 int ldf, doublereal* Vdiff)
1037 const doublereal* grad_T,
1039 const doublereal* grad_X,
1041 const doublereal* grad_V,
1100 const doublereal*
const grad_T,
1101 size_t ldx,
const doublereal*
const grad_X,
1102 size_t ldf, doublereal*
const fluxes)
1154 const doublereal* grad_T,
1156 const doublereal* grad_X,
1158 const doublereal* grad_V,
1184 for (
size_t n = 0; n <
m_nDim; n++) {
1185 for (
size_t k = 0; k <
m_nsp; k++) {
1186 Vdiff[n*ldf + k] =
m_Vdiff(k,n);
1210 for (
size_t n = 0; n <
m_nDim; n++) {
1211 for (
size_t k = 0; k <
m_nsp; k++) {
1212 fluxes[n*ldf + k] =
m_flux(k,n);
1254 for (
size_t n = 0; n <
m_nDim; n++) {
1255 for (
size_t k = 0; k <
m_nsp; k++) {
1256 if (
m_Grad_X[n*m_nsp + k] != 0.0) {
1261 d[n*m_nsp + k] = - 1.0;
1290 "negative temperature "+
fp2str(t));
1341 bool qReturn =
true;
1354 for (
size_t k = 0; k <
m_nsp; k++) {
1401 for (
size_t k = 0; k <
m_nsp; k++) {
1441 for (
size_t k = 0; k <
m_nsp; k++) {
1463 for (
size_t k = 0; k <
m_nsp; k++) {
1484 for (
size_t k = 0; k <
m_nsp2; k++) {
1485 for (
size_t j = 0; j <
m_nsp; j++) {
1508 for (
size_t k = 0; k <
m_nsp2; k++) {
1509 for (
size_t j = 0; j <
m_nsp; j++) {
1527 for (
size_t k = 0; k <
m_nsp; k++) {
1543 for (
size_t k = 0; k <
m_nDim; k++) {
1547 for (
size_t i = 0; i <
m_nsp; i++)
1553 copy(grad_lnAC.begin(),grad_lnAC.end(),
m_Grad_lnAC.begin()+m_nsp*k);
1648 for (
size_t i = 0; i <
m_nsp; i++) {
1649 for (
size_t a = 0; a <
m_nDim; a++) {
1660 double mnaught = mwSolvent/ 1000.;
1661 double lnmnaught = log(mnaught);
1662 for (
size_t i = 1; i <
m_nsp; i++) {
1663 for (
size_t a = 0; a <
m_nDim; a++) {
1681 for (
size_t j = 0; j <
m_nsp; j++) {
1695 throw CanteraError(
"LiquidTransport::stefan_maxwell_solve",
1696 "Unknown reference velocity provided.");
1698 for (
size_t i = 1; i <
m_nsp; i++) {
1701 for (
size_t j = 0; j <
m_nsp; j++) {
1727 for (
size_t i = 0; i <
m_nsp; i++) {
1744 for (
size_t j = 0; j <
m_nsp; j++) {
1758 throw CanteraError(
"LiquidTransport::stefan_maxwell_solve",
1759 "Unknown reference velocity provided.");
1761 for (
size_t i = 1; i <
m_nsp; i++) {
1765 for (
size_t j = 0; j <
m_nsp; j++) {
1788 for (
size_t j = 0; j <
m_nsp; j++) {
1802 throw CanteraError(
"LiquidTransport::stefan_maxwell_solve",
1803 "Unknown reference velocity provided.");
1805 for (
size_t i = 1; i <
m_nsp; i++) {
1810 for (
size_t j = 0; j <
m_nsp; j++) {
1827 printf(
"unimplemented\n");
1832 for (
size_t a = 0; a <
m_nDim; a++) {
1833 for (
size_t j = 0; j <
m_nsp; j++) {
1847 "\n\n\n**** Method "+ msg +
" not implemented in model "
1849 "(Did you forget to specify a transport model?)\n\n\n");