MCPcopy Create free account
hub / github.com/Cantera/cantera / printGas

Function printGas

test_problems/surfSolverTest/surfaceSolver.cpp:24–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22#define MSSIZE 200
23
24void printGas(ostream& oooo, ThermoPhase* gasTP, InterfaceKinetics* iKin_ptr, double* src)
25{
26 double x[MSSIZE];
27 double C[MSSIZE];
28 oooo.precision(3);
29 string gasPhaseName = gasTP->name();
30 gasTP->getMoleFractions(x);
31 gasTP->getConcentrations(C);
32 double Temp = gasTP->temperature();
33 double p = gasTP->pressure();
34 oooo << "Gas Temperature = " << Temp << endl;
35 oooo << "Gas Pressure = " << p << endl;
36 size_t iPhase = iKin_ptr->phaseIndex(gasPhaseName);
37 size_t kstart = iKin_ptr->kineticsSpeciesIndex(0, iPhase);
38 oooo << "Gas Phase: " << gasPhaseName << " "
39 << "(" << kstart << ")" << endl;
40 oooo << " Name "
41 << " Conc MoleF SrcRate " << endl;
42 oooo << " "
43 << " (kmol/m^3) (kmol/m^2/s) " << endl;
44 double sum = 0.0;
45 size_t nspGas = gasTP->nSpecies();
46 for (size_t k = 0; k < nspGas; k++) {
47 kstart = iKin_ptr->kineticsSpeciesIndex(k, iPhase);
48 fmt::print(oooo, "{:4d} {:>24s} {:14.3g} {:14.3g} {:14.3e}\n",
49 k, gasTP->speciesName(k), C[k], x[k], src[kstart]);
50 sum += x[k];
51 }
52 oooo << "Sum of gas mole fractions= " << sum << endl;
53 oooo << endl;
54}
55
56void printBulk(ostream& oooo,
57 ThermoPhase* bulkPhaseTP, InterfaceKinetics* iKin_ptr, double* src)

Callers 1

mainFunction · 0.70

Calls 9

nameMethod · 0.45
getMoleFractionsMethod · 0.45
getConcentrationsMethod · 0.45
temperatureMethod · 0.45
pressureMethod · 0.45
phaseIndexMethod · 0.45
kineticsSpeciesIndexMethod · 0.45
nSpeciesMethod · 0.45
speciesNameMethod · 0.45

Tested by

no test coverage detected