The JSON output format shows all power terms twice, this is copied from the txt output file. Wherein after the total balance,
the individual collisional channels are calculated and shown with full calculation. In the text file this makes the calculation clear, whereas in the JSON file the calculation is not shown, such that all factors appear twice.
The txt output FileOutput::writePower :
std::ofstream os(m_folder + "/" + m_subFolder + "/power_balance.txt");
writeTerm(os, "Field", "eVm3/s", power.field);
writeTerm(os, "Elastic collisions (gain)", "eVm3/s", power.elasticGain);
writeTerm(os, "Elastic collisions (loss)", "eVm3/s", power.elasticLoss);
writeTerm(os, "CAR (gain)", "eVm3/s", power.carGain);
writeTerm(os, "CAR (loss)", "eVm3/s", power.carLoss);
writeTerm(os, "Excitation inelastic collisions", "eVm3/s", power.excitation.forward);
writeTerm(os, "Excitation superelastic collisions", "eVm3/s", power.excitation.backward);
writeTerm(os, "Vibrational inelastic collisions", "eVm3/s", power.vibrational.forward);
writeTerm(os, "Vibrational superelastic collisions", "eVm3/s", power.vibrational.backward);
writeTerm(os, "Rotational inelastic collisions", "eVm3/s", power.rotational.forward);
writeTerm(os, "Rotational superelastic collisions", "eVm3/s", power.rotational.backward);
writeTerm(os, "Ionization collisions", "eVm3/s", power.ionization.forward); // no recombination
writeTerm(os, "Attachment collisions", "eVm3/s", power.attachment.forward); // no detachment
writeTerm(os, "Electron density growth", "eVm3/s", power.eDensGrowth, true);
os << std::string(73, '-') << std::endl;
writeTerm(os, "Power Balance", "eVm3/s", power.balance);
writeTerm(os, "Relative Power Balance", "%", power.relativeBalance * 100);
os << std::endl;
writeTerm(os, "Elastic collisions (gain)", "eVm3/s", power.elasticGain);
writeTerm(os, "Elastic collisions (loss)", "eVm3/s", power.elasticLoss, true);
writeTerm(os, "Elastic electron-electron (gain)", "eVm3/s", power.electronElectronGain, true);
writeTerm(os, "Elastic electron-electron (loss)", "eVm3/s", power.electronElectronLoss, true);
writeTerm(os, "Elastic electron-electron (net)", "eVm3/s", power.electronElectronNet, true);
os << std::string(73, '-') << std::endl;
writeTerm(os, "Elastic collisions (net)", "eVm3/s", power.elasticNet);
The json output JsonOutput::writePower :
json_type &out = (*m_active)["power_balance"];
out.push_back(makeQuantity("Field", power.field, "eV*m^3/s"));
// out.push_back( { "Field", "eV*m^3/s", power.field });
out.push_back(makeQuantity("Elastic collisions (gain)", power.elasticGain, "eV*m^3/s"));
out.push_back(makeQuantity("Elastic collisions (loss)", power.elasticLoss, "eV*m^3/s"));
out.push_back(makeQuantity("CAR (gain)", power.carGain, "eV*m^3/s"));
out.push_back(makeQuantity("CAR (loss)", power.carLoss, "eV*m^3/s"));
out.push_back(makeQuantity("Excitation inelastic collisions", power.excitation.forward, "eV*m^3/s"));
out.push_back(makeQuantity("Excitation superelastic collisions", power.excitation.backward, "eV*m^3/s"));
out.push_back(makeQuantity("Vibrational inelastic collisions", power.vibrational.forward, "eV*m^3/s"));
out.push_back(makeQuantity("Vibrational superelastic collisions", power.vibrational.backward, "eV*m^3/s"));
out.push_back(makeQuantity("Rotational inelastic collisions", power.rotational.forward, "eV*m^3/s"));
out.push_back(makeQuantity("Rotational superelastic collisions", power.rotational.backward, "eV*m^3/s"));
out.push_back(makeQuantity("Ionization collisions", power.ionization.forward, "eV*m^3/s")); // no recombination
out.push_back(makeQuantity("Attachment collisions", power.attachment.forward, "eV*m^3/s")); // no detachment
out.push_back(makeQuantity("Electron density growth", power.eDensGrowth, "eV*m^3/s"));
out.push_back(makeQuantity("Power Balance", power.balance, "eV*m^3/s"));
out.push_back(makeQuantity("Relative Power Balance", power.relativeBalance * 100, "%"));
out.push_back(makeQuantity("Elastic collisions (gain)", power.elasticGain, "eV*m^3/s"));
out.push_back(makeQuantity("Elastic collisions (loss)", power.elasticLoss, "eV*m^3/s"));
out.push_back(makeQuantity("Elastic collisions (net)", power.elasticNet, "eV*m^3/s"));
The JSON output format shows all power terms twice, this is copied from the txt output file. Wherein after the total balance,
the individual collisional channels are calculated and shown with full calculation. In the text file this makes the calculation clear, whereas in the JSON file the calculation is not shown, such that all factors appear twice.
The txt output FileOutput::writePower :
The json output JsonOutput::writePower :