antioch-0.4.0
reaction_parsing.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // Antioch - A Gas Dynamics Thermochemistry Library
5 //
6 // Copyright (C) 2014-2016 Paul T. Bauman, Benjamin S. Kirk,
7 // Sylvain Plessis, Roy H. Stonger
8 //
9 // Copyright (C) 2013 The PECOS Development Team
10 //
11 // This library is free software; you can redistribute it and/or
12 // modify it under the terms of the Version 2.1 GNU Lesser General
13 // Public License as published by the Free Software Foundation.
14 //
15 // This library is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
23 // Boston, MA 02110-1301 USA
24 //
25 //-----------------------------------------------------------------------el-
26 
27 #ifndef ANTIOCH_REACTION_PARSING_H
28 #define ANTIOCH_REACTION_PARSING_H
29 
30 //Antioch
32 #include "antioch/reaction.h"
38 
39 namespace Antioch
40 {
41 
42  template<typename CoeffType>
43  Reaction<CoeffType>* build_reaction( const unsigned int n_species,
44  const std::string& equation,
45  const bool &reversible,
46  const ReactionType::ReactionType& type ,
47  const KineticsModel::KineticsModel& kin );
48 
49 // ----------------------
50 
51  template<typename CoeffType>
52  inline
53  Reaction<CoeffType>* build_reaction( const unsigned int n_species,
54  const std::string& equation,
55  const bool &reversible,
56  const ReactionType::ReactionType& type ,
57  const KineticsModel::KineticsModel& kin )
58  {
59  Reaction<CoeffType>* reaction = NULL;
60 
61  switch(type)
62  {
64  {
65  reaction = new ElementaryReaction<CoeffType>(n_species,equation,reversible,kin);
66  }
67  break;
68 
70  {
71  reaction = new DuplicateReaction<CoeffType>(n_species,equation,reversible,kin);
72  }
73  break;
74 
76  {
77  reaction = new ThreeBodyReaction<CoeffType>(n_species,equation,reversible,kin);
78  }
79  break;
80 
82  {
83  reaction = new FalloffReaction<CoeffType,LindemannFalloff<CoeffType> >(n_species,equation,reversible,type,kin);
84  }
86  {
87  reaction = new FalloffReaction<CoeffType,TroeFalloff<CoeffType> >(n_species,equation,reversible,type,kin);
88  }
89  break;
90 
92  {
93  reaction = new FalloffThreeBodyReaction<CoeffType,LindemannFalloff<CoeffType> >(n_species,equation,reversible,type,kin);
94  }
96  {
97  reaction = new FalloffThreeBodyReaction<CoeffType,TroeFalloff<CoeffType> >(n_species,equation,reversible,type,kin);
98  }
99  break;
100 
101  default:
102  {
103  antioch_error();
104  }
105 
106  } // switch(type)
107 
108  // Dummy
109  return reaction;
110  }
111 
112 } // end namespace Antioch
113 
114 #endif // ANTIOCH_REACTION_PARSING_H
Base class for falloff processes coupled with efficiencies.
A single reaction mechanism.
Definition: reaction.h:64
#define antioch_error()
Base class for falloff processes.
A single reaction mechanism.
A single reaction mechanism.
The parameters are reduced parameters.
Reaction< CoeffType > * build_reaction(const unsigned int n_species, const std::string &equation, const bool &reversible, const ReactionType::ReactionType &type, const KineticsModel::KineticsModel &kin)

Generated on Thu Jul 7 2016 11:09:45 for antioch-0.4.0 by  doxygen 1.8.8