Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixup PR precheck #114

Merged
merged 3 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/actions/ChemicalReactionsBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class ChemicalReactionsBase : public Action
unsigned int _num_constant_reactions;

bool _mole_factor;
Real N_A;
Real N_A;
Real _rate_factor;

std::string _interpolation_type;
Expand Down
2 changes: 1 addition & 1 deletion include/materials/ADEEDFRateConstantTownsend.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ADEEDFRateConstantTownsend : public ADMaterial
virtual void computeQpProperties();

SplineInterpolation _coefficient_interpolation;

std::string _coefficient_format;
ADMaterialProperty<Real> & _townsend_coefficient;
const MaterialProperty<Real> & _massIncident;
Expand Down
4 changes: 2 additions & 2 deletions problems/e5_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
data = np.genfromtxt(file, dtype=float, delimiter=',', skip_header=1)
data2 = np.genfromtxt(file2, dtype=float, delimiter=',', skip_header=1)
data3 = np.genfromtxt(file3, dtype=float, delimiter=',', skip_header=1)
names =['Ar','Ar+','Production2','Production0','Production3','e']
names2 =['Ar','Ar+','e','Ar+ and e Production rate','Ar+ + e Recombination rate','test 1-Body Production rate']
names =['Ar','Ar+','Production2','Production0','Production3','e']
names2 =['Ar','Ar+','e','Ar+ and e Production rate','Ar+ + e Recombination rate','test 1-Body Production rate']
names3 =['N','N+','N2','N2+','N2A','N2B','N2C','N2a1','N3+','N4+','Te','Teff','e','rate0','rate1','rate10','rate11','rate12','rate13','rate14','rate15','rate16','rate17','rate18','rate19','rate2','rate20','rate21','rate22','rate23','rate24','rate25','rate26','rate27','rate28','rate29','rate3','rate30','rate31','rate32','rate33','rate4','rate5','rate6','rate7','rate8','rate9']
print(data3)

Expand Down
2 changes: 1 addition & 1 deletion problems/e5_track.i
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
sampling_variable = 'reduced_field'
track_rates = true
# Add reactions here
reactions = 'e + Ar -> e + e + Ar+ : EEDF
reactions = 'e + Ar -> e + e + Ar+ : EEDF
e + Ar+ + Ar -> Ar + Ar : 1e-25
Ar+ -> Ar+ : 1e-14
'
Expand Down
12 changes: 6 additions & 6 deletions problems/first_order_example/lieberman_ex1.i
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# This input file describes a simple system of two first-order reactions
#
# Based on the example shown in the textbook:
# Based on the example shown in the textbook:
#
# Lieberman, Michael A. and Lichtenberg, Allan J. "Principles of Plasma
# Discharges and Materials Processing." Second Edition. John Wiley & Sons, Inc.
# Lieberman, Michael A. and Lichtenberg, Allan J. "Principles of Plasma
# Discharges and Materials Processing." Second Edition. John Wiley & Sons, Inc.
# (2005)
#
# Chapter 9, Section 2, "First-Order Consecutive Reactions)
Expand All @@ -12,7 +12,7 @@
[Mesh]
# 'Dummy' mesh - a mesh is always needed to run MOOSE, but
# scalar variables do not exist on a mesh.
# When you're doing a 0D problem you just need to give MOOSE
# When you're doing a 0D problem you just need to give MOOSE
# a single element to work with.
type = GeneratedMesh
dim = 1
Expand Down Expand Up @@ -104,8 +104,8 @@
[]

