GRINS-0.8.0
catalycity_factories_old_style.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2017 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 #ifndef GRINS_CATALYCITY_FACTORIES_OLD_STYLE_H
26 #define GRINS_CATALYCITY_FACTORIES_OLD_STYLE_H
27 
28 // C+
29 #include <limits>
30 
31 // GRINS
36 
37 namespace GRINS
38 {
40  {
41  public:
42 
43  ConstantCatalycityFactoryOldStyle( const std::string& physics_name )
44  : CatalycityFactoryOldStyleBase(physics_name)
45  {}
46 
48 
49  protected:
50 
51  virtual libMesh::UniquePtr<CatalycityBase> build_catalycity_old_style( const GetPot& input,
52  const std::string& section,
53  const std::string& reactant_str,
54  const std::string& bc_id_string )
55  {
56  std::string gamma_str = section+"/gamma_"+reactant_str+"_"+bc_id_string;
57  if( !input.have_variable(gamma_str) )
58  libmesh_error_msg("ERROR: Could not find input "+gamma_str+" for ConstantCatalycity!\n");
59 
60  libMesh::Real gamma = input(gamma_str, std::numeric_limits<libMesh::Real>::max());
61  return libMesh::UniquePtr<CatalycityBase>( new ConstantCatalycity( gamma ) );
62  }
63  };
64 
66  {
67  public:
68 
69  ArrheniusCatalycityFactoryOldStyle( const std::string& physics_name )
70  : CatalycityFactoryOldStyleBase(physics_name)
71  {}
72 
74 
75  protected:
76 
77  virtual libMesh::UniquePtr<CatalycityBase> build_catalycity_old_style( const GetPot& input,
78  const std::string& section,
79  const std::string& reactant_str,
80  const std::string& bc_id_string )
81  {
82  std::string gamma_str = section+"/gamma0_"+reactant_str+"_"+bc_id_string;
83  if( !input.have_variable(gamma_str) )
84  libmesh_error_msg("ERROR: Could not find input "+gamma_str+" for ArrheniusCatalycity!\n");
85 
86  std::string Ta_str = section+"/Ta_"+reactant_str+"_"+bc_id_string;
87  if( !input.have_variable(Ta_str) )
88  libmesh_error_msg("ERROR: Could not find input "+Ta_str+" for ArrheniusCatalycity!\n");
89 
90  libMesh::Real gamma = input(gamma_str, std::numeric_limits<libMesh::Real>::max());
91  libMesh::Real Ta = input(Ta_str, std::numeric_limits<libMesh::Real>::max());
92 
93  return libMesh::UniquePtr<CatalycityBase>( new ArrheniusCatalycity( gamma, Ta ) );
94  }
95  };
96 
98  {
99  public:
100 
101  PowerLawCatalycityFactoryOldStyle( const std::string& physics_name )
102  : CatalycityFactoryOldStyleBase(physics_name)
103  {}
104 
106 
107  protected:
108 
109  virtual libMesh::UniquePtr<CatalycityBase> build_catalycity_old_style( const GetPot& input,
110  const std::string& section,
111  const std::string& reactant_str,
112  const std::string& bc_id_string )
113  {
114  std::string gamma_str = section+"/gamma0_"+reactant_str+"_"+bc_id_string;
115  if( !input.have_variable(gamma_str) )
116  libmesh_error_msg("ERROR: Could not find input "+gamma_str+" for PowerLawCatalycity!\n");
117 
118  std::string Tref_str = section+"/Tref_"+reactant_str+"_"+bc_id_string;
119  if( !input.have_variable(Tref_str) )
120  libmesh_error_msg("ERROR: Could not find input "+Tref_str+" for PowerLawCatalycity!\n");
121 
122  std::string alpha_str = section+"/alpha_"+reactant_str+"_"+bc_id_string;
123  if( !input.have_variable(alpha_str) )
124  libmesh_error_msg("ERROR: Could not find input "+alpha_str+" for PowerLawCatalycity!\n");
125 
126  libMesh::Real gamma = input(gamma_str, std::numeric_limits<libMesh::Real>::max());
127  libMesh::Real Tref = input(Tref_str, std::numeric_limits<libMesh::Real>::max());
128  libMesh::Real alpha = input(alpha_str, std::numeric_limits<libMesh::Real>::max());
129 
130  return libMesh::UniquePtr<CatalycityBase>( new PowerLawCatalycity( gamma, Tref, alpha ) );
131  }
132  };
133 
134 } // end namespace GRINS
135 
136 #endif // GRINS_CATALYCITY_FACTORIES_OLD_STYLE_H
virtual libMesh::UniquePtr< CatalycityBase > build_catalycity_old_style(const GetPot &input, const std::string &section, const std::string &reactant_str, const std::string &bc_id_string)
ConstantCatalycityFactoryOldStyle(const std::string &physics_name)
GRINS namespace.
virtual libMesh::UniquePtr< CatalycityBase > build_catalycity_old_style(const GetPot &input, const std::string &section, const std::string &reactant_str, const std::string &bc_id_string)
PowerLawCatalycityFactoryOldStyle(const std::string &physics_name)
virtual libMesh::UniquePtr< CatalycityBase > build_catalycity_old_style(const GetPot &input, const std::string &section, const std::string &reactant_str, const std::string &bc_id_string)
ArrheniusCatalycityFactoryOldStyle(const std::string &physics_name)

Generated on Tue Dec 19 2017 12:47:27 for GRINS-0.8.0 by  doxygen 1.8.9.1