diff --git a/include/kernels/ElectronEnergyTermElasticTownsend.h b/include/kernels/ElectronEnergyTermElasticTownsend.h index 4c41f61..28f4b5e 100644 --- a/include/kernels/ElectronEnergyTermElasticTownsend.h +++ b/include/kernels/ElectronEnergyTermElasticTownsend.h @@ -30,14 +30,14 @@ class ElectronEnergyTermElasticTownsend : public Kernel virtual Real computeQpOffDiagJacobian(unsigned int jvar); Real _r_units; - std::string _reaction_coeff_name; + std::string _reaction_coeff_name; const MaterialProperty & _diffem; const MaterialProperty & _muem; const MaterialProperty & _alpha; const MaterialProperty & _d_iz_d_actual_mean_en; const MaterialProperty & _d_muem_d_actual_mean_en; const MaterialProperty & _d_diffem_d_actual_mean_en; - //const MaterialProperty & _massem; + // const MaterialProperty & _massem; const MaterialProperty & _massGas; const MaterialProperty & _d_el_d_actual_mean_en; diff --git a/include/kernels/ElectronImpactReactionReactant.h b/include/kernels/ElectronImpactReactionReactant.h index e1a8ef5..8bbacf3 100644 --- a/include/kernels/ElectronImpactReactionReactant.h +++ b/include/kernels/ElectronImpactReactionReactant.h @@ -51,7 +51,6 @@ class ElectronImpactReactionReactant : public Kernel unsigned int _mean_en_id; unsigned int _potential_id; unsigned int _em_id; - }; #endif /* ELECTRONIMPACTREACTIONREACTANT_H */ diff --git a/include/kernels/ElectronReactantSecondOrderLog.h b/include/kernels/ElectronReactantSecondOrderLog.h index 1c40540..9af667e 100644 --- a/include/kernels/ElectronReactantSecondOrderLog.h +++ b/include/kernels/ElectronReactantSecondOrderLog.h @@ -44,6 +44,5 @@ class ElectronReactantSecondOrderLog : public Kernel const MaterialProperty & _n_gas; Real _stoichiometric_coeff; bool _v_eq_electron; - }; #endif // ELECTRONREACTANTSECONDORDERLOG_H diff --git a/include/materials/EEDFRateConstantTownsend.h b/include/materials/EEDFRateConstantTownsend.h index 8644ab4..c658f57 100644 --- a/include/materials/EEDFRateConstantTownsend.h +++ b/include/materials/EEDFRateConstantTownsend.h @@ -43,7 +43,7 @@ class EEDFRateConstantTownsend : public Material MaterialProperty & _d_alpha_d_var_id; MaterialProperty & _target_coupled; bool _is_target_aux; -// const MaterialProperty & _n_gas; + // const MaterialProperty & _n_gas; const MaterialProperty & _massIncident; const MaterialProperty & _massTarget; diff --git a/src/actions/AddZapdosReactions.C b/src/actions/AddZapdosReactions.C index 4a63582..469dcd3 100644 --- a/src/actions/AddZapdosReactions.C +++ b/src/actions/AddZapdosReactions.C @@ -552,8 +552,8 @@ AddZapdosReactions::act() InputParameters params = _factory.getValidParams(reactant_kernel_name); params.set("variable") = _species[j]; params.set("coefficient") = _species_count[i][j]; - // std::cout << getParam>("block")[0] << ", " << _species_count[i][j] << std::endl; - // mooseError("TESTING"); + // std::cout << getParam>("block")[0] << ", " << + // _species_count[i][j] << std::endl; mooseError("TESTING"); params.set("reaction") = _reaction[i]; if (find_other || find_aux) { diff --git a/src/kernels/ElectronEnergyTermElasticTownsend.C b/src/kernels/ElectronEnergyTermElasticTownsend.C index 37f21e7..9be503c 100644 --- a/src/kernels/ElectronEnergyTermElasticTownsend.C +++ b/src/kernels/ElectronEnergyTermElasticTownsend.C @@ -27,17 +27,18 @@ validParams() return params; } -ElectronEnergyTermElasticTownsend::ElectronEnergyTermElasticTownsend(const InputParameters & parameters) +ElectronEnergyTermElasticTownsend::ElectronEnergyTermElasticTownsend( + const InputParameters & parameters) : Kernel(parameters), _r_units(1. / getParam("position_units")), _diffem(getMaterialProperty("diffem")), _muem(getMaterialProperty("muem")), - _alpha(getMaterialProperty("alpha_"+getParam("reaction"))), + _alpha(getMaterialProperty("alpha_" + getParam("reaction"))), _d_iz_d_actual_mean_en(getMaterialProperty("d_iz_d_actual_mean_en")), _d_muem_d_actual_mean_en(getMaterialProperty("d_muem_d_actual_mean_en")), _d_diffem_d_actual_mean_en(getMaterialProperty("d_diffem_d_actual_mean_en")), -// _massem(getMaterialProperty("mass" + (*getVar("electron_species",0)).name())), - _massGas(getMaterialProperty("mass" + (*getVar("target_species",0)).name())), + // _massem(getMaterialProperty("mass" + (*getVar("electron_species",0)).name())), + _massGas(getMaterialProperty("mass" + (*getVar("target_species", 0)).name())), _d_el_d_actual_mean_en(getMaterialProperty("d_el_d_actual_mean_en")), _grad_potential(coupledGradient("potential")), _em(coupledValue("electron_species")), @@ -58,7 +59,7 @@ ElectronEnergyTermElasticTownsend::computeQpResidual() .norm(); Real Eel = -3.0 * _massem / _massGas[_qp] * 2.0 / 3 * std::exp(_u[_qp] - _em[_qp]); Real el_term = _alpha[_qp] * electron_flux_mag * Eel; - + return -_test[_i][_qp] * el_term; } diff --git a/src/kernels/ElectronEnergyTermTownsend.C b/src/kernels/ElectronEnergyTermTownsend.C index 58669c2..7527d59 100644 --- a/src/kernels/ElectronEnergyTermTownsend.C +++ b/src/kernels/ElectronEnergyTermTownsend.C @@ -16,18 +16,19 @@ validParams() return params; } -ElectronEnergyTermTownsend::ElectronEnergyTermTownsend( - const InputParameters & parameters) +ElectronEnergyTermTownsend::ElectronEnergyTermTownsend(const InputParameters & parameters) : Kernel(parameters), _r_units(1. / getParam("position_units")), _elastic(getParam("elastic_collision")), _threshold_energy(getParam("threshold_energy")), - _elastic_energy(getMaterialProperty("energy_elastic_"+getParam("reaction"))), + _elastic_energy( + getMaterialProperty("energy_elastic_" + getParam("reaction"))), _diffem(getMaterialProperty("diffem")), _muem(getMaterialProperty("muem")), - _alpha(getMaterialProperty("alpha_"+getParam("reaction"))), + _alpha(getMaterialProperty("alpha_" + getParam("reaction"))), // _d_iz_d_actual_mean_en(getMaterialProperty("d_alpha_d_en_em + Ar = em + em + Arp")), - _d_iz_d_actual_mean_en(getMaterialProperty("d_alpha_d_en_"+getParam("reaction"))), + _d_iz_d_actual_mean_en( + getMaterialProperty("d_alpha_d_en_" + getParam("reaction"))), _d_muem_d_actual_mean_en(getMaterialProperty("d_muem_d_actual_mean_en")), _d_diffem_d_actual_mean_en(getMaterialProperty("d_diffem_d_actual_mean_en")), _grad_potential(isCoupled("potential") ? coupledGradient("potential") : _grad_zero), @@ -37,11 +38,12 @@ ElectronEnergyTermTownsend::ElectronEnergyTermTownsend( _em_id(coupled("em")) { if (!_elastic && !isParamValid("threshold_energy")) - mooseError("ElectronEnergyTermTownsend: Elastic collision set to false, but no threshold energy for this reaction is provided!"); + mooseError("ElectronEnergyTermTownsend: Elastic collision set to false, but no threshold " + "energy for this reaction is provided!"); // else if (_elastic) - // _energy_change = _elastic_energy[_qp]; + // _energy_change = _elastic_energy[_qp]; // else - _energy_change = _threshold_energy; + _energy_change = _threshold_energy; } ElectronEnergyTermTownsend::~ElectronEnergyTermTownsend() {} diff --git a/src/kernels/ElectronImpactReactionProduct.C b/src/kernels/ElectronImpactReactionProduct.C index 5bfe2fc..24dbfa4 100644 --- a/src/kernels/ElectronImpactReactionProduct.C +++ b/src/kernels/ElectronImpactReactionProduct.C @@ -16,7 +16,8 @@ validParams() params.addRequiredParam("position_units", "Units of position."); params.addRequiredParam("reaction", "Stores the full reaction equation."); params.addRequiredParam("reaction_coefficient_name", - "Stores the name of the reaction rate/townsend coefficient, unique to each individual reaction."); + "Stores the name of the reaction rate/townsend coefficient, " + "unique to each individual reaction."); return params; } @@ -31,7 +32,7 @@ ElectronImpactReactionProduct::ElectronImpactReactionProduct(const InputParamete // _alpha(getMaterialProperty("alpha_iz")), _alpha(getMaterialProperty(_reaction_coeff_name)), // _d_iz_d_actual_mean_en(getMaterialProperty("d_iz_d_actual_mean_en")), - _d_iz_d_actual_mean_en(getMaterialProperty("d_alpha_d_en_"+_reaction_name)), + _d_iz_d_actual_mean_en(getMaterialProperty("d_alpha_d_en_" + _reaction_name)), _d_muem_d_actual_mean_en(getMaterialProperty("d_muem_d_actual_mean_en")), _d_diffem_d_actual_mean_en(getMaterialProperty("d_diffem_d_actual_mean_en")), _mean_en(coupledValue("mean_en")), @@ -64,8 +65,8 @@ ElectronImpactReactionProduct::computeQpResidual() // Real iz_term = _alpha_iz[_qp] * electron_flux_mag; // Real iz_term = alpha * electron_flux_mag; - // return -_test[_i][_qp] * iz_term; - return -_test[_i][_qp] * _alpha[_qp] * electron_flux_mag; + // return -_test[_i][_qp] * iz_term; + return -_test[_i][_qp] * _alpha[_qp] * electron_flux_mag; } Real @@ -93,8 +94,7 @@ ElectronImpactReactionProduct::computeQpJacobian() Real d_electron_flux_mag_d_em = electron_flux * d_electron_flux_d_em / (electron_flux_mag + std::numeric_limits::epsilon()); - Real d_iz_term_d_em = - (electron_flux_mag * d_iz_d_em + _alpha[_qp] * d_electron_flux_mag_d_em); + Real d_iz_term_d_em = (electron_flux_mag * d_iz_d_em + _alpha[_qp] * d_electron_flux_mag_d_em); return -_test[_i][_qp] * d_iz_term_d_em; } @@ -144,14 +144,14 @@ ElectronImpactReactionProduct::computeQpOffDiagJacobian(unsigned int jvar) // Real d_iz_term_d_potential = (_alpha_iz[_qp] * d_electron_flux_mag_d_potential); // Real d_iz_term_d_mean_en = // (electron_flux_mag * d_iz_d_mean_en + _alpha_iz[_qp] * d_electron_flux_mag_d_mean_en); - // Real d_iz_term_d_em = (electron_flux_mag * d_iz_d_em + _alpha_iz[_qp] * d_electron_flux_mag_d_em); + // Real d_iz_term_d_em = (electron_flux_mag * d_iz_d_em + _alpha_iz[_qp] * + // d_electron_flux_mag_d_em); Real d_iz_term_d_potential = (_alpha[_qp] * d_electron_flux_mag_d_potential); Real d_iz_term_d_mean_en = (electron_flux_mag * d_iz_d_mean_en + _alpha[_qp] * d_electron_flux_mag_d_mean_en); Real d_iz_term_d_em = (electron_flux_mag * d_iz_d_em + _alpha[_qp] * d_electron_flux_mag_d_em); - if (jvar == _potential_id) return -_test[_i][_qp] * d_iz_term_d_potential; @@ -175,5 +175,4 @@ ElectronImpactReactionProduct::computeQpOffDiagJacobian(unsigned int jvar) // // else // return 0.0; - } diff --git a/src/kernels/ElectronImpactReactionReactant.C b/src/kernels/ElectronImpactReactionReactant.C index 0b3039c..6e2468d 100644 --- a/src/kernels/ElectronImpactReactionReactant.C +++ b/src/kernels/ElectronImpactReactionReactant.C @@ -15,8 +15,9 @@ validParams() params.addRequiredCoupledVar("em", "The electron density."); params.addRequiredParam("position_units", "Units of position."); params.addRequiredParam("reaction", "Stores the full reaction equation."); - params.addRequiredParam("reaction_coefficient_name", - "Stores the name of the reaction rate, unique to each individual reaction."); + params.addRequiredParam( + "reaction_coefficient_name", + "Stores the name of the reaction rate, unique to each individual reaction."); return params; } @@ -33,7 +34,7 @@ ElectronImpactReactionReactant::ElectronImpactReactionReactant(const InputParame // _alpha(getMaterialProperty("alpha_dex")), _alpha(getMaterialProperty(_reaction_coeff_name)), // _d_iz_d_actual_mean_en(getMaterialProperty("d_iz_d_actual_mean_en")), - _d_iz_d_actual_mean_en(getMaterialProperty("d_alpha_d_en_"+_reaction_name)), + _d_iz_d_actual_mean_en(getMaterialProperty("d_alpha_d_en_" + _reaction_name)), _d_muem_d_actual_mean_en(getMaterialProperty("d_muem_d_actual_mean_en")), _d_diffem_d_actual_mean_en(getMaterialProperty("d_diffem_d_actual_mean_en")), _mean_en(coupledValue("mean_en")), @@ -57,7 +58,6 @@ ElectronImpactReactionReactant::computeQpResidual() // return -_test[_i][_qp] * iz_term; return -_test[_i][_qp] * (-1.0) * _alpha[_qp] * electron_flux_mag; - } Real @@ -108,7 +108,8 @@ ElectronImpactReactionReactant::computeQpOffDiagJacobian(unsigned int jvar) // Real d_iz_term_d_potential = (_alpha_iz[_qp] * d_electron_flux_mag_d_potential); // Real d_iz_term_d_mean_en = // (electron_flux_mag * d_iz_d_mean_en + _alpha_iz[_qp] * d_electron_flux_mag_d_mean_en); - // Real d_iz_term_d_em = (electron_flux_mag * d_iz_d_em + _alpha_iz[_qp] * d_electron_flux_mag_d_em); + // Real d_iz_term_d_em = (electron_flux_mag * d_iz_d_em + _alpha_iz[_qp] * + // d_electron_flux_mag_d_em); Real d_iz_term_d_potential = (_alpha[_qp] * d_electron_flux_mag_d_potential); Real d_iz_term_d_mean_en = @@ -138,5 +139,4 @@ ElectronImpactReactionReactant::computeQpOffDiagJacobian(unsigned int jvar) // // else // return 0.0; - } diff --git a/src/kernels/ElectronProductSecondOrderLog.C b/src/kernels/ElectronProductSecondOrderLog.C index a45cb7a..aa0930a 100644 --- a/src/kernels/ElectronProductSecondOrderLog.C +++ b/src/kernels/ElectronProductSecondOrderLog.C @@ -13,7 +13,8 @@ validParams() params.addCoupledVar("electron", "The electron species variable."); params.addCoupledVar("target", "The target species variable."); params.addRequiredCoupledVar("energy", - "The energy variable. (Required for jacobian term. Ignore if reaction rate is a constant value.)"); + "The energy variable. (Required for jacobian term. Ignore if " + "reaction rate is a constant value.)"); params.addRequiredParam("reaction", "The full reaction equation."); params.addRequiredParam("coefficient", "The stoichiometric coeffient."); params.addParam("_electron_eq_u", false, "If v == u."); @@ -53,7 +54,8 @@ ElectronProductSecondOrderLog::computeQpResidual() mult2 = _n_gas[_qp]; } - return -_test[_i][_qp] * _stoichiometric_coeff * _reaction_coeff[_qp] * std::exp(_electron[_qp]) * mult2; + return -_test[_i][_qp] * _stoichiometric_coeff * _reaction_coeff[_qp] * std::exp(_electron[_qp]) * + mult2; } Real @@ -81,41 +83,44 @@ ElectronProductSecondOrderLog::computeQpJacobian() else d_ame_d_electron = 0.0; - return -_test[_i][_qp] * _stoichiometric_coeff * (_reaction_coeff[_qp] + (_d_k_d_en[_qp]*d_ame_d_electron)) * std::exp(_electron[_qp]) * mult2 * _phi[_j][_qp]; + return -_test[_i][_qp] * _stoichiometric_coeff * + (_reaction_coeff[_qp] + (_d_k_d_en[_qp] * d_ame_d_electron)) * std::exp(_electron[_qp]) * + mult2 * _phi[_j][_qp]; } // else // { - // power = 0.0; - // gas_mult = 1.0; - // k_deriv_mult = 0; - // - // if (_target_coupled) - // mult2 = std::exp(_target[_qp]); - // else - // mult2 = _n_gas[_qp]; - // - // if (_electron_eq_u) - // { - // power += 1.0; - // actual_mean_en = std::exp(_energy[_qp] - _electron[_qp]); - // d_ame_d_electron = -actual_mean_en; // Multiplied by _phi[_j][_qp] at the end - // } - // else - // d_ame_d_electron = 0.0; - // - // if (_target_coupled && _target_eq_u) - // power += 1.0; - // - // gas_mult *= std::exp(_electron[_qp]) * mult2; - // - // return -_test[_i][_qp] * _stoichiometric_coeff * power * (_reaction_coeff[_qp] + (_d_k_d_en[_qp] * d_ame_d_electron)) * gas_mult * _phi[_j][_qp]; + // power = 0.0; + // gas_mult = 1.0; + // k_deriv_mult = 0; + // + // if (_target_coupled) + // mult2 = std::exp(_target[_qp]); + // else + // mult2 = _n_gas[_qp]; + // + // if (_electron_eq_u) + // { + // power += 1.0; + // actual_mean_en = std::exp(_energy[_qp] - _electron[_qp]); + // d_ame_d_electron = -actual_mean_en; // Multiplied by _phi[_j][_qp] at the end + // } + // else + // d_ame_d_electron = 0.0; + // + // if (_target_coupled && _target_eq_u) + // power += 1.0; + // + // gas_mult *= std::exp(_electron[_qp]) * mult2; + // + // return -_test[_i][_qp] * _stoichiometric_coeff * power * (_reaction_coeff[_qp] + + // (_d_k_d_en[_qp] * d_ame_d_electron)) * gas_mult * _phi[_j][_qp]; // } } Real ElectronProductSecondOrderLog::computeQpOffDiagJacobian(unsigned int jvar) { - Real mult2,actual_mean_en,d_ame_d_electron,d_ame_d_energy; + Real mult2, actual_mean_en, d_ame_d_electron, d_ame_d_energy; // Real rate_constant; if (_target_coupled) @@ -128,23 +133,26 @@ ElectronProductSecondOrderLog::computeQpOffDiagJacobian(unsigned int jvar) actual_mean_en = std::exp(_energy[_qp] - _electron[_qp]); d_ame_d_electron = -actual_mean_en; - return -_test[_i][_qp] * _stoichiometric_coeff * (_reaction_coeff[_qp] + (_d_k_d_en[_qp] * d_ame_d_electron)) * std::exp(_electron[_qp]) * mult2 * _phi[_j][_qp]; + return -_test[_i][_qp] * _stoichiometric_coeff * + (_reaction_coeff[_qp] + (_d_k_d_en[_qp] * d_ame_d_electron)) * std::exp(_electron[_qp]) * + mult2 * _phi[_j][_qp]; } else if (_target_coupled && !_target_eq_u && jvar == _target_id) { - return -_test[_i][_qp] * _stoichiometric_coeff * _reaction_coeff[_qp] * std::exp(_electron[_qp]) * mult2 * _phi[_j][_qp]; + return -_test[_i][_qp] * _stoichiometric_coeff * _reaction_coeff[_qp] * + std::exp(_electron[_qp]) * mult2 * _phi[_j][_qp]; } else if (jvar == _energy_id) { actual_mean_en = std::exp(_energy[_qp] - _electron[_qp]); d_ame_d_energy = actual_mean_en; - return -_test[_i][_qp] * _stoichiometric_coeff * (_d_k_d_en[_qp] * d_ame_d_energy) * std::exp(_electron[_qp]) * mult2 * _phi[_j][_qp]; + return -_test[_i][_qp] * _stoichiometric_coeff * (_d_k_d_en[_qp] * d_ame_d_energy) * + std::exp(_electron[_qp]) * mult2 * _phi[_j][_qp]; } else return 0.0; - // if (!_electron_eq_u && jvar==_electron_id) // { // power += 1; @@ -161,5 +169,6 @@ ElectronProductSecondOrderLog::computeQpOffDiagJacobian(unsigned int jvar) // // Since these are in exponential form, the exp(dens1 + dens2) term always exists regardless! // gas_mult = mult1 * mult2; // - // return -_test[_i][_qp] * _stoichiometric_coeff * (_reaction_coeff[_qp] + (_d_k_d_en[_qp] * d_ame_d_electron)) * gas_mult * power * _phi[_j][_qp]; + // return -_test[_i][_qp] * _stoichiometric_coeff * (_reaction_coeff[_qp] + (_d_k_d_en[_qp] * + // d_ame_d_electron)) * gas_mult * power * _phi[_j][_qp]; } diff --git a/src/kernels/ElectronReactantSecondOrderLog.C b/src/kernels/ElectronReactantSecondOrderLog.C index 61e3070..fb60897 100644 --- a/src/kernels/ElectronReactantSecondOrderLog.C +++ b/src/kernels/ElectronReactantSecondOrderLog.C @@ -20,8 +20,8 @@ validParams() ElectronReactantSecondOrderLog::ElectronReactantSecondOrderLog(const InputParameters & parameters) : Kernel(parameters), - _reaction_coeff(getMaterialProperty("k_"+getParam("reaction"))), - _d_k_d_en(getMaterialProperty("d_k_d_en_"+getParam("reaction"))), + _reaction_coeff(getMaterialProperty("k_" + getParam("reaction"))), + _d_k_d_en(getMaterialProperty("d_k_d_en_" + getParam("reaction"))), _v(isCoupled("v") ? coupledValue("v") : _zero), _energy(coupledValue("energy")), _v_id(isCoupled("v") ? coupled("v") : 0), @@ -37,17 +37,19 @@ ElectronReactantSecondOrderLog::computeQpResidual() { if (isCoupled("v")) { - return -_test[_i][_qp] * _stoichiometric_coeff * _reaction_coeff[_qp] * std::exp(_v[_qp]) * std::exp(_u[_qp]); + return -_test[_i][_qp] * _stoichiometric_coeff * _reaction_coeff[_qp] * std::exp(_v[_qp]) * + std::exp(_u[_qp]); } else - return -_test[_i][_qp] * _stoichiometric_coeff * _reaction_coeff[_qp] * _n_gas[_qp] * std::exp(_u[_qp]); + return -_test[_i][_qp] * _stoichiometric_coeff * _reaction_coeff[_qp] * _n_gas[_qp] * + std::exp(_u[_qp]); } Real ElectronReactantSecondOrderLog::computeQpJacobian() { // Note that if !_v_eq_electron, then by definition _var is the electron variable. - Real d_ame_d_en,actual_mean_en; + Real d_ame_d_en, actual_mean_en; if (!_v_eq_electron) { @@ -58,17 +60,19 @@ ElectronReactantSecondOrderLog::computeQpJacobian() d_ame_d_en = 0.0; if (isCoupled("v")) - return -_test[_i][_qp] * _stoichiometric_coeff * (_reaction_coeff[_qp] + (_d_k_d_en[_qp] * d_ame_d_en)) * std::exp(_v[_qp]) * + return -_test[_i][_qp] * _stoichiometric_coeff * + (_reaction_coeff[_qp] + (_d_k_d_en[_qp] * d_ame_d_en)) * std::exp(_v[_qp]) * std::exp(_u[_qp]) * _phi[_j][_qp]; else - return -_test[_i][_qp] * _stoichiometric_coeff * (_reaction_coeff[_qp] + (_d_k_d_en[_qp] * d_ame_d_en)) * _n_gas[_qp] * + return -_test[_i][_qp] * _stoichiometric_coeff * + (_reaction_coeff[_qp] + (_d_k_d_en[_qp] * d_ame_d_en)) * _n_gas[_qp] * std::exp(_u[_qp]) * _phi[_j][_qp]; } Real ElectronReactantSecondOrderLog::computeQpOffDiagJacobian(unsigned int jvar) { - Real mult1,actual_mean_en,d_k_d_electron; + Real mult1, actual_mean_en, d_k_d_electron; if (isCoupled("v")) mult1 = std::exp(_v[_qp]); @@ -84,11 +88,14 @@ ElectronReactantSecondOrderLog::computeQpOffDiagJacobian(unsigned int jvar) actual_mean_en = std::exp(_energy[_qp] - _v[_qp]); d_k_d_electron = -actual_mean_en; - return -_test[_i][_qp] * _stoichiometric_coeff * (_reaction_coeff[_qp] + (_d_k_d_en[_qp] * d_k_d_electron)) * std::exp(_u[_qp]) * mult1 * _phi[_j][_qp]; + return -_test[_i][_qp] * _stoichiometric_coeff * + (_reaction_coeff[_qp] + (_d_k_d_en[_qp] * d_k_d_electron)) * std::exp(_u[_qp]) * + mult1 * _phi[_j][_qp]; } else { - return -_test[_i][_qp] * _stoichiometric_coeff * _reaction_coeff[_qp] * std::exp(_u[_qp]) * mult1 * _phi[_j][_qp]; + return -_test[_i][_qp] * _stoichiometric_coeff * _reaction_coeff[_qp] * std::exp(_u[_qp]) * + mult1 * _phi[_j][_qp]; } } else if (jvar == _energy_id) @@ -98,8 +105,8 @@ ElectronReactantSecondOrderLog::computeQpOffDiagJacobian(unsigned int jvar) else actual_mean_en = std::exp(_energy[_qp] - _u[_qp]); - - return -_test[_i][_qp] * _stoichiometric_coeff * (_d_k_d_en[_qp] * actual_mean_en) * std::exp(_u[_qp]) * mult1 * _phi[_j][_qp]; + return -_test[_i][_qp] * _stoichiometric_coeff * (_d_k_d_en[_qp] * actual_mean_en) * + std::exp(_u[_qp]) * mult1 * _phi[_j][_qp]; } else return 0.0; @@ -107,7 +114,8 @@ ElectronReactantSecondOrderLog::computeQpOffDiagJacobian(unsigned int jvar) // if (isCoupled("v")) // { // if (jvar == _v_id) - // return -_test[_i][_qp] * _stoichiometric_coeff * _reaction_coeff[_qp] * std::exp(_u[_qp]) * std::exp(_v[_qp]) * _phi[_j][_qp]; + // return -_test[_i][_qp] * _stoichiometric_coeff * _reaction_coeff[_qp] * std::exp(_u[_qp]) * + // std::exp(_v[_qp]) * _phi[_j][_qp]; // else // return 0.0; // } diff --git a/src/materials/EEDFRateConstantTownsend.C b/src/materials/EEDFRateConstantTownsend.C index 52afafe..17cd2d7 100644 --- a/src/materials/EEDFRateConstantTownsend.C +++ b/src/materials/EEDFRateConstantTownsend.C @@ -49,7 +49,7 @@ EEDFRateConstantTownsend::EEDFRateConstantTownsend(const InputParameters & param declareProperty("d_alpha_d_var_id_" + getParam("reaction"))), _target_coupled(declareProperty("target_coupled_" + getParam("reaction"))), _is_target_aux(getParam("is_target_aux")), -// _n_gas(getMaterialProperty("n_gas")), + // _n_gas(getMaterialProperty("n_gas")), // _massIncident(getMaterialProperty("massHe+")), _massIncident(getMaterialProperty("mass" + (*getVar("em", 0)).name())), _massTarget(isCoupled("target_species") @@ -143,19 +143,20 @@ EEDFRateConstantTownsend::computeQpProperties() // if (_coefficient_format == "townsend") // { _townsend_coefficient[_qp] = _coefficient_interpolation.sample(actual_mean_energy); -// std::cout << _townsend_coefficient[_qp] << ", " << getParam("reaction") << std::endl; + // std::cout << _townsend_coefficient[_qp] << ", " << getParam("reaction") << + // std::endl; _d_alpha_d_en[_qp] = _coefficient_interpolation.sampleDerivative(actual_mean_energy); -/* if (isCoupled("target_species")) - { - _townsend_coefficient[_qp] = - _townsend_coefficient[_qp] * std::exp(_target_species[_qp]) / _n_gas[_qp]; - if (!_is_target_aux) + /* if (isCoupled("target_species")) { - _d_alpha_d_en[_qp] = _d_alpha_d_en[_qp] * std::exp(_target_species[_qp]) / _n_gas[_qp]; - _d_alpha_d_var_id[_qp] = _target_id; + _townsend_coefficient[_qp] = + _townsend_coefficient[_qp] * std::exp(_target_species[_qp]) / _n_gas[_qp]; + if (!_is_target_aux) + { + _d_alpha_d_en[_qp] = _d_alpha_d_en[_qp] * std::exp(_target_species[_qp]) / _n_gas[_qp]; + _d_alpha_d_var_id[_qp] = _target_id; + } } - } - */ + */ if (_elastic_collision == true) {