# This next one is optional, but highly recommended.
# Without this, scalar variables are printed on the terminal as the
# simulation runs.
# Without this, scalar variables are printed on the terminal as the
# simulation runs.
# It's best to keep this on to prevent things from being cluttered.
[console]
type = Console
Expand Down
2 changes: 1 addition & 1 deletion problems/first_order_example/lieberman_ex1_comp.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def exact_solution(time, n0, KA, KB):
Equations 9.2.5 (nA), 9.2.6 (nB), 9.2.8 (nC)
'''
nA = n0 * np.exp(-KA * time)

nB = n0 * KA / (KB - KA) * (np.exp(-KA * time) - np.exp(-KB * time))

nC = n0 * (1. + 1./(KA - KB) * (KB * np.exp(-KA * time) - KA * np.exp(-KB * time)))
Expand Down
2 changes: 1 addition & 1 deletion scripts/fixup_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,4 @@ def checkAndUpdatePython(filename):
parser.add_option("-f", "--force", action="store_true", dest="force", default=False)

(global_options, args) = parser.parse_args()
fixupHeader()
fixupHeader()
7 changes: 1 addition & 6 deletions src/actions/AddGeneralReactions.C
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ AddGeneralReactions::act()
// if (_energy_change[i] == true)
// {
// Gas temperature is almost in place, but not finished yet.
// std::cout << "WARNING: energy dependence is not yet implemented." << std::endl;
// mooseError("Energy dependence is not yet implemented.");
// }
}
}
Expand Down Expand Up @@ -346,7 +346,6 @@ AddGeneralReactions::act()
reactant_kernel_name += "Log";
}
}
// std::cout << energy_kernel_name << ", " << _energy_change[i] << std::endl;

// if (_energy_change[i] && _rate_type[i] == "EEDF")
// {
Expand Down Expand Up @@ -557,8 +556,6 @@ AddGeneralReactions::act()
InputParameters params = _factory.getValidParams(reactant_kernel_name);
params.set<NonlinearVariableName>("variable") = _species[j];
params.set<Real>("coefficient") = _species_count[i][j];
// std::cout << getParam<std::vector<SubdomainName>>("block")[0] << ", " <<
// _species_count[i][j] << std::endl; mooseError("TESTING");
params.set<std::string>("reaction") = _reaction[i];
if (find_other || find_aux)
{
Expand Down Expand Up @@ -670,8 +667,6 @@ AddGeneralReactions::act()
// If a species is not tracked, it is treated as a background gas.
for (unsigned int k = 0; k < _reactants[i].size(); ++k)
{
// std::cout << _reaction[i] << ": \n" << " " << _reactants[i][k] << ", " <<
// include_species[k] << std::endl;
if (include_species[k])
{
params.set<std::vector<VariableName>>(other_variables[k]) = {_reactants[i][k]};
Expand Down
2 changes: 1 addition & 1 deletion src/actions/AddZapdosReactions.C
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ AddZapdosReactions::act()
// First all EEDF-based reactions are added.
for (unsigned int i = 0; i < _num_eedf_reactions; ++i)
{
std::cout << _ad_prepend + "ReactionRateEEDF" + _townsend_append + _log_append << std::endl;
mooseInfo(_ad_prepend, "ReactionRateEEDF", _townsend_append, _log_append);
if (_coefficient_format == "townsend")
addAuxRate(_ad_prepend + "ReactionRateEEDF" + _townsend_append + _log_append,
_eedf_reaction_number[i],
Expand Down
18 changes: 5 additions & 13 deletions src/actions/ChemicalReactions.C
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ ChemicalReactions::ChemicalReactions(const InputParameters & params)
//////////
// if (_rate_equation_string[i].find("Tgas") != std::string::npos)
// {
// std::cout << "found!" << std::endl;
// mooseInfo("found!");
// }
//////////

Expand All @@ -245,7 +245,7 @@ ChemicalReactions::ChemicalReactions(const InputParameters & params)
// std::string token;
// while (std::getline(iss >> std::ws, token,'/'))
// {
// std::cout << token << std::endl;
// mooseInfo(token);
// }
}
else
Expand Down Expand Up @@ -528,11 +528,7 @@ ChemicalReactions::act()

if (gas_tracking)
{
// mooseError("Functionality for tracking neutral gas densities and temperatures is under
// development.");
std::cout
<< "WARNING: Functionality for tracking neutral gas densities is still under development."
<< std::endl;
mooseError("Functionality for tracking neutral gas densities is still under development.");
}

else if (_current_task == "add_function" && _scalar_problem == false)
Expand Down Expand Up @@ -741,8 +737,7 @@ ChemicalReactions::act()
}
else if (_rate_type[i] == "Equation")
{
std::cout << "WARNING: CRANE cannot yet handle equation-based equations." << std::endl;
// This should be a mooseError...but I'm using it for testing purposes.
mooseError("CRANE cannot yet handle equation-based equations.");
}
else if (_superelastic_reaction[i] == true)
{
Expand Down Expand Up @@ -788,7 +783,7 @@ ChemicalReactions::act()
if (_energy_change == true)
{
// Gas temperature is almost in place, but not finished yet.
std::cout << "WARNING: energy dependence is not yet implemented." << std::endl;
mooseError("Energy dependence is not yet implemented.");
}
}
}
Expand All @@ -801,7 +796,6 @@ ChemicalReactions::act()
std::vector<Real> rxn_coeff = getParam<std::vector<Real>>("reaction_coefficient");
for (unsigned int i = 0; i < _num_reactions; ++i)
{
// std::cout << rxn_coeff[i] << std::endl;
if (_reactants[i].size() == 1)
{
product_kernel_name = "Product1BodyScalar";
Expand Down Expand Up @@ -881,8 +875,6 @@ ChemicalReactions::act()

if (_species_count[i][j] > 0)
{
// std::cout << _species_count[i][j] << std::endl;
// std::cout <<
InputParameters params = _factory.getValidParams(product_kernel_name);
params.set<NonlinearVariableName>("variable") = _species[j];
// params.set<Real>("n_gas") = 3.219e24;
Expand Down
26 changes: 11 additions & 15 deletions src/actions/ChemicalReactionsBase.C
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ ChemicalReactionsBase::ChemicalReactionsBase(const InputParameters & params)
//////////
// if (_rate_equation_string[i].find("Tgas") != std::string::npos)
// {
// std::cout << "found!" << std::endl;
// mooseInfo("found!");
// }
//////////

Expand All @@ -367,7 +367,7 @@ ChemicalReactionsBase::ChemicalReactionsBase(const InputParameters & params)
// std::string token;
// while (std::getline(iss >> std::ws, token,'/'))
// {
// std::cout << token << std::endl;
// mooseInfo(token);
// }
}
else
Expand All @@ -388,7 +388,7 @@ ChemicalReactionsBase::ChemicalReactionsBase(const InputParameters & params)
}
catch (const std::out_of_range &)
{
std::cerr << "Argument out of range for a double\n";
mooseError("Argument out of range for a double\n");
throw;
}
// _rate_coefficient[i] = std::stod(rate_coefficient_string[i]);
Expand Down Expand Up @@ -730,15 +730,6 @@ ChemicalReactionsBase::ChemicalReactionsBase(const InputParameters & params)
}

_num_reactions += superelastic_reactions;
// for (unsigned int i=0; i<_num_reactions; ++i)
// {
// std::cout << _reaction[i] << std::endl;
// for (unsigned int j=0; j<_species.size(); ++j)
// {
// std::cout << _species[j] << ", " << _species_count[i][j] << std::endl;
// }
// }
// mooseError("TEST");
_reaction_coefficient_name.resize(_num_reactions);
// Find the unique species across all reaction pathways
// Note that this also accounts for species that are not tracked in case
Expand Down Expand Up @@ -910,11 +901,16 @@ ChemicalReactionsBase::ChemicalReactionsBase(const InputParameters & params)
}
if (unbalanced)
{
std::cout << "WARNING: The following equations are unbalanced." << std::endl;
std:string error_str;
for (unsigned int i = 0; i < faulty_reaction.size(); ++i)
std::cout << " " << faulty_reaction[i] << std::endl;
{
error_str.append(" ");
error_str.append(faulty_reaction[i]);
error_str.append("\n");
}

mooseError("Fix unbalanced reactions or particle conservation will not be enforced.");
mooseError("The following equations are unbalanced:\n", error_str,
"Fix unbalanced reactions or particle conservation will not be enforced.");
}
}

Expand Down
3 changes: 0 additions & 3 deletions src/auxkernels/BolsigValueScalar.C
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ BolsigValueScalar::BolsigValueScalar(const InputParameters & parameters)
Real
BolsigValueScalar::computeValue()
{
// std::cout << _data.test(0) << std::endl;
// return 0.0;

if (_data_type == "diffusivity")
{
mooseError("No diffusivity function yet! Whoops!");
Expand Down
3 changes: 0 additions & 3 deletions src/auxkernels/EEDFRateCoefficientScalar.C
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ EEDFRateCoefficientScalar::EEDFRateCoefficientScalar(const InputParameters & par
Real
EEDFRateCoefficientScalar::computeValue()
{
// std::cout << _data.test(0) << std::endl;
// return 0.0;
Real val;
if (_sample_value)
{
Expand All @@ -49,7 +47,6 @@ EEDFRateCoefficientScalar::computeValue()
{
return val;
}
// return _data.coefficient_sample(_reaction_number, _sampler_var[0]/1e-21);
}
else
{
Expand Down
1 change: 0 additions & 1 deletion src/auxkernels/ParsedScalarRateCoefficient.C
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ ParsedScalarRateCoefficient::ParsedScalarRateCoefficient(const InputParameters &
// {
// Real extra_value = _data.electron_temperature(7.7e-20);
// _constant_names.push_back(getParam<std::vector<std::string>>("file_value")[0]);
// std::cout << _reduced_field[_i] << std::endl;
// if (isCoupledScalar("reduced_field"))
// _constant_expressions.push_back(std::to_string(_data.electron_temperature(_reduced_field[_i])));
// else
Expand Down
3 changes: 0 additions & 3 deletions src/auxkernels/VariableSum.C
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ VariableSum::computeValue()
Real variable_sum = 0;
for (unsigned int i = 0; i < _nargs; ++i)
{
// variables += (i == 0 ? "" : ",") + getScalarVar("args", i)->name();
// _args[i] = &coupledScalarValue("args", i);
// std::cout << (*_args[i])[_i] << std::endl;
variable_sum += coupledScalarValue("args", i)[_i];
}
return variable_sum;
Expand Down
3 changes: 0 additions & 3 deletions src/auxkernels/VariableSumLog.C
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ VariableSumLog::computeValue()
Real variable_sum = 0;
for (unsigned int i = 0; i < _nargs; ++i)
{
// variables += (i == 0 ? "" : ",") + getScalarVar("args", i)->name();
// _args[i] = &coupledScalarValue("args", i);
// std::cout << (*_args[i])[_i] << std::endl;
variable_sum += std::exp(coupledScalarValue("args", i)[_i]);
}
return std::log(variable_sum);
Expand Down
2 changes: 0 additions & 2 deletions src/kernels/ReactionSecondOrder.C
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,6 @@ ReactionSecondOrder::computeQpOffDiagJacobian(unsigned int jvar)
}
else
{
// std::cout << getParam<std::string>("reaction") << ": " << _v_eq_u << ", " << _w_eq_u <<
// std::endl;
mooseError("ReactionSecondOrder, computeQpOffDiagJacobian: this is not yet implemented for the "
"current case.");
}*/
Expand Down
1 change: 0 additions & 1 deletion src/materials/SuperelasticReactionRate.C
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,4 @@ SuperelasticReactionRate::computeQpProperties()
(delta_a[4]/20.0)*std::pow(_Tgas[_qp], 4.0) - delta_a[5]*std::pow(_Tgas[_qp], -1.0) + delta_a[6]);

_reaction_rate[_qp] = _reversible_rate[_qp] / _equilibrium_constant;
// std::cout << _reversible_rate[_qp] << std::endl;
}
Loading