11 #include "MooseError.h"
14 const std::vector<Real> & logk)
22 "The temperature and logk data sets must be equal in length in EquilibriumConstantFit");
26 mooseError(
"At least five data points are required in EquilibriumConstantFit");
32 unsigned int num_rows = _x.size();
33 unsigned int num_cols = _num_coeff;
34 _matrix.resize(num_rows * num_cols);
36 for (
unsigned int row = 0; row < num_rows; ++row)
38 _matrix[row] = std::log(_x[row]);
39 _matrix[num_rows + row] = 1.0;
40 _matrix[(2 * num_rows) + row] = _x[row];
41 _matrix[(3 * num_rows) + row] = 1.0 / _x[row];
42 _matrix[(4 * num_rows) + row] = 1.0 / _x[row] / _x[row];
50 _coeffs[0] * std::log(T) + _coeffs[1] + _coeffs[2] * T + _coeffs[3] / T + _coeffs[4] / T / T;