OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
new_ficks_transport_equation.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: new_ficks_transport_equation.h
11 // - Description: Header file of Ficks diffusion equation class.
12 // - Developers: M. Secanell and Madhur Bhaiya
13 // - $Id: new_ficks_transport_equation.h 1460 2013-08-30 22:28:49Z madhur $
14 //
15 //---------------------------------------------------------------------------
16 
17 #ifndef _FCST_FUELCELLSHOP_EQUATION_NEW_FICKS_EQUATION_H_
18 #define _FCST_FUELCELLSHOP_EQUATION_NEW_FICKS_EQUATION_H_
19 
20 // FCST includes
21 #include "fcst_units.h"
22 #include "fcst_constants.h"
23 #include "equation_base.h"
24 #include "gas_diffusion_layer.h"
25 #include "micro_porous_layer.h"
26 #include "catalyst_layer.h"
27 
28 // STD
29 #include <sstream>
30 #include <string>
31 
32 namespace FuelCellShop
33 {
34  namespace Equation
35  {
124  template<int dim>
126  :
127  public EquationBase<dim>
128  {
129  public:
131 
132 
141 
148 
152  virtual ~NewFicksTransportEquation();
153 
157  virtual void declare_parameters(ParameterHandler& param);
158 
162  virtual void initialize(ParameterHandler& param);
163 
171  {
172  this->gas = solute;
173  this->solvent = solvent1;
174 
175  std::stringstream s;
176  s <<"Ficks Transport Equation - "<<gas->get_name();
177  this->equation_name = s.str();
178 
179  std::stringstream ss;
180  ss <<gas->get_name()<<"_molar_fraction";
181  this->name_base_variable = ss.str();
182  }
183 
185 
187 
188 
191  virtual void assemble_cell_matrix(AppFrame::MatrixVector& cell_matrices,
192  const typename AppFrame::DoFApplication<dim>::CellInfo& cell_info,
194 
200  virtual void assemble_bdry_matrix(AppFrame::MatrixVector& bdry_matrices,
201  const typename AppFrame::DoFApplication<dim>::FaceInfo& bdry_info,
202  FuelCellShop::Layer::BaseLayer<dim>* const layer){};
203 
207  virtual void assemble_cell_residual(AppFrame::FEVector& cell_rhs,
208  const typename AppFrame::DoFApplication<dim>::CellInfo& cell_info,
210 
217  const typename AppFrame::DoFApplication<dim>::FaceInfo& bdry_info,
218  FuelCellShop::Layer::BaseLayer<dim>* const layer){};
219 
221 
223 
224 
228  virtual void print_equation_info() const;
229 
235  void class_test();
236 
237  protected:
239 
240 
244  std::vector<unsigned int> dirichlet_bdry_ids;
245 
247 
248 
249 
255 
264  virtual void make_assemblers_cell_constant_data(const typename AppFrame::DoFApplication<dim>::CellInfo& cell_info);
265 
277 
284 
292  FuelCellShop::Layer::BaseLayer<dim>* const layer){};
293 
295 
297 
298 
303  virtual void make_internal_cell_couplings();
304 
309  virtual void make_boundary_types();
310 
312 
314 
315 
319  std::string name_base_variable;
320 
325 
331 
337 
342 
344 
346 
347 
352  std::vector< Tensor< 2, dim > > conc_Deff_cell;
353 
361  std::vector< std::vector<double> > phi_xi_cell;
362 
370  std::vector< std::vector< Tensor<1,dim> > > grad_phi_xi_cell;
371 
379  std::vector< std::vector< Tensor<1,dim> > > grad_phi_T_cell;
381 
386  unsigned int last_iter_cell;
387 
388  };
389 
390 } // Equation
391 
392 } // FuelCellShop
393 
394 #endif