OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
FuelCellShop::MicroScale::AgglomerateBase Class Referenceabstract

Class that serves as a base class for all agglomerate calculations. More...

#include <agglomerate_base.h>

Inheritance diagram for FuelCellShop::MicroScale::AgglomerateBase:
Inheritance graph
[legend]
Collaboration diagram for FuelCellShop::MicroScale::AgglomerateBase:
Collaboration graph
[legend]

Public Member Functions

 AgglomerateBase ()
 Constructor.
 
virtual ~AgglomerateBase ()
 Destructor.
 
virtual void set_structure (FuelCellShop::Material::CatalystSupportBase *, FuelCellShop::Material::CatalystBase *, FuelCellShop::Material::PolymerElectrolyteBase *, double A, double r, double delta, double epsilon)=0
 Set the composition and structure of the agglomerate.
 
void set_kinetics (FuelCellShop::Kinetics::BaseKinetics *kin)
 
virtual double compute_current (double &E_r)=0
 Main function of the class used to compute the current over the whole agglomerate at the local operating conditions.
 
void set_solution (const std::map< VariableNames, SolutionVariable > &, const VariableNames &, const int &)
 Function for setting the solution variables (reactant concentration, phi_s, phi_m, etc) before we compute current.
 
virtual std::vector< double > compute_derivative_current ()
 Function to compute the derivative of the current density at the local operating conditions;.
 
void set_P (double P_Tot)
 Set the pressure for the agglomerate.
 
void set_T (double Temp)
 Set the temperature for the agglomerate.
 
void setLoadingWeigths (std::vector< double > weigths)
 
void set_conductivity_factor (double temp)
 
bool analytical_derivatives ()
 
void load_initial_guess (std::vector< std::vector< double >> IC)
 
bool guess_not_loaded ()
 
void deep_copy_pointers ()
 

Public Attributes

std::vector< std::vector
< double > > 
results
 
std::vector< std::string > column_titles
 

Protected Member Functions

void setAV (double newAV)
 
double getAV (double location)
 
void setUpLoadings ()
 
void interpolate_initial_data (double z[], double &x, double left_pos, double right_pos, std::vector< double > left_data, std::vector< double > right_data)
 
bool use_initial_data (double z[], double &x)
 

Protected Attributes

double permittivity_0
 
double pi
 
double F
 
double R
 
double P
 
double T
 
std::vector< double > loadingWeigths
 
std::vector< double > actualLoadings
 
std::vector< double > loadingRadii
 
double AV
 
double maxRadialDimension
 
bool IC_loaded
 
bool analyticalDerivatives
 Variable to check if analytical derivatives are implemented.
 
FuelCellShop::Material::CatalystSupportBasecatalyst_support
 Object used to calculate the carbon black conductivity in the catalyst layer.
 
FuelCellShop::Material::CatalystBasecatalyst
 Object used to store the properties of the catalyst used in the layer.
 
FuelCellShop::Material::PolymerElectrolyteBaseelectrolyte
 Object used to calculate the properties of the electrolyte in the catalyst layer.
 
FuelCellShop::Kinetics::BaseKineticskinetics
 Create the kinetics object.
 
std::vector< double > co2_final
 Vector storing the oxygen concentration profile across the agglomerate.
 
std::vector< double > mesh_final
 Vector storing the location of the nodes of the mesh used in the numerical agglomerate.
 
double cond_factor
 Used to modify the proton conductivity in agglomerate.
 
double r_agg
 Radius of the agglomerate.
 
double delta_agg
 Thickness of the ionomer thin film.
 
double epsilon_agg
 Thickness of the ionomer thin film.
 
double c_R
 Concentration of oxygen at the boundary.
 
double phi_M
 Electrolyte (Membrane) phase potential at the boundary.
 
double phi_S
 Solid phase potential through the agglomerate.
 
double interface
 Value of the boundary between the thin film and agglomerate domain.
 
double D_R_N
 Oxygen Diffusion.
 
double H_R_N
 Henry's Constant.
 
double R_tol
 absolute tolerance in reactant concentration
 
std::vector< VariableNamessol_names
 
std::map< VariableNames,
SolutionVariable
solutions
 
VariableNames reactant
 
int sol_index
 
std::vector< std::vector
< double > > 
initial_data
 

Friends

class ::AnalyticalAgglomerateTest
 

Detailed Description

Class that serves as a base class for all agglomerate calculations.

