OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
proton_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: proton_transport_equation.h
11 // - Description: Equation class for Proton Transport (using Ohm's law)
12 // - Developers: Madhur Bhaiya and M. Secanell
13 // - Id: $Id: proton_transport_equation.h 1372 2013-08-20 21:46:44Z madhur $
14 //
15 //---------------------------------------------------------------------------
16 
17 #ifndef _FCST_FUELCELLSHOP_EQUATION_PROTON_TRANSPORT_EQUATION_H_
18 #define _FCST_FUELCELLSHOP_EQUATION_PROTON_TRANSPORT_EQUATION_H_
19 
20 // FCST includes
21 #include "utils/fcst_utilities.h"
22 #include "utils/fcst_constants.h"
23 
25 
26 #include "layers/catalyst_layer.h"
27 #include "layers/membrane_layer.h"
28 
29 
30 // STD
31 #include <sstream>
32 #include <string>
33 
34 namespace FuelCellShop
35 {
36  namespace Equation
37  {
133  template<int dim>
135  {
136  public:
137 
139 
140 
145 
149  virtual ~ProtonTransportEquation();
150 
154  virtual void declare_parameters(ParameterHandler& param) const;
155 
159  virtual void initialize(ParameterHandler& param);
160 
162 
163 
165 
168  virtual void assemble_cell_matrix(AppFrame::MatrixVector& cell_matrices,
169  const typename AppFrame::DoFApplication<dim>::CellInfo& cell_info,
171 
175  virtual void assemble_cell_residual(AppFrame::FEVector& cell_rhs,
176  const typename AppFrame::DoFApplication<dim>::CellInfo& cell_info,
178 
182  virtual void assemble_bdry_matrix(AppFrame::MatrixVector& bdry_matrices,
183  const typename AppFrame::DoFApplication<dim>::FaceInfo& bdry_info,
185 
189  virtual void assemble_bdry_residual(AppFrame::FEVector& bdry_rhs,
190  const typename AppFrame::DoFApplication<dim>::FaceInfo& bdry_info,
192 
194 
196 
197 
201  virtual void print_equation_info() const;
202 
207  inline std::map<unsigned int, double> get_dirichlet_bdry_map() const
208  {
209  return dirichlet_bdry_map;
210  }
211 
216  void class_test();
218 
219  protected:
221 
222 
227  std::map<unsigned int, double> dirichlet_bdry_map;
228 
233  std::map<unsigned int, double> proton_current_flux_map;
234 
236 
238 
239 
245 
254  virtual void make_assemblers_cell_constant_data(const typename AppFrame::DoFApplication<dim>::CellInfo& cell_info);
255 
264  virtual void make_assemblers_bdry_constant_data(const typename AppFrame::DoFApplication<dim>::FaceInfo& bdry_info);
265 
272 
279 
281 
283 
284 
289  virtual void make_internal_cell_couplings();
290 
295  virtual void make_boundary_types();
296 
301  virtual void make_output_types()
302  {};
303 
305 
307 
308 
314  const std::string name_base_variable;
315 
320 
325 
330 
332 
334 
335 
340  std::vector<double> sigmaMeff_cell;
341 
347  std::vector<double> dsigmaMeff_dT_cell;
348 
354  std::vector<double> dsigmaMeff_dlambda_cell;
355 
363  std::vector< std::vector<double> > phi_phiM_cell;
364 
372  std::vector< std::vector< Tensor<1,dim> > > grad_phi_phiM_cell;
373 
381  std::vector< std::vector< Tensor<1,dim> > > grad_phi_T_cell;
382 
390  std::vector< std::vector< Tensor<1,dim> > > grad_phi_lambda_cell;
391 
393 
395 
396 
402  std::vector<double> dsigmaMeff_dT_bdry;
403 
409  std::vector<double> dsigmaMeff_dlambda_bdry;
410 
418  std::vector< std::vector<double> > phi_phiM_bdry;
419 
427  std::vector< std::vector<double> > phi_lambda_bdry;
428 
436  std::vector< std::vector<double> > phi_T_bdry;
437 
439 
445 
451 
456  unsigned int last_iter_cell;
457 
462  unsigned int last_iter_bdry;
463 
464  };
465  } // Equation
466 } // FuelCellShop
467 
468 #endif