OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
app_capillary_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_CAPILLARY_TESTING_H_
19 #define _FCST_APPLICATION_APP_CAPILLARY_TESTING_H_
20 
21 //-- OpenFCST
25 
26 #include <materials/PureGas.h>
27 #include <materials/GasMixture.h>
28 #include <materials/platinum.h>
29 #include <materials/nafion.h>
30 #include <materials/carbon.h>
31 
34 #include <layers/catalyst_layer.h>
35 
39 
40 
48 
49 using namespace dealii;
50 using namespace FuelCell::ApplicationCore;
51 
52 namespace FuelCell
53 {
54  //---------------------------------------------------------------------------
55  //---------------------------------------------------------------------------
56  //---------------------------------------------------------------------------
57  namespace Application
58  {
59 
60  template<int dim>
62  {
63  public:
64 
66 
67 
71  CapillaryTesting( boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData > data =
72  boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData >() );
73 
78 
82  virtual void declare_parameters(ParameterHandler& param);
83 
87  virtual void initialize(ParameterHandler& param);
88 
94  virtual void initialize_solution (FEVector& initial_guess,
95  std::shared_ptr<Function<dim> > initial_function = std::shared_ptr<Function<dim> >());
96 
98 
100 
101 
105  virtual void cell_matrix(MatrixVector& cell_matrices,
106  const typename DoFApplication<dim>::CellInfo& cell_info);
107 
111  virtual void cell_residual(FuelCell::ApplicationCore::FEVector& cell_res,
112  const typename DoFApplication<dim>::CellInfo& cell_info);
113 
117  virtual void bdry_matrix(FuelCell::ApplicationCore::MatrixVector& bdry_matrices,
118  const typename DoFApplication<dim>::FaceInfo& bdry_info);
119 
123  virtual void bdry_residual(FuelCell::ApplicationCore::FEVector& bdry_vector,
124  const typename DoFApplication<dim>::FaceInfo& bdry_info);
125 
127 
129 
130 
134  virtual void dirichlet_bc(std::map<unsigned int, double>& boundary_values) const;
135 
139  virtual double evaluate (const FuelCell::ApplicationCore::FEVectors& src);
140 
144  virtual void data_out(const std::string& filename,
145  const FEVectors& src);
146 
148 
150 
151 
155  virtual void cell_responses(std::vector<double>& dst,
156  const typename DoFApplication<dim>::CellInfo& cell_info,
157  const FEVector&);
161  void global_responses(std::vector<double>& resp,
162  const FuelCell::ApplicationCore::FEVector& /*src*/);
163 
165 
166  protected:
168 
169 
172  boost::shared_ptr< FuelCellShop::Geometry::GridBase<dim> > grid;
174 
175 
176 
178 
179 
183 
184 
186 
188 
189 
192  boost::shared_ptr< FuelCellShop::Layer::GasDiffusionLayer<dim> > CGDL;
193 
197  boost::shared_ptr< FuelCellShop::Layer::MicroPorousLayer<dim> > CMPL;
198 
202  boost::shared_ptr< FuelCellShop::Layer::CatalystLayer<dim> > CCL;
204 
206 
207 
209 
210 
211 
213 
214  private:
218  virtual void cell_responses_aux(std::vector<double>& dst,
219  const typename DoFApplication<dim>::CellInfo& cell_info,
220  const FEVector&);
221 
222 
223  };
224 
225  } // Application
226 
227 } // FuelCell
228 
229 #endif
boost::shared_ptr< FuelCellShop::Geometry::GridBase< dim > > grid
Grid.
Definition: app_capillary_testing.h:172
Class used to store, read from file and define the operating conditions for a fuel cell...
Definition: operating_conditions.h:118
FuelCellShop::Equation::CapillaryPressureEquation< dim > capillary_transport
Definition: app_capillary_testing.h:208
FuelCell::OperatingConditions OC
Operating conditions.
Definition: app_capillary_testing.h:182
boost::shared_ptr< FuelCellShop::Layer::MicroPorousLayer< dim > > CMPL
Cathode MPL.
Definition: app_capillary_testing.h:197
boost::shared_ptr< FuelCellShop::Layer::CatalystLayer< dim > > CCL
Cathode CL.
Definition: app_capillary_testing.h:202
Definition: capillary_transport_equation.h:38
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_capillary_testing.h:61
boost::shared_ptr< FuelCellShop::Layer::GasDiffusionLayer< dim > > CGDL
Cathode GDL.
Definition: app_capillary_testing.h:192
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