Constructor & Destructor Documentation

FuelCellShop::MicroScale::AgglomerateBase::AgglomerateBase ( )
inline

Constructor.

References Constants::E0(), Constants::F(), F, IC_loaded, maxRadialDimension, permittivity_0, Constants::Pi(), pi, Constants::R(), and R.

Here is the call graph for this function:

virtual FuelCellShop::MicroScale::AgglomerateBase::~AgglomerateBase ( )
inlinevirtual

Destructor.

Member Function Documentation

bool FuelCellShop::MicroScale::AgglomerateBase::analytical_derivatives ( )
inline

References analyticalDerivatives.

virtual double FuelCellShop::MicroScale::AgglomerateBase::compute_current ( double &  E_r)
pure virtual

Main function of the class used to compute the current over the whole agglomerate at the local operating conditions.

Implemented in FuelCellShop::MicroScale::IonomerAgglomerateSun.

virtual std::vector<double> FuelCellShop::MicroScale::AgglomerateBase::compute_derivative_current ( )
inlinevirtual

Function to compute the derivative of the current density at the local operating conditions;.

Reimplemented in FuelCellShop::MicroScale::IonomerAgglomerateSun.

void FuelCellShop::MicroScale::AgglomerateBase::deep_copy_pointers ( )
double FuelCellShop::MicroScale::AgglomerateBase::getAV ( double  location)
protected
bool FuelCellShop::MicroScale::AgglomerateBase::guess_not_loaded ( )
inline

References IC_loaded.

void FuelCellShop::MicroScale::AgglomerateBase::interpolate_initial_data ( double  z[],
double &  x,
double  left_pos,
double  right_pos,
std::vector< double >  left_data,
std::vector< double >  right_data 
)
protected
void FuelCellShop::MicroScale::AgglomerateBase::load_initial_guess ( std::vector< std::vector< double >>  IC)
inline

References IC_loaded, and initial_data.

void FuelCellShop::MicroScale::AgglomerateBase::set_conductivity_factor ( double  temp)
inline

References cond_factor.

void FuelCellShop::MicroScale::AgglomerateBase::set_kinetics ( FuelCellShop::Kinetics::BaseKinetics kin)
inline

References kinetics.

void FuelCellShop::MicroScale::AgglomerateBase::set_P ( double  P_Tot)
inline

Set the pressure for the agglomerate.

References P.

void FuelCellShop::MicroScale::AgglomerateBase::set_solution ( const std::map< VariableNames, SolutionVariable > &  ,
const VariableNames ,
const int &   
)

Function for setting the solution variables (reactant concentration, phi_s, phi_m, etc) before we compute current.

virtual void FuelCellShop::MicroScale::AgglomerateBase::set_structure ( FuelCellShop::Material::CatalystSupportBase ,
FuelCellShop::Material::CatalystBase ,
FuelCellShop::Material::PolymerElectrolyteBase ,
double  A,
double  r,
double  delta,
double  epsilon 
)
pure virtual

Set the composition and structure of the agglomerate.

Implemented in FuelCellShop::MicroScale::IonomerAgglomerateSun.

void FuelCellShop::MicroScale::AgglomerateBase::set_T ( double  Temp)
inline

Set the temperature for the agglomerate.

References T.

void FuelCellShop::MicroScale::AgglomerateBase::setAV ( double  newAV)
inlineprotected

References AV.

void FuelCellShop::MicroScale::AgglomerateBase::setLoadingWeigths ( std::vector< double >  weigths)
inline

References loadingWeigths.

void FuelCellShop::MicroScale::AgglomerateBase::setUpLoadings ( )
protected
bool FuelCellShop::MicroScale::AgglomerateBase::use_initial_data ( double  z[],
double &  x 
)
protected

Friends And Related Function Documentation

friend class ::AnalyticalAgglomerateTest
friend

Member Data Documentation

std::vector<double> FuelCellShop::MicroScale::AgglomerateBase::actualLoadings
protected
bool FuelCellShop::MicroScale::AgglomerateBase::analyticalDerivatives
protected

Variable to check if analytical derivatives are implemented.

Referenced by analytical_derivatives().

double FuelCellShop::MicroScale::AgglomerateBase::AV
protected

Referenced by setAV().

double FuelCellShop::MicroScale::AgglomerateBase::c_R
protected

Concentration of oxygen at the boundary.

FuelCellShop::Material::CatalystBase* FuelCellShop::MicroScale::AgglomerateBase::catalyst
protected

Object used to store the properties of the catalyst used in the layer.

FuelCellShop::Material::CatalystSupportBase* FuelCellShop::MicroScale::AgglomerateBase::catalyst_support
protected

Object used to calculate the carbon black conductivity in the catalyst layer.

std::vector<double> FuelCellShop::MicroScale::AgglomerateBase::co2_final
protected

Vector storing the oxygen concentration profile across the agglomerate.

Used for to ensure the numerical agglomerate matches the analytical agglomerate.

std::vector<std::string> FuelCellShop::MicroScale::AgglomerateBase::column_titles
double FuelCellShop::MicroScale::AgglomerateBase::cond_factor
protected

Used to modify the proton conductivity in agglomerate.

Referenced by set_conductivity_factor().

double FuelCellShop::MicroScale::AgglomerateBase::D_R_N
protected

Oxygen Diffusion.

double FuelCellShop::MicroScale::AgglomerateBase::delta_agg
protected

Thickness of the ionomer thin film.

FuelCellShop::Material::PolymerElectrolyteBase* FuelCellShop::MicroScale::AgglomerateBase::electrolyte
protected

Object used to calculate the properties of the electrolyte in the catalyst layer.

In this case we assume is Nafion.

double FuelCellShop::MicroScale::AgglomerateBase::epsilon_agg
protected

Thickness of the ionomer thin film.

double FuelCellShop::MicroScale::AgglomerateBase::F
protected

Referenced by AgglomerateBase().

double FuelCellShop::MicroScale::AgglomerateBase::H_R_N
protected

Henry's Constant.

bool FuelCellShop::MicroScale::AgglomerateBase::IC_loaded
protected
std::vector< std::vector<double> > FuelCellShop::MicroScale::AgglomerateBase::initial_data
protected

Referenced by load_initial_guess().

double FuelCellShop::MicroScale::AgglomerateBase::interface
protected

Value of the boundary between the thin film and agglomerate domain.

FuelCellShop::Kinetics::BaseKinetics* FuelCellShop::MicroScale::AgglomerateBase::kinetics
protected

Create the kinetics object.

Referenced by set_kinetics().

std::vector<double> FuelCellShop::MicroScale::AgglomerateBase::loadingRadii
protected
std::vector<double> FuelCellShop::MicroScale::AgglomerateBase::loadingWeigths
protected

Referenced by setLoadingWeigths().

double FuelCellShop::MicroScale::AgglomerateBase::maxRadialDimension
protected

Referenced by AgglomerateBase().

std::vector<double> FuelCellShop::MicroScale::AgglomerateBase::mesh_final
protected

Vector storing the location of the nodes of the mesh used in the numerical agglomerate.

This can then be passed to the analytical agglomerate so that the oxygen concentration can be found at the same locations.

double FuelCellShop::MicroScale::AgglomerateBase::P
protected

Referenced by set_P().

double FuelCellShop::MicroScale::AgglomerateBase::permittivity_0
protected

Referenced by AgglomerateBase().

double FuelCellShop::MicroScale::AgglomerateBase::phi_M
protected

Electrolyte (Membrane) phase potential at the boundary.

double FuelCellShop::MicroScale::AgglomerateBase::phi_S
protected

Solid phase potential through the agglomerate.

double FuelCellShop::MicroScale::AgglomerateBase::pi
protected

Referenced by AgglomerateBase().

double FuelCellShop::MicroScale::AgglomerateBase::R
protected

Referenced by AgglomerateBase().

double FuelCellShop::MicroScale::AgglomerateBase::r_agg
protected

Radius of the agglomerate.

double FuelCellShop::MicroScale::AgglomerateBase::R_tol
protected

absolute tolerance in reactant concentration

VariableNames FuelCellShop::MicroScale::AgglomerateBase::reactant
protected
std::vector<std::vector<double> > FuelCellShop::MicroScale::AgglomerateBase::results
int FuelCellShop::MicroScale::AgglomerateBase::sol_index
protected
std::vector<VariableNames> FuelCellShop::MicroScale::AgglomerateBase::sol_names
protected
std::map<VariableNames, SolutionVariable> FuelCellShop::MicroScale::AgglomerateBase::solutions
protected
double FuelCellShop::MicroScale::AgglomerateBase::T
protected

Referenced by set_T().


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