Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 3 : //* 4 : //* All rights reserved, see COPYRIGHT for full restrictions 5 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT 6 : //* 7 : //* Licensed under LGPL 2.1, please see LICENSE for details 8 : //* https://www.gnu.org/licenses/lgpl-2.1.html 9 : 10 : #pragma once 11 : 12 : #include "MooseTypes.h" 13 : #include "LeastSquaresFitBase.h" 14 : 15 : /** 16 : * Fit the equilibrium constant values read from a databse at specified 17 : * temperature values with a Maier-Kelly type function for the equilibrium constant 18 : * 19 : * log(K)= a_0 ln(T) + a_1 + a_2 T + a_3 / T + a_4 / T^2 20 : * 21 : * where T is the temperature in Kelvin. 22 : * 23 : * Note: at least five data points must be provided to generate a fit 24 : */ 25 : 26 2 : class EquilibriumConstantFit : public LeastSquaresFitBase 27 : { 28 : public: 29 : EquilibriumConstantFit(const std::vector<Real> & temperature, const std::vector<Real> & logk); 30 : 31 : virtual Real sample(Real T) override; 32 : 33 : protected: 34 : virtual void fillMatrix() override; 35 : };