OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
app_thermal_testing.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 //
3 // FCST: Fuel Cell Simulation Toolbox
4 //
5 // Copyright (C) 2006-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: app_cathode.h
11 // - Description: This class describes diffusion in fuel cell cathodes
12 // Ficks, one gas
13 // - Developers: Marc Secanell, University of Alberta
14 // Valentin N. Zingan, University of Alberta
15 //
16 // ----------------------------------------------------------------------------
17 
18 #ifndef _FCST_APPLICATION_APP_THERMAL_TESTING_H_
19 #define _FCST_APPLICATION_APP_THERMAL_TESTING_H_
20 
21 #include "boost/shared_ptr.hpp"
22 
23 // Include FuelCell classes
24 #include "grid/geometry.h"
25 
27 #include "system_management.h"
28 
30 
31 #include "materials/PureGas.h"
32 #include "materials/GasMixture.h"
33 #include "materials/platinum.h"
34 #include "materials/nafion.h"
35 #include "materials/carbon.h"
36 
39 #include "layers/catalyst_layer.h"
40 
42 #include "sorption_source_terms.h"
43 
44 
45 #include "solvers/linear_solvers.h"
48 
49 
50 // Postprocessing
57 
58 using namespace dealii;
59 using namespace FuelCell::ApplicationCore;
60 
61 namespace FuelCell
62 {
63  //---------------------------------------------------------------------------
64  //---------------------------------------------------------------------------
65  //---------------------------------------------------------------------------
66  namespace Application
67  {
68 
69  template<int dim>
71  {
72  public:
73 
75 
76 
80  Thermaltesting( boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData > data =
81  boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData >() );
82 
86  ~Thermaltesting();
87 
91  virtual void declare_parameters(ParameterHandler& param);
92 
96  virtual void initialize(ParameterHandler& param);
97 
103  virtual void initialize_solution (FEVector& initial_guess,
104  std::shared_ptr<Function<dim> > initial_function = std::shared_ptr<Function<dim> >());
105 
107 
109 
110 
114  virtual void cell_matrix(MatrixVector& cell_matrices,
115  const typename DoFApplication<dim>::CellInfo& cell_info);
116 
120  virtual void cell_residual(FuelCell::ApplicationCore::FEVector& cell_res,
121  const typename DoFApplication<dim>::CellInfo& cell_info);
122 
126  virtual void bdry_matrix(FuelCell::ApplicationCore::MatrixVector& bdry_matrices,
127  const typename DoFApplication<dim>::FaceInfo& bdry_info);
128 
132  virtual void bdry_residual(FuelCell::ApplicationCore::FEVector& bdry_vector,
133  const typename DoFApplication<dim>::FaceInfo& bdry_info);
134 
136 
138 
139 
143  virtual void dirichlet_bc(std::map<unsigned int, double>& boundary_values) const;
144 
148  virtual double evaluate (const FuelCell::ApplicationCore::FEVectors& src);
149 
153  virtual void data_out(const std::string& filename,
154  const FEVectors& src);
155 
157 
159 
160 
164  virtual void cell_responses(std::vector<double>& dst,
165  const typename DoFApplication<dim>::CellInfo& cell_info,
166  const FEVector&);
170  void global_responses(std::vector<double>& resp,
171  const FuelCell::ApplicationCore::FEVector& /*src*/);
172 
174 
175  protected:
177 
178 
181  boost::shared_ptr< FuelCellShop::Geometry::GridBase<dim> > grid;
183 
184 
185 
187 
188 
192 
193 
195 
197 
198 
201  boost::shared_ptr< FuelCellShop::Layer::GasDiffusionLayer<dim> > CGDL;
202 
206  boost::shared_ptr< FuelCellShop::Layer::MicroPorousLayer<dim> > CMPL;
207 
211  boost::shared_ptr< FuelCellShop::Layer::CatalystLayer<dim> > CCL;
213 
215 
216 
218 
219 
220 
222 
223  private:
227  virtual void cell_responses_aux(std::vector<double>& dst,
228  const typename DoFApplication<dim>::CellInfo& cell_info,
229  const FEVector&);
230 
231 
232  };
233 
234  } // Application
235 
236 } // FuelCell
237 
238 #endif
Class used to store, read from file and define the operating conditions for a fuel cell...
Definition: operating_conditions.h:118
boost::shared_ptr< FuelCellShop::Layer::GasDiffusionLayer< dim > > CGDL
Cathode GDL.
Definition: app_thermal_testing.h:201
This class deals with Thermal Transport Equation.
Definition: thermal_transport_equation.h:187
boost::shared_ptr< FuelCellShop::Layer::CatalystLayer< dim > > CCL
Cathode CL.
Definition: app_thermal_testing.h:211
This class is created for the objects handed to the mesh loops.
Definition: mesh_loop_info_objects.h:544
std::vector< MatrixBlock< FullMatrix< double > > > MatrixVector
The matrix vector used in the mesh loops.
Definition: matrix_block.h:102
Definition: app_thermal_testing.h:70
boost::shared_ptr< FuelCellShop::Layer::MicroPorousLayer< dim > > CMPL
Cathode MPL.
Definition: app_thermal_testing.h:206
FuelCellShop::Equation::ThermalTransportEquation< dim > thermal_transport
Definition: app_thermal_testing.h:217
FuelCell::OperatingConditions OC
Operating conditions.
Definition: app_thermal_testing.h:191
BlockVector< double > FEVector
The vector class used by applications.
Definition: application_data.h:46
The data type used in function calls of Application.
Definition: fe_vectors.h:59
Application handling matrices and assembling the linear system to solve the sensitivity equations...
Definition: optimization_block_matrix_application.h:49
boost::shared_ptr< FuelCellShop::Geometry::GridBase< dim > > grid
Grid.
Definition: app_thermal_testing.h:181