OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
FuelCellShop::PostProcessing::ORRCurrentDensityDataOut< dim > Class Template Reference

Class used to evaluate the ORR current density, overpotential, effectiveness and the oxygen coverages (when applicable) at catalyst layer DoF point in the finite element mesh. More...

#include <data_out.h>

Inheritance diagram for FuelCellShop::PostProcessing::ORRCurrentDensityDataOut< dim >:
Inheritance graph
[legend]
Collaboration diagram for FuelCellShop::PostProcessing::ORRCurrentDensityDataOut< dim >:
Collaboration graph
[legend]

Constructors, destructor, and initalization

boost::shared_ptr
< FuelCellShop::Layer::CatalystLayer
< dim > > 
catalyst_layer
 Pointer to catalyst layer object. More...
 
FuelCell::SystemManagementsystem_management
 Pointer to system management. More...
 
FuelCell::OperatingConditionsopCond
 Pointer to operating conditions class. More...
 
std::mutex catalyst_layer_mutex
 The mutex class used to prevent simultaneous calls to the layer objects from multiple threads. More...
 
std::string oxygen_density_name
 Set oxygen concentration name. More...
 
 ORRCurrentDensityDataOut (FuelCell::SystemManagement *, boost::shared_ptr< FuelCellShop::Layer::CatalystLayer< dim > >, FuelCell::OperatingConditions *)
 Constructor of our class. More...
 
virtual ~ORRCurrentDensityDataOut ()
 Destructor. More...
 
virtual std::vector< std::string > get_names () const
 Function that provides the names of the output variables. More...
 
virtual std::vector
< DataComponentInterpretation::DataComponentInterpretation > 
get_data_component_interpretation () const
 Function that states if the output functions are a scalar or a vector. More...
 
virtual UpdateFlags get_needed_update_flags () const
 Flags to be updated in each cell when computing the solution. More...
 
void set_oxygen_density_name (std::string name)
 For the case of multi-component solvers, we need to specify which one of the variables contains the oxygen concentration, e.g., density_species_1, density_species_2 and so on. More...
 
virtual void compute_derived_quantities_vector (const std::vector< Vector< double > > &uh, const std::vector< std::vector< Tensor< 1, dim > > > &, const std::vector< std::vector< Tensor< 2, dim > > > &, const std::vector< Point< dim > > &, const std::vector< Point< dim > > &, const types::material_id &mat_id, std::vector< Vector< double > > &computed_quantities) const
 Member function used to calculate the current density. More...
 

Detailed Description

template<int dim>
class FuelCellShop::PostProcessing::ORRCurrentDensityDataOut< dim >

Class used to evaluate the ORR current density, overpotential, effectiveness and the oxygen coverages (when applicable) at catalyst layer DoF point in the finite element mesh.

Child of DataPostprocessor (deal.II post-processing class used in DataOut class).

See step-29, step-32 and step-33 in the deal.II website for more details about this class.

Usage

This class is used in the data_out section of any application. It requires a pointer to SystemManagement, a pointer to the catalyst layer object for which you would like to compute the current density, and a pointer to OperatingConditions object.

* AppCathode<dim>::data_out(const std::string& filename,
*
* // --- Find solution and assign solution interpretations ---
* (...)
*
* // --- Create vector of PostProcessing objects ---
* std::vector< DataPostprocessor<dim>* > PostProcessing;
*
* // --- cathode_current --- For instance, on CCL object.
* // Create the post processing object and push it to the vector.
* PostProcessing.push_back(&cathode_current);
*
* // Outputting
* DoFApplication<dim>::data_out(filename,
* solution, // This is initialized in the initial part of the data_out function
* PostProcessing);
*
Author
M. Secanell, 2014

Constructor & Destructor Documentation

Constructor of our class.

Destructor.

Member Function Documentation

template<int dim>
virtual void FuelCellShop::PostProcessing::ORRCurrentDensityDataOut< dim >::compute_derived_quantities_vector ( const std::vector< Vector< double > > &  uh,
const std::vector< std::vector< Tensor< 1, dim > > > &  ,
const std::vector< std::vector< Tensor< 2, dim > > > &  ,
const std::vector< Point< dim > > &  ,
const std::vector< Point< dim > > &  ,
const types::material_id &  mat_id,
std::vector< Vector< double > > &  computed_quantities 
) const
virtual

Member function used to calculate the current density.

Its inputs are

  • a vector representing values of the function (which is here vector-valued) representing the data vector given to DataOut::add_data_vector, evaluated at all evaluation points where we generate output
  • a tensor objects representing the first derivative (not used and not given properly since in the constructor we specified that only solution values need to be updated)

The derived quantities are returned in the computed_quantities vector.

Remember that this function may only use data for which the respective update flag is specified by either the constructor or get_needed_update_flags.

template<int dim>
virtual std::vector<DataComponentInterpretation::DataComponentInterpretation> FuelCellShop::PostProcessing::ORRCurrentDensityDataOut< dim >::get_data_component_interpretation ( ) const
virtual

Function that states if the output functions are a scalar or a vector.

template<int dim>
virtual std::vector<std::string> FuelCellShop::PostProcessing::ORRCurrentDensityDataOut< dim >::get_names ( ) const
virtual

Function that provides the names of the output variables.

In this case, current density, overpotential, effectiveness, and oxygen coverages (if applicable). The latter is set to one if the model is macro-homogeneous.

template<int dim>
virtual UpdateFlags FuelCellShop::PostProcessing::ORRCurrentDensityDataOut< dim >::get_needed_update_flags ( ) const
virtual

Flags to be updated in each cell when computing the solution.

template<int dim>
void FuelCellShop::PostProcessing::ORRCurrentDensityDataOut< dim >::set_oxygen_density_name ( std::string  name)
inline

For the case of multi-component solvers, we need to specify which one of the variables contains the oxygen concentration, e.g., density_species_1, density_species_2 and so on.

Provide this value here.

Member Data Documentation

template<int dim>
boost::shared_ptr< FuelCellShop::Layer::CatalystLayer<dim> > FuelCellShop::PostProcessing::ORRCurrentDensityDataOut< dim >::catalyst_layer
private

Pointer to catalyst layer object.

template<int dim>
std::mutex FuelCellShop::PostProcessing::ORRCurrentDensityDataOut< dim >::catalyst_layer_mutex
mutableprivate

The mutex class used to prevent simultaneous calls to the layer objects from multiple threads.

Note
The mutable keywork is used since this data member needs to be modified in a const function (the function needs to be const because of deal.ii)

Pointer to operating conditions class.

template<int dim>
std::string FuelCellShop::PostProcessing::ORRCurrentDensityDataOut< dim >::oxygen_density_name
private

Set oxygen concentration name.

Pointer to system management.


The documentation for this class was generated from the following file: