OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lambda_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: lambda_transport_equation.h
11 // - Description: Equation class for Lambda Transport (using Springer Model + Thermal Osmosis)
12 // - Developers: Marc Secanell, Madhur Bhaiya, Valentin N. Zingan
13 //
14 //---------------------------------------------------------------------------
15 
16 #ifndef _FCST_FUELCELLSHOP_EQUATION_LAMBDA_TRANSPORT_EQUATION_H_
17 #define _FCST_FUELCELLSHOP_EQUATION_LAMBDA_TRANSPORT_EQUATION_H_
18 
20 
21 #include <layers/catalyst_layer.h>
22 #include <layers/membrane_layer.h>
23 
24 // STD
25 #include <sstream>
26 #include <string>
27 
28 namespace FuelCellShop
29 {
30  namespace Equation
31  {
127  template<int dim>
129  {
130  public:
131 
133 
134 
138  LambdaTransportEquation(FuelCell::SystemManagement& system_management,boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData > data =
139  boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData >());
140 
144  virtual ~LambdaTransportEquation();
145 
149  virtual void declare_parameters(ParameterHandler& param) const;
150 
154  virtual void initialize(ParameterHandler& param);
155 
157 
160 
166 
173 
180  FuelCellShop::Layer::BaseLayer<dim>* const layer){};
181 
188  FuelCellShop::Layer::BaseLayer<dim>* const layer){};
189 
191 
193 
194 
198  virtual void print_equation_info() const;
199 
201 
202  protected:
203 
205 
206 
211 
213 
215 
216 
222 
232 
244 
251 
259  FuelCellShop::Layer::BaseLayer<dim>* const layer){};
260 
262 
264 
265 
270  virtual void make_internal_cell_couplings();
271 
278  virtual void make_boundary_types(){};
279 
286  virtual void make_output_types()
287  {};
288 
290 
292 
293 
298 
303 
308 
312  double F;
313 
317  double M_water;
318 
320 
322 
323 
327  double rho_dry_cell;
328 
332  double EW_cell;
333 
337  std::vector<double> nDrag_cell;
338 
343  std::vector<double> dnDrag_dlambda_cell;
344 
349  std::vector<double> sigmaMeff_cell;
350 
356  std::vector<double> dsigmaMeff_dT_cell;
357 
363  std::vector<double> dsigmaMeff_dlambda_cell;
364 
369  std::vector<double> Dlambdaeff_cell;
370 
376  std::vector<double> dDlambdaeff_dT_cell;
377 
383  std::vector<double> dDlambdaeff_dlambda_cell;
384 
389  std::vector<double> DTeff_cell;
390 
396  std::vector<double> dDTeff_dT_cell;
397 
405  std::vector< std::vector<double> > phi_lambda_cell;
406 
414  std::vector< std::vector< Tensor<1,dim> > > grad_phi_lambda_cell;
415 
423  std::vector< std::vector< double > > phi_T_cell;
424 
432  std::vector< std::vector< Tensor<1,dim> > > grad_phi_T_cell;
433 
441  std::vector< std::vector< Tensor<1,dim> > > grad_phi_phiM_cell;
442 
444 
450 
455  unsigned int last_iter_cell;
456 
457  };
458  } // Equation
459 } // FuelCellShop
460 
461 #endif
std::vector< double > nDrag_cell
Electro-osmotic drag coefficient, at all quadrature points in the cell.
Definition: lambda_transport_equation.h:337
double rho_dry_cell
Density [gm/cm^3] of the dry polymer electrolyte material in the cell.
Definition: lambda_transport_equation.h:327
std::vector< std::vector< double > > phi_lambda_cell
shape functions.
Definition: lambda_transport_equation.h:405
virtual void make_boundary_types()
This function fills out boundary_types.
Definition: lambda_transport_equation.h:278
boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData > data
Data object for the application data to be passed to the equation classes.
Definition: equation_base.h:890
unsigned int last_iter_cell
Variable used to store the index in cell_info-&gt;global_data of the previous Newton solution The soluti...
Definition: lambda_transport_equation.h:455
std::vector< double > DTeff_cell
Effecive thermo-osmotic diffusion coefficient [gm/(cm-s-K)], at all quadrature points in the cell...
Definition: lambda_transport_equation.h:389
virtual void assemble_bdry_residual(FuelCell::ApplicationCore::FEVector &bdry_rhs, const typename FuelCell::ApplicationCore::DoFApplication< dim >::FaceInfo &bdry_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
Assemble local boundary residual.
Definition: lambda_transport_equation.h:186
std::vector< double > Dlambdaeff_cell
Effecive lambda (sorbed water) diffusivity [cm^2/s], at all quadrature points in the cell...
Definition: lambda_transport_equation.h:369
std::vector< std::vector< Tensor< 1, dim > > > grad_phi_T_cell
shape function gradients.
Definition: lambda_transport_equation.h:432
std::vector< double > dsigmaMeff_dlambda_cell
Derivative of effective protonic conductivity w.r.t.
Definition: lambda_transport_equation.h:363
std::vector< double > dDTeff_dT_cell
Derivative of effective thermo-osmotic diffusion coefficient w.r.t.
Definition: lambda_transport_equation.h:396
virtual void assemble_cell_matrix(FuelCell::ApplicationCore::MatrixVector &cell_matrices, const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
Assemble local cell matrix.
FuelCell::SystemManagement * system_management
Pointer to the external YourApplication&lt;dim&gt;::system_management object.
Definition: equation_base.h:798
virtual void make_assemblers_bdry_variable_data(const typename FuelCell::ApplicationCore::DoFApplication< dim >::FaceInfo &bdry_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
This function computes Local CG FEM based assemblers - variable data (boundary) .
Definition: lambda_transport_equation.h:258
virtual void print_equation_info() const
The function prints out the equation&#39;s info.
bool cell_residual_counter
Counter set to TRUE when cell_residual is being assembled.
Definition: lambda_transport_equation.h:449
std::vector< double > dnDrag_dlambda_cell
Derivative of electro-osmotic drag coefficient w.r.t.
Definition: lambda_transport_equation.h:343
This class deals with Membrane Water Content Transport Equation.
Definition: lambda_transport_equation.h:128
double F
Universal Faraday&#39;s constant.
Definition: lambda_transport_equation.h:312
virtual void make_output_types()
This function fills out output_types.
Definition: lambda_transport_equation.h:286
std::vector< std::vector< double > > phi_T_cell
shape functions.
Definition: lambda_transport_equation.h:423
bool flag_thermoosmosis
Flag to indicate that lambda (sorbed water) transport by Thermo-osmosis is ON or OFF.
Definition: lambda_transport_equation.h:210
LambdaTransportEquation(FuelCell::SystemManagement &system_management, boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData > data=boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData >())
Constructor.
virtual void make_internal_cell_couplings()
This function fills out internal_cell_couplings.
This class is created for the objects handed to the mesh loops.
Definition: mesh_loop_info_objects.h:544
std::vector< double > dDlambdaeff_dlambda_cell
Derivative of effective lambda diffusivity w.r.t.
Definition: lambda_transport_equation.h:383
std::vector< MatrixBlock< FullMatrix< double > > > MatrixVector
The matrix vector used in the mesh loops.
Definition: matrix_block.h:102
virtual void make_assemblers_cell_constant_data(const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info)
This function computes Local CG FEM based assemblers - constant data (cell) and allocates the memor...
std::vector< double > dDlambdaeff_dT_cell
Derivative of effective lambda diffusivity w.r.t.
Definition: lambda_transport_equation.h:376
std::vector< double > sigmaMeff_cell
Effective proton conductivity [S/cm], at all quadrature points of the cell.
Definition: lambda_transport_equation.h:349
std::vector< double > dsigmaMeff_dT_cell
Derivative of effective protonic conductivity w.r.t &quot;temperature_of_REV&quot;, at all quadrature points in...
Definition: lambda_transport_equation.h:356
virtual void initialize(ParameterHandler &param)
Initialize parameters.
std::vector< std::vector< Tensor< 1, dim > > > grad_phi_lambda_cell
shape function gradients.
Definition: lambda_transport_equation.h:414
virtual void make_assemblers_generic_constant_data()
This function computes Local CG FEM based assemblers - constant data (generic).
VariableInfo t_rev
VariableInfo structure corresponding to &quot;temperature_of_REV&quot;.
Definition: lambda_transport_equation.h:307
This is the base class used for all Equation classes.
Definition: equation_base.h:160
virtual void assemble_cell_residual(FuelCell::ApplicationCore::FEVector &cell_rhs, const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
Assemble local cell residual.
VariableInfo lambda
VariableInfo structure corresponding to &quot;membrane_water_content&quot;.
Definition: lambda_transport_equation.h:302
IMPORTANT: Add all new solution variables and equations here !
Definition: system_management.h:300
This simple structure stores certain information regarding a particular variable for the equation (al...
Definition: equation_auxiliaries.h:51
virtual void assemble_bdry_matrix(FuelCell::ApplicationCore::MatrixVector &bdry_matrices, const typename FuelCell::ApplicationCore::DoFApplication< dim >::FaceInfo &bdry_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
Assemble local boundary matrix.
Definition: lambda_transport_equation.h:178
double M_water
Molar weight of water in grams/mole.
Definition: lambda_transport_equation.h:317
virtual void make_assemblers_cell_variable_data(const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
This function computes Local CG FEM based assemblers - variable data (cell) .
double EW_cell
Equivalent weight of the polymer electrolyte material in the cell.
Definition: lambda_transport_equation.h:332
BlockVector< double > FEVector
The vector class used by applications.
Definition: application_data.h:46
std::vector< std::vector< Tensor< 1, dim > > > grad_phi_phiM_cell
shape function gradients.
Definition: lambda_transport_equation.h:441
virtual void make_assemblers_bdry_constant_data(const typename FuelCell::ApplicationCore::DoFApplication< dim >::FaceInfo &bdry_info)
This function computes Local CG FEM based assemblers - constant data (boundary) and allocates the m...
Definition: lambda_transport_equation.h:243
Virtual class used to characterize a generic layer interface.
Definition: base_layer.h:58
VariableInfo phi_m
VariableInfo structure corresponding to &quot;protonic_electrical_potential&quot;.
Definition: lambda_transport_equation.h:297
virtual void declare_parameters(ParameterHandler &param) const
Declare parameters.