OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
data_out.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: data_out.h
11 // - Description:
12 // - Developers: M. Secanell
13 // - $Id: data_out.h 2605 2014-08-15 03:36:44Z secanell $
14 //
15 //---------------------------------------------------------------------------
16 
17 #ifndef _FUELCELLSHOP__POSTPROCESSING__DATAOUT_H
18 #define _FUELCELLSHOP__POSTPROCESSING__DATAOUT_H
19 
20 // Include deal.II classes
21 #include <base/parameter_handler.h>
22 #include <base/point.h>
23 #include <base/function.h>
24 #include <lac/vector.h>
25 #include <fe/fe_values.h>
26 #include <numerics/data_out.h>
27 
28 //Include STL
29 #include <cmath>
30 #include <iostream>
31 #include <boost/shared_ptr.hpp>
32 #include <mutex>
33 #include <typeinfo>
34 
35 // Include OpenFCST routines:
38 
39 #include <layers/porous_layer.h>
40 #include <layers/catalyst_layer.h>
43 
44 #include <materials/PureGas.h>
45 
47 
48 using namespace dealii;
49 
50 namespace FuelCellShop
51 {
59  namespace PostProcessing
60  {
61 
100  template <int dim>
102  :
103  public dealii::DataPostprocessor<dim>
104  {
105  public:
106 
108 
109 
113  boost::shared_ptr< FuelCellShop::Layer::CatalystLayer<dim> > ,
119 
125  virtual std::vector<std::string> get_names() const;
126 
130  virtual std::vector<DataComponentInterpretation::DataComponentInterpretation> get_data_component_interpretation () const;
131 
135  virtual UpdateFlags get_needed_update_flags() const;
136 
150  virtual void compute_derived_quantities_vector (const std::vector< Vector< double > > &uh,
151  const std::vector< std::vector< Tensor< 1, dim > > > & /*duh*/,
152  const std::vector< std::vector< Tensor< 2, dim > > > & /*dduh*/,
153  const std::vector< Point< dim > > & /*normals*/,
154  const std::vector< Point<dim> > & /*evaluation_points*/,
155  const types::material_id & mat_id,
156  std::vector< Vector< double > > &computed_quantities) const;
157 
158 
159  private:
163  boost::shared_ptr< FuelCellShop::Layer::CatalystLayer<dim> > catalyst_layer;
164 
169 
174 
181  mutable std::mutex catalyst_layer_mutex;
182  };
183 
184  //-------------------------------------------------------------------------------------------
185  //-------------------------------------------------------------------------------------------
186  //-------------------------------------------------------------------------------------------
187 
227  template <int dim>
229  :
230  public dealii::DataPostprocessor<dim>
231  {
232  public:
233 
235 
236 
240  boost::shared_ptr< FuelCellShop::Layer::CatalystLayer<dim> > ,
246 
252  virtual std::vector<std::string> get_names() const;
253 
257  virtual std::vector<DataComponentInterpretation::DataComponentInterpretation> get_data_component_interpretation () const;
258 
262  virtual UpdateFlags get_needed_update_flags() const;
263 
277  virtual void compute_derived_quantities_vector (const std::vector< Vector< double > > &uh,
278  const std::vector< std::vector< Tensor< 1, dim > > > & /*duh*/,
279  const std::vector< std::vector< Tensor< 2, dim > > > & /*dduh*/,
280  const std::vector< Point< dim > > & /*normals*/,
281  const std::vector< Point<dim> > & /*evaluation_points*/,
282  const types::material_id & mat_id,
283  std::vector< Vector< double > > &computed_quantities) const;
284 
285 
286  private:
290  boost::shared_ptr< FuelCellShop::Layer::CatalystLayer<dim> > catalyst_layer;
291 
296 
301 
308  mutable std::mutex catalyst_layer_mutex;
309  };
310 
311  //-------------------------------------------------------------------------------------------
312  //-------------------------------------------------------------------------------------------
313  //-------------------------------------------------------------------------------------------
314 
360  template <int dim>
362  :
363  public dealii::DataPostprocessorScalar<dim>
364  {
365  public:
366 
368 
369 
373  std::vector< boost::shared_ptr< FuelCellShop::Layer::PorousLayer<dim> > > ,
379 
380 
381  virtual void compute_derived_quantities_vector (const std::vector< Vector< double > > &uh,
382  const std::vector< std::vector< Tensor< 1, dim > > > & /*duh*/,
383  const std::vector< std::vector< Tensor< 2, dim > > > & /*dduh*/,
384  const std::vector< Point< dim > > & /*normals*/,
385  const std::vector< Point<dim> > & /*evaluation_points*/,
386  const types::material_id & mat_id,
387  std::vector< Vector< double > > &computed_quantities) const;
388 
389 
390  private:
391 
396 
401 
405  std::vector< boost::shared_ptr< FuelCellShop::Layer::PorousLayer<dim> > > porous_layers;
406 
411 
412  };
413 
414  //-------------------------------------------------------------------------------------------
415  //-------------------------------------------------------------------------------------------
416  //-------------------------------------------------------------------------------------------
417 
463  template <int dim>
465  :
466  public dealii::DataPostprocessorScalar<dim>
467  {
468  public:
469 
471 
472 
476  std::vector< boost::shared_ptr< FuelCellShop::Layer::PorousLayer<dim> > > pls,
482 
486  virtual UpdateFlags get_needed_update_flags() const;
487 
491  virtual void compute_derived_quantities_vector (const std::vector< Vector< double > > &uh,
492  const std::vector< std::vector< Tensor< 1, dim > > > & /*duh*/,
493  const std::vector< std::vector< Tensor< 2, dim > > > & /*dduh*/,
494  const std::vector< Point< dim > > & /*normals*/,
495  const std::vector< Point<dim> > & /*evaluation_points*/,
496  const types::material_id & mat_id,
497  std::vector< Vector< double > > &computed_quantities) const;
498 
499 
500  private:
505 
509  std::vector< boost::shared_ptr< FuelCellShop::Layer::PorousLayer<dim> > > porous_layers;
510 
515 
516  };
517 
518  }
519 
520 }
521 
522 #endif
std::vector< boost::shared_ptr< FuelCellShop::Layer::PorousLayer< dim > > > porous_layers
Vector of pointer to PorousLayer objects.
Definition: data_out.h:405
Class used to store, read from file and define the operating conditions for a fuel cell...
Definition: operating_conditions.h:110
FuelCell::OperatingConditions * opCond
Pointer to operating conditions class.
Definition: data_out.h:173
FuelCell::SystemManagement * system_management
Pointer to system management.
Definition: data_out.h:168
FuelCell::OperatingConditions * opCond
Pointer to operating conditions class.
Definition: data_out.h:300
FuelCell::SystemManagement * system_management
Pointer to system management.
Definition: data_out.h:400
virtual ~RelativeHumidityDataOut()
Destructor.
Definition: data_out.h:378
boost::shared_ptr< FuelCellShop::Layer::CatalystLayer< dim > > catalyst_layer
Pointer to catalyst layer object.
Definition: data_out.h:163
std::mutex catalyst_layer_mutex
The mutex class used to prevent simultaneous calls to the layer objects from multiple threads...
Definition: data_out.h:308
virtual ~HORCurrentDensityDataOut()
Destructor.
Definition: data_out.h:245
FuelCell::SystemManagement * system_management
Pointer to system management.
Definition: data_out.h:504
FuelCell::OperatingConditions * opCond
Pointer to operating conditions class.
Definition: data_out.h:410
virtual ~CapillaryPressureDataOut()
Destructor.
Definition: data_out.h:481
FuelCellShop::Material::WaterVapor water
WaterVapor object, used to compute saturation pressure as a function of temperature.
Definition: data_out.h:395
boost::shared_ptr< FuelCellShop::Layer::CatalystLayer< dim > > catalyst_layer
Pointer to catalyst layer object.
Definition: data_out.h:290
std::mutex catalyst_layer_mutex
The mutex class used to prevent simultaneous calls to the layer objects from multiple threads...
Definition: data_out.h:181
virtual ~ORRCurrentDensityDataOut()
Destructor.
Definition: data_out.h:118
Class used to evaluate the capillary pressure at PorousLayer (viz., GDL, MPL and CL) DoF point in the...
Definition: data_out.h:464
std::vector< boost::shared_ptr< FuelCellShop::Layer::PorousLayer< dim > > > porous_layers
Vector of pointer to PorousLayer objects.
Definition: data_out.h:509
IMPORTANT: Add all new solution variables and equations here !
Definition: system_management.h:271
FuelCell::SystemManagement * system_management
Pointer to system management.
Definition: data_out.h:295
Virtual class used to implement properties that are characteristic of a porous layer.
Definition: porous_layer.h:65
Class used to evaluate the HOR current density, overpotential and effectiveness at catalyst layer DoF...
Definition: data_out.h:228
Class used to evaluate the ORR current density, overpotential, effectiveness and the oxygen coverages...
Definition: data_out.h:101
FuelCell::OperatingConditions * opCond
Pointer to operating conditions class.
Definition: data_out.h:514
Virtual class used to provide the interface for all CatalystLayer children.
Definition: catalyst_layer.h:130
This class describes properties of pure WaterVapor.
Definition: PureGas.h:1157
Class used to evaluate the relative humidity at PorousLayer (viz., GDL, MPL and CL) DoF point in the ...
Definition: data_out.h:361