OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
response_reaction_heat.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 //
3 // FCST: Fuel Cell Simulation Toolbox
4 //
5 // Copyright (C) 2014 by Energy Systems Design Laboratory, University of Alberta
6 //
7 // This software is distributed under the MIT License
8 // For more information, see the README file in /doc/LICENSE
9 //
10 // - Class: response_reaction_heat.h
11 // - Description: This is header file for response class computing heat generated due to electrochemical reactions.
12 // - Developers: Madhur Bhaiya
13 // - $Id:
14 //
15 // ----------------------------------------------------------------------------
16 
17 #ifndef _FUELCELLSHOP__RESPONSE_REACTION_HEAT_H
18 #define _FUELCELLSHOP__RESPONSE_REACTION_HEAT_H
19 
20 // Include deal.II classes
21 #include <base/parameter_handler.h>
22 #include <base/point.h>
23 #include <base/function.h>
24 #include <lac/vector.h>
25 #include <fe/fe_values.h>
26 
27 //Include STL
28 #include <cmath>
29 #include <iostream>
30 #include <exception> // std::exception
31 
32 // Include OpenFCST routines:
35 
38 
39 #include "layers/base_layer.h"
40 #include "layers/catalyst_layer.h"
41 
43 
44 using namespace dealii;
45 
46 namespace FuelCellShop
47 {
48 
49  namespace PostProcessing
50  {
51 
118  template <int dim>
120  {
121  public:
123 
126  :
127  BaseResponse<dim>(sm),
128  reaction_source(rst),
129  reaction_heat(NULL)
130  {}
131 
133  {
134  delete reaction_heat;
135  }
136 
142  void initialize(ParameterHandler& param);
143 
145 
147 
166  void compute_responses(const typename DoFApplication<dim>::CellInfo& info,
168  std::map<FuelCellShop::PostProcessing::ResponsesNames, double>& respMap) const;
169 
176  void compute_responses(std::vector< FuelCellShop::SolutionVariable > solution_variables,
177  const typename DoFApplication<dim>::CellInfo& info,
179  std::map<FuelCellShop::PostProcessing::ResponsesNames, double>& respMap) const
180  {
181  throw std::runtime_error("ORRReactionHeatResponse::compute_responses(solution_variables, info, layer, respMap) not implemented");
182  }
184  //
185  private:
190 
195 
201 
207 
213 
219 
225  };
226 
227 
228  //===============================================================================================================
229  //===============================================================================================================
230  //===============================================================================================================
231  //===============================================================================================================
232 
233 
299  template <int dim>
301  {
302  public:
304 
307  :
308  BaseResponse<dim>(sm),
309  reaction_source(rst),
310  reaction_heat(NULL)
311  {}
312 
314  {
315  delete reaction_heat;
316  }
317 
323  void initialize(ParameterHandler& param);
324 
326 
328 
344  void compute_responses(const typename DoFApplication<dim>::CellInfo& info,
346  std::map<FuelCellShop::PostProcessing::ResponsesNames, double>& respMap) const;
347 
354  void compute_responses(std::vector< FuelCellShop::SolutionVariable > solution_variables,
355  const typename DoFApplication<dim>::CellInfo& info,
357  std::map<FuelCellShop::PostProcessing::ResponsesNames, double>& respMap) const
358  {
359  throw std::runtime_error("HORReactionHeatResponse::compute_responses(solution_variables, info, layer, respMap) not implemented");
360  }
362  //
363  private:
368 
373 
379 
385 
391 
397 
403 
409  };
410  }
411 }
412 
413 #endif
const unsigned int dim
Definition: fcst_constants.h:24
FuelCellShop::Equation::ReactionHeat * reaction_heat
Pointer to ReactionHeat object.
Definition: response_reaction_heat.h:200
FuelCellShop::Kinetics::BaseKinetics * kinetics
Pointer to BaseKinetics object.
Definition: response_reaction_heat.h:372
Class used to calculate the heat generated due to HOR inside the anode catalyst layer.
Definition: response_reaction_heat.h:300
~HORReactionHeatResponse()
Definition: response_reaction_heat.h:313
FuelCellShop::Equation::VariableInfo tRev
VariableInfo structure corresponding to the &quot;temperature_of_REV&quot;.
Definition: response_reaction_heat.h:408
FuelCellShop::Equation::VariableInfo phiS
VariableInfo structure corresponding to the &quot;electronic_electrical_potential&quot;.
Definition: response_reaction_heat.h:212
const FuelCellShop::Equation::ReactionSourceTerms< dim > * reaction_source
Pointer to ReactionSourceTerms object.
Definition: response_reaction_heat.h:189
Virtual class used to develop a common interface to a set of functions used to evaluate functionals t...
Definition: base_response.h:129
FuelCellShop::Equation::VariableInfo xWater
VariableInfo structure corresponding to the &quot;water_molar_fraction&quot;.
Definition: response_reaction_heat.h:390
This class is created for the objects handed to the mesh loops.
Definition: mesh_loop_info_objects.h:625
~ORRReactionHeatResponse()
Definition: response_reaction_heat.h:132
const FuelCellShop::Equation::ReactionSourceTerms< dim > * reaction_source
Pointer to ReactionSourceTerms object.
Definition: response_reaction_heat.h:367
Class used to calculate the heat generated due to ORR inside the cathode catalyst layer...
Definition: response_reaction_heat.h:119
void compute_responses(std::vector< FuelCellShop::SolutionVariable > solution_variables, const typename DoFApplication< dim >::CellInfo &info, FuelCellShop::Layer::BaseLayer< dim > *const layer, std::map< FuelCellShop::PostProcessing::ResponsesNames, double > &respMap) const
Routine used in order to compute the response with a modified solution (not the one stored in CellInf...
Definition: response_reaction_heat.h:176
Virtual class used to provide the interface for all kinetic/reaction children.
Definition: base_kinetics.h:107
FuelCellShop::Kinetics::BaseKinetics * kinetics
Pointer to BaseKinetics object.
Definition: response_reaction_heat.h:194
FuelCellShop::Equation::VariableInfo tRev
VariableInfo structure corresponding to the &quot;temperature_of_REV&quot;.
Definition: response_reaction_heat.h:224
This class assembles the reaction source terms for all other transport equations, if there&#39;s any...
Definition: reaction_source_terms.h:60
FuelCellShop::Equation::VariableInfo phiS
VariableInfo structure corresponding to the &quot;electronic_electrical_potential&quot;.
Definition: response_reaction_heat.h:396
IMPORTANT: Add all new solution variables and equations here !
Definition: system_management.h:271
This simple structure stores certain information regarding a particular variable for the equation (al...
Definition: equation_base.h:121
FuelCellShop::Equation::VariableInfo xOxygen
VariableInfo structure corresponding to the &quot;oxygen_molar_fraction&quot;.
Definition: response_reaction_heat.h:206
FuelCellShop::Equation::VariableInfo phiM
VariableInfo structure corresponding to the &quot;protonic_electrical_potential&quot;.
Definition: response_reaction_heat.h:218
FuelCellShop::Equation::ReactionHeat * reaction_heat
Pointer to ReactionHeat object.
Definition: response_reaction_heat.h:378
Virtual class used to characterize a generic layer interface.
Definition: base_layer.h:58
HORReactionHeatResponse(const FuelCell::SystemManagement &sm, const FuelCellShop::Equation::ReactionSourceTerms< dim > *rst)
Definition: response_reaction_heat.h:305
This class is used to compute non-linear reaction heat source terms in a catalyst layer...
Definition: reaction_heat.h:94
FuelCellShop::Equation::VariableInfo phiM
VariableInfo structure corresponding to the &quot;protonic_electrical_potential&quot;.
Definition: response_reaction_heat.h:402
void compute_responses(std::vector< FuelCellShop::SolutionVariable > solution_variables, const typename DoFApplication< dim >::CellInfo &info, FuelCellShop::Layer::BaseLayer< dim > *const layer, std::map< FuelCellShop::PostProcessing::ResponsesNames, double > &respMap) const
Routine used in order to compute the response with a modified solution (not the one stored in CellInf...
Definition: response_reaction_heat.h:354
FuelCellShop::Equation::VariableInfo xHydrogen
VariableInfo structure corresponding to the &quot;hydrogen_molar_fraction&quot;.
Definition: response_reaction_heat.h:384
ORRReactionHeatResponse(const FuelCell::SystemManagement &sm, const FuelCellShop::Equation::ReactionSourceTerms< dim > *rst)
Definition: response_reaction_heat.h:124