OpenFCST: The open-source Fuel Cell Simulation Toolbox
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
fcst
include
equations
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: ficks_transport_equation.h
11
// - Description: Base Catalyst Layer Class. It implements the interface for other catalyst layer class
12
// and some common methods.
13
// - Developers: M. Secanell
14
// - $Id: ficks_transport_equation.h 1354 2013-08-17 00:01:22Z secanell $
15
//
16
//---------------------------------------------------------------------------
17
18
#ifndef dimension
19
#if deal_II_dimension == 1
20
#define _1D_
21
#elif deal_II_dimension == 2
22
#define _2D_
23
#elif deal_II_dimension == 3
24
#define _3D_
25
#endif
26
#endif
27
28
#ifndef _FCST_FUELCELLSHOP_EQUATION_FICKS_EQUATION_H_
29
#define _FCST_FUELCELLSHOP_EQUATION_FICKS_EQUATION_H_
30
31
// FCST includes
32
#include "
equation_base.h
"
33
#include "
fcst_constants.h
"
34
#include "
gas_diffusion_layer.h
"
35
#include "
SGL_24_BA.h
"
36
#include "
micro_porous_layer.h
"
37
#include "
SGL_24_BC.h
"
38
#include "
catalyst_layer.h
"
39
40
// Appframe includes
41
#include "
appframe/matrix_shop_cell.h
"
42
43
// STD
44
#include <sstream>
45
#include <string>
46
47
namespace
FuelCellShop
48
{
49
namespace
Equation
50
{
51
63
template
<
int
dim>
64
class
FicksTransportEquation
:
public
EquationBase
<dim>
65
{
66
public
:
67
72
FicksTransportEquation
(
FuelCell::SystemManagement
&
system_management
);
73
77
FicksTransportEquation
(
FuelCell::SystemManagement
& system_management,
78
FuelCellShop::Material::PureGas
* solute,
79
FuelCellShop::Material::PureGas
*
solvent
);
80
87
inline
void
set_solute_and_solvent
(
FuelCellShop::Material::PureGas
* solute,
FuelCellShop::Material::PureGas
* solvent1 )
88
{
89
this->
gas
= solute;
90
this->solvent = solvent1;
91
92
std::stringstream s;
93
s <<
"Ficks Transport Equation - "
<<
gas
->
get_name
();
94
this->
name_equation
= s.str();
95
96
std::stringstream ss;
97
ss <<
gas
->
get_name
()<<
"_molar_fraction"
;
98
this->
name_solution
= ss.str();
99
}
100
104
virtual
~FicksTransportEquation
();
105
109
virtual
void
declare_parameters
(ParameterHandler& param);
110
114
virtual
void
initialize
(ParameterHandler& param);
115
119
virtual
void
assemble_cell_matrix
(
AppFrame::MatrixVector
& cell_matrices,
120
const
typename
AppFrame::DoFApplication<dim>::CellInfo
& cell_info,
121
FuelCellShop::Layer::BaseLayer<dim>
*
const
layer);
122
126
virtual
void
assemble_bdry_matrix
(
AppFrame::MatrixVector
& bdry_matrices,
127
const
typename
AppFrame::DoFApplication<dim>::FaceInfo
& bdry_info,
128
FuelCellShop::Layer::BaseLayer<dim>
*
const
layer){};
129
133
virtual
void
assemble_cell_residual
(
AppFrame::FEVector
& cell_rhs,
134
const
typename
AppFrame::DoFApplication<dim>::CellInfo
& cell_info,
135
FuelCellShop::Layer::BaseLayer<dim>
*
const
layer);
136
140
virtual
void
assemble_bdry_residual
(
AppFrame::FEVector
& bdry_rhs,
141
const
typename
AppFrame::DoFApplication<dim>::FaceInfo
& bdry_info,
142
FuelCellShop::Layer::BaseLayer<dim>
*
const
layer){};
143
149
virtual
const
couplings_map
&
get_internal_cell_couplings
()
const
150
{
151
return
internal_cell_couplings
;
152
}
153
158
virtual
void
print_equation_info
()
const
;
159
162
DeclException1
(GasDoesNotExistInGDL,
163
std::string,
164
<<
"Gas "
<< arg1 <<
" does not exist in the Gas diffusion layer"
);
165
171
void
class_test
();
172
173
protected
:
177
FuelCellShop::Material::PureGas
*
gas
;
182
FuelCellShop::Material::PureGas
*
solvent
;
187
std::string
name_equation
;
192
std::string
name_solution
;
199
virtual
void
make_internal_cell_couplings
();
200
205
couplings_map
internal_cell_couplings
;
206
214
std::vector<unsigned int>
matrix_block_indices
;
215
223
std::vector<unsigned int>
component_indices
;
224
};
225
226
}
// Equation
227
228
}
// FuelCellShop
229
230
#endif
Generated on Fri Aug 30 2013 17:15:54 for OpenFCST: The open-source Fuel Cell Simulation Toolbox by
1.8.2