GRINS-0.6.0
power_law_catalycity.C
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2015 Paul T. Bauman, Roy H. Stogner
7 // Copyright (C) 2010-2013 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 // This class
27 
28 // C++
29 #include <cmath>
30 
31 namespace GRINS
32 {
33  PowerLawCatalycity::PowerLawCatalycity( const libMesh::Real gamma0,
34  const libMesh::Real Tref,
35  const libMesh::Real alpha )
36  : _gamma0(gamma0),
37  _Tref(Tref),
38  _alpha(alpha)
39  {
40  return;
41  }
42 
44  {
45  return;
46  }
47 
48  libMesh::Real PowerLawCatalycity::operator()( const libMesh::Real T ) const
49  {
50  return _gamma0*std::pow( T/_Tref, _alpha);
51  }
52 
53  libMesh::Real PowerLawCatalycity::dT( const libMesh::Real T ) const
54  {
55  return (*this)(T)*_alpha/T;
56  }
57 
58  void PowerLawCatalycity::set_params( const std::vector<libMesh::Real>& params )
59  {
60  libmesh_assert_equal_to( params.size(), 3 );
61 
62  _gamma0 = params[0];
63 
64  _Tref = params[1];
65 
66  _alpha = params[2];
67 
68  return;
69  }
70 
72  {
73  return new PowerLawCatalycity( *this );
74  }
75 
76 } // end namespace GRINS
virtual libMesh::Real dT(const libMesh::Real T) const
virtual libMesh::Real operator()(const libMesh::Real T) const
GRINS namespace.
virtual CatalycityBase * clone() const
Creates a new copy of the current class.
virtual void set_params(const std::vector< libMesh::Real > &params)

Generated on Mon Jun 22 2015 21:32:20 for GRINS-0.6.0 by  doxygen 1.8.9.1