| 100 | } |
| 101 | |
| 102 | void printSurf(ostream& oooo, |
| 103 | ThermoPhase* surfPhaseTP, InterfaceKinetics* iKin_ptr, double* src) |
| 104 | { |
| 105 | double x[MSSIZE]; |
| 106 | string surfParticlePhaseName = surfPhaseTP->name(); |
| 107 | surfPhaseTP->getMoleFractions(x); |
| 108 | size_t iPhase = iKin_ptr->phaseIndex(surfParticlePhaseName); |
| 109 | size_t kstart = iKin_ptr->kineticsSpeciesIndex(0, iPhase); |
| 110 | oooo << "Surface Phase: " << surfParticlePhaseName |
| 111 | << " (" << kstart << ")" << endl; |
| 112 | double Temp = surfPhaseTP->temperature(); |
| 113 | double p = surfPhaseTP->pressure(); |
| 114 | oooo << "Surface Temperature = " << Temp << endl; |
| 115 | oooo << "Surface Pressure = " << p << endl; |
| 116 | oooo << " Name " |
| 117 | << " Coverage SrcRate " << endl; |
| 118 | double sum = 0.0; |
| 119 | size_t nspSurf = surfPhaseTP->nSpecies(); |
| 120 | for (size_t k = 0; k < nspSurf; k++) { |
| 121 | kstart = iKin_ptr->kineticsSpeciesIndex(0, iPhase); |
| 122 | double srcK = src[kstart]; |
| 123 | if (fabs(srcK) < 1.0E-7) { |
| 124 | srcK = 0.0; |
| 125 | } |
| 126 | fmt::print(oooo, "{:4d} {:>24s} {:14.3g} {:14.3e}\n", |
| 127 | k, surfPhaseTP->speciesName(k), x[k], srcK); |
| 128 | sum += x[k]; |
| 129 | } |
| 130 | oooo << "Sum of coverages = " << sum << endl; |
| 131 | } |
| 132 | |
| 133 | int main(int argc, char** argv) |
| 134 | { |
no test coverage detected