OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
app_diffusion.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------
2 //
3 // FCST: Fuel Cell Simulation Toolbox
4 //
5 // Copyright (C) 2013 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_diffusion.h
11 // - Description:
12 // - Developers: M. Sabharwal, M. Secanell, A. Kosakian
13 //
14 //---------------------------------------------------------------------------
15 
16 #ifndef _FUELCELL__APP_DIFFUSION__H
17 #define _FUELCELL__APP_DIFFUSION__H
18 
19 //-- OpenFCST
22 #include <materials/PureGas.h>
23 #include <materials/GasMixture.h>
31 
32 
33 // Use namespace of deal.II
34 using namespace dealii;
35 using namespace FuelCellShop::Equation::DebugTools;
36 
37 namespace FuelCell
38 {
39 
40  namespace Application
41  {
42  //---------------------------------------------------------------------------
43  //---------------------------------------------------------------------------
44  //---------------------------------------------------------------------------
90  template<int dim>
92  {
93  public:
94 
96 
97 
101  AppDiffusion( boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData > data =
102  boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData >() );
103 
107  ~AppDiffusion();
108 
112  virtual void declare_parameters(ParameterHandler& param);
113 
117  virtual void initialize(ParameterHandler& param);
118 
122  virtual void initialize_solution (FEVector& initial_guess,
123  std::shared_ptr<Function<dim> > initial_function = std::shared_ptr<Function<dim> >());
124 
126 
128 
129 
133  virtual void cell_matrix(MatrixVector& cell_matrices,
134  const typename DoFApplication<dim>::CellInfo& cell_info);
135 
139  virtual void cell_residual(FuelCell::ApplicationCore::FEVector& cell_res,
140  const typename DoFApplication<dim>::CellInfo& cell_info);
144  virtual void bdry_matrix(MatrixVector& bdry_matrices,
145  const typename DoFApplication<dim>::FaceInfo& bdry_info);
146 
150  virtual void bdry_residual(FuelCell::ApplicationCore::FEVector& bdry_res,
151  const typename DoFApplication<dim>::FaceInfo& bdry_info);
153 
155 
156 
160  virtual void dirichlet_bc(std::map<unsigned int, double>& boundary_values) const;
161 
165  virtual double evaluate (const FuelCell::ApplicationCore::FEVectors& src);
166 
170  virtual void data_out(const std::string& filename,
171  const FEVectors& src);
172 
174 
176 
177 
181  virtual void bdry_responses(std::vector<double>& dst,
185 
187 
188 
192  unsigned int get_solution_index();
194 
195  protected:
197 
198 
213 
215 
216 
220 
224  boost::shared_ptr<FuelCellShop::Material::PureGas> solute;
225 
226 
227 
231  boost::shared_ptr<FuelCellShop::Material::PureGas> solvent;
232 
233 
235 
237 
238 
241  boost::shared_ptr< FuelCellShop::Layer::GasDiffusionLayer<dim> > CGDL;
242 
244 
246 
247 
254 
255  private:
256 
258 
259 
263 
269 
273  };
274 
275  } // Application
276 
277 } // FuelCell
278 
279 #endif
Class used to store, read from file and define the operating conditions for a fuel cell...
Definition: operating_conditions.h:118
FuelCell::OperatingConditions OC
Operating conditions.
Definition: app_diffusion.h:219
boost::shared_ptr< FuelCellShop::Layer::GasDiffusionLayer< dim > > CGDL
Cathode GDL.
Definition: app_diffusion.h:241
The application can be used to simulate a gas flow through a porous media.
Definition: app_diffusion.h:91
DebugOutput< dim > equation_debug_output
Object for debug output purposes.
Definition: app_diffusion.h:267
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
boost::shared_ptr< FuelCellShop::Material::PureGas > solvent
Solvent.
Definition: app_diffusion.h:231
Definition: equation_auxiliaries.h:81
This simple structure stores certain information regarding a particular variable for the equation (al...
Definition: equation_auxiliaries.h:51
FuelCellShop::Equation::FicksTransportEquation< dim > ficks_transport_equation
This object describes the equations that we are going to solve here.
Definition: app_diffusion.h:252
boost::shared_ptr< FuelCellShop::Material::PureGas > solute
Solute.
Definition: app_diffusion.h:224
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
This class deals with Fick&#39;s Transport Equation.
Definition: ficks_transport_equation.h:132