OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
response_ohmic_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_ohmic_heat.h
11 // - Description: This is header file for electronic and protonic ohmic heat response evaluator classes.
12 // - Developers: Madhur Bhaiya
13 // - $Id:
14 //
15 // ----------------------------------------------------------------------------
16 
17 #ifndef _FUELCELLSHOP__RESPONSE_OHMIC_HEAT_H
18 #define _FUELCELLSHOP__RESPONSE_OHMIC_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"
43 #include "layers/membrane_layer.h"
44 
46 
47 using namespace dealii;
48 
49 namespace FuelCellShop
50 {
51 
52  namespace PostProcessing
53  {
54 
121  template <int dim>
123  {
124  public:
126 
129  :
130  BaseResponse<dim>(sm),
131  thermal_equation(tte),
132  factor_GDL(0),
133  factor_MPL(0),
134  factor_CL(0)
135  {}
136 
138 
144  void initialize(ParameterHandler& param);
145 
147 
149 
157  void compute_responses(const typename DoFApplication<dim>::CellInfo& info,
159  std::map<FuelCellShop::PostProcessing::ResponsesNames, double>& respMap) const;
160 
167  void compute_responses(std::vector< FuelCellShop::SolutionVariable > solution_variables,
168  const typename DoFApplication<dim>::CellInfo& info,
170  std::map<FuelCellShop::PostProcessing::ResponsesNames, double>& respMap) const
171  {
172  throw std::runtime_error("ElectronOhmicHeatResponse::compute_responses(solution_variables, info, layer, respMap) not implemented");
173  }
175  //
176  private:
181 
187 
191  unsigned int factor_GDL;
192 
196  unsigned int factor_MPL;
197 
201  unsigned int factor_CL;
202  };
203 
204 
205  //===============================================================================================================
206  //===============================================================================================================
207  //===============================================================================================================
208  //===============================================================================================================
209 
210 
277  template <int dim>
279  {
280  public:
282 
285  :
286  BaseResponse<dim>(sm),
287  thermal_equation(tte),
288  factor_CL(0),
289  factor_ML(0)
290  {}
291 
293 
299  void initialize(ParameterHandler& param);
300 
302 
304 
312  void compute_responses(const typename DoFApplication<dim>::CellInfo& info,
314  std::map<FuelCellShop::PostProcessing::ResponsesNames, double>& respMap) const;
321  void compute_responses(std::vector< FuelCellShop::SolutionVariable > solution_variables,
322  const typename DoFApplication<dim>::CellInfo& info,
324  std::map<FuelCellShop::PostProcessing::ResponsesNames, double>& respMap) const
325  {
326  throw std::runtime_error("ProtonOhmicHeatResponse::compute_responses(solution_variables, info, layer, respMap) not implemented");
327  }
329  //
330  private:
335 
341 
347 
353 
357  unsigned int factor_CL;
358 
362  unsigned int factor_ML;
363  };
364  }
365 }
366 
367 #endif
FuelCellShop::Equation::VariableInfo tRev
VariableInfo structure corresponding to the &quot;temperature_of_REV&quot;.
Definition: response_ohmic_heat.h:352
const unsigned int dim
Definition: fcst_constants.h:24
ElectronOhmicHeatResponse(const FuelCell::SystemManagement &sm, const FuelCellShop::Equation::ThermalTransportEquation< dim > *tte)
Definition: response_ohmic_heat.h:127
const FuelCellShop::Equation::ThermalTransportEquation< dim > * thermal_equation
Pointer to ThermalTransportEquation object.
Definition: response_ohmic_heat.h:334
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_ohmic_heat.h:167
unsigned int factor_CL
Factor is 1 if electronic ohmic heating in CL is enabled, else 0.
Definition: response_ohmic_heat.h:201
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_ohmic_heat.h:321
Class used to calculate the protonic ohmic heat generated in the proton conducting layers...
Definition: response_ohmic_heat.h:278
~ProtonOhmicHeatResponse()
Definition: response_ohmic_heat.h:292
This class deals with Thermal Transport Equation.
Definition: thermal_transport_equation.h:190
Virtual class used to develop a common interface to a set of functions used to evaluate functionals t...
Definition: base_response.h:129
ProtonOhmicHeatResponse(const FuelCell::SystemManagement &sm, const FuelCellShop::Equation::ThermalTransportEquation< dim > *tte)
Definition: response_ohmic_heat.h:283
This class is created for the objects handed to the mesh loops.
Definition: mesh_loop_info_objects.h:625
unsigned int factor_CL
Factor is 1 if protonic ohmic heating in CL is enabled, else 0.
Definition: response_ohmic_heat.h:357
FuelCellShop::Equation::VariableInfo phiM
VariableInfo structure corresponding to the &quot;protonic_electrical_potential&quot;.
Definition: response_ohmic_heat.h:340
FuelCellShop::Equation::VariableInfo phiS
VariableInfo structure corresponding to the &quot;electronic_electrical_potential&quot;.
Definition: response_ohmic_heat.h:186
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 lambda
VariableInfo structure corresponding to the &quot;membrane_water_content&quot;.
Definition: response_ohmic_heat.h:346
unsigned int factor_GDL
Factor is 1 if electronic ohmic heating in GDL is enabled, else 0.
Definition: response_ohmic_heat.h:191
Class used to calculate the electronic ohmic heat generated in the electron conducting layers...
Definition: response_ohmic_heat.h:122
unsigned int factor_MPL
Factor is 1 if electronic ohmic heating in MPL is enabled, else 0.
Definition: response_ohmic_heat.h:196
unsigned int factor_ML
Factor is 1 if protonic ohmic heating in Membrane is enabled, else 0.
Definition: response_ohmic_heat.h:362
const FuelCellShop::Equation::ThermalTransportEquation< dim > * thermal_equation
Pointer to ThermalTransportEquation object.
Definition: response_ohmic_heat.h:180
Virtual class used to characterize a generic layer interface.
Definition: base_layer.h:58
~ElectronOhmicHeatResponse()
Definition: response_ohmic_heat.h:137