OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
response_water_capillary.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 //
3 // FCST: Fuel Cell Simulation Toolbox
4 //
5 // Copyright (C) 2014 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: response_water_capillary.h
11 // - Description: This is a file used to output the capillary pressure related responses.
12 // - Developers: J.Zhou and M. Secanell 2015 University of Alberta
13 //
14 // ----------------------------------------------------------------------------
15 
16 #ifndef _FUELCELLSHOP__RESPONSE_WATER_CAPILLARY_H
17 #define _FUELCELLSHOP__RESPONSE_WATER_CAPILLARY_H
18 
19 //Include STL
20 #include <cmath>
21 #include <iostream>
22 #include <exception> // std::exception
23 
24 // Include OpenFCST routines:
27 
29 #include <materials/PureLiquid.h>
30 #include <layers/base_layer.h>
31 #include <layers/catalyst_layer.h>
33 
35 #include <utils/fcst_units.h>
36 #include <utils/fcst_constants.h>
37 
38 using namespace dealii;
39 
40 namespace FuelCellShop
41 {
49  namespace PostProcessing
50  {
58  template <int dim>
59  class PhaseChangeResponse : public BaseResponse<dim>
60  {
61  public:
63 
65  :
66  BaseResponse<dim>(sm)
67  {}
68 
70 
74  void declare_parameters(ParameterHandler& param) const;
78  void initialize(ParameterHandler& param);
80 
82 
90  void compute_responses(const typename DoFApplication<dim>::CellInfo& info,
92  std::map<FuelCellShop::PostProcessing::ResponsesNames, double>& resp) const;
98  void compute_responses(std::vector< FuelCellShop::SolutionVariable > solution_variables,
99  const typename DoFApplication<dim>::CellInfo& info,
101  std::map<FuelCellShop::PostProcessing::ResponsesNames, double>& resp) const;
102  //
103  //
104  private:
110 
116 
122 
127 
132  };
133 
141  template <int dim>
142  class BoundaryLiquidResponse : public BaseBoundaryResponse<dim>
143  {
144  public:
146 
148  :
149  BaseBoundaryResponse<dim>(sm)
150  {}
151 
153 
157  void declare_parameters(ParameterHandler& param) const;
161  void initialize(ParameterHandler& param);
163 
165 
184  void compute_responses(const typename DoFApplication<dim>::FaceInfo& bdry_info,
186  std::map<FuelCellShop::PostProcessing::ResponsesNames, double>& resp) const;
192  void compute_responses(std::vector< FuelCellShop::SolutionVariable > solution_variables,
193  const typename DoFApplication<dim>::FaceInfo& bdry_info,
194  std::map<FuelCellShop::PostProcessing::ResponsesNames, double>& resp) const;
195  //
196  //
197  private:
208  };
209 
218  template <int dim>
219  class BoundaryVaporResponse : public BaseBoundaryResponse<dim>
220  {
221  public:
223 
225  :
226  BaseBoundaryResponse<dim>(sm)
227  {}
228 
230 
234  void declare_parameters(ParameterHandler& param) const;
238  void initialize(ParameterHandler& param);
240 
242 
261  void compute_responses(const typename DoFApplication<dim>::FaceInfo& bdry_info,
263  std::map<FuelCellShop::PostProcessing::ResponsesNames, double>& resp) const;
269  void compute_responses(std::vector< FuelCellShop::SolutionVariable > solution_variables,
270  const typename DoFApplication<dim>::FaceInfo& bdry_info,
271  std::map<FuelCellShop::PostProcessing::ResponsesNames, double>& resp) const;
272  //
273  //
274  private:
290  };
291  }
292 }
293 #endif
~PhaseChangeResponse()
Definition: response_water_capillary.h:69
const unsigned int dim
Definition: fcst_constants.h:23
BoundaryVaporResponse(const FuelCell::SystemManagement &sm)
Definition: response_water_capillary.h:224
FuelCellShop::Equation::VariableInfo x_water
VariableInfo structure corresponding to the vapor phase potential.
Definition: response_water_capillary.h:279
double evaporation_rate_constant
Evaporation rate of liquid water.
Definition: response_water_capillary.h:126
PhaseChangeResponse(const FuelCell::SystemManagement &sm)
Definition: response_water_capillary.h:64
FuelCellShop::Equation::VariableInfo t_rev
VariableInfo structure corresponding to the temperature.
Definition: response_water_capillary.h:109
Virtual class used to develop a common interface to a set of functions used to evaluate functionals t...
Definition: base_response.h:131
BoundaryLiquidResponse(const FuelCell::SystemManagement &sm)
Definition: response_water_capillary.h:147
Class used to calculate the boundary liquid flux through the boundaries (GDL) in the MEA model...
Definition: response_water_capillary.h:142
This class is created for the objects handed to the mesh loops.
Definition: mesh_loop_info_objects.h:544
double condensation_rate_constant
Condensation rate of liquid water.
Definition: response_water_capillary.h:131
FuelCellShop::Equation::VariableInfo x_water
VariableInfo structure corresponding to the water vapor.
Definition: response_water_capillary.h:121
~BoundaryLiquidResponse()
Definition: response_water_capillary.h:152
FuelCellShop::Equation::VariableInfo p_liquid_water
VariableInfo structure corresponding to the capillary pressure.
Definition: response_water_capillary.h:115
Class used to calculate the boundary vapor flux through the boundaries (GDL) in the MEA model...
Definition: response_water_capillary.h:219
FuelCellShop::Equation::VariableInfo t_rev
VariableInfo structure corresponding to the temperature.
Definition: response_water_capillary.h:289
FuelCellShop::Equation::VariableInfo t_rev
VariableInfo structure corresponding to the temperature.
Definition: response_water_capillary.h:207
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
~BoundaryVaporResponse()
Definition: response_water_capillary.h:229
FuelCellShop::Equation::VariableInfo p_liquid_water
VariableInfo structure corresponding to the capillary pressure.
Definition: response_water_capillary.h:284
Virtual class used to characterize a generic layer interface.
Definition: base_layer.h:58
FuelCellShop::Equation::VariableInfo p_liquid_water
VariableInfo structure corresponding to the capillary pressure.
Definition: response_water_capillary.h:202
Class used to calculate the evaporated liquid water in CCL.
Definition: response_water_capillary.h:59