OpenFCST: The open-source Fuel Cell Simulation Toolbox
|
This application is used to compute the polarization curve for a given fuel cell model. More...
#include <polarization_curve.h>
Public Member Functions | |
PolarizationCurve () | |
Constructor. More... | |
~PolarizationCurve () | |
void | declare_parameters (ParameterHandler ¶m) const |
Declare all parameters that are needed for: More... | |
void | initialize (ParameterHandler ¶m) |
Read parameters from file. More... | |
Public Member Functions inherited from FuelCell::ParametricStudy< dim > | |
ParametricStudy () | |
Constructor. More... | |
~ParametricStudy () | |
void | declare_parameters (ParameterHandler &) const |
void | initialize (ParameterHandler &) |
Read parameters from file. More... | |
void | run (ParameterHandler ¶m, std::string simulator_parameter_file_name, boost::shared_ptr< SimulationSelector< dim > > sim_selector) |
Run a full polarization curve run. More... | |
Private Member Functions | |
void | set_parameters (ParameterHandler ¶m, const shared_ptr< FuelCell::ApplicationCore::AdaptiveRefinement< dim > > &solver, const int iteration, const std::vector< std::string > parameter_name, const std::vector< double > param_value) |
Modify cell voltage and any other parameters that you would like to modify with respect to the inital input file. More... | |
void | print_parameters () const |
Print parameters: More... | |
void | print_parameteric_study_header () |
Print polarization curve header into a file. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from FuelCell::ParametricStudy< dim > | |
void | run_point (ParameterHandler ¶m, const std::string simulator_parameter_file_name, const boost::shared_ptr< SimulationSelector< dim > > sim_selector, const int iteration, const std::vector< std::string > parameter_name, const std::vector< double > param_value, std::map< std::string, double > &functionals) |
Run a single point in the polarization curve and return the current density and any other data. More... | |
void | print_iteration_info (const unsigned int iteration, const double param_value) const |
void | print_iteration_info (const unsigned int iteration, const std::vector< double > param_value) const |
void | register_data (const double, std::map< std::string, double > &functionals) |
Store the value of the current density in the solution. More... | |
Protected Attributes inherited from FuelCell::ParametricStudy< dim > | |
std::string | parameter_filename |
Variable where the output file to store parameteric study results is stored. More... | |
std::vector< std::string > | parameter_name |
String that defines the parameter that we would like to modify The parameter should be of the from. More... | |
double | p_init |
Initial value to run the parametric study, in the units specified for the value. More... | |
double | p_end |
Final parameter value used in the parameteric study. More... | |
double | dp |
Spacing between points in the parameteric study. More... | |
std::vector< std::vector < double > > | p_values |
Another way to define the sequence of parameter values is to use the vector p_values instead of variables p_init , p_end , and dp . More... | |
bool | adaptive |
Set to true if you would like to reduce the voltage increment adaptively if convergence could not be achieved with the larger value. More... | |
double | min_dp |
int | n_dpPts |
bool | convergence |
Convergence of the solution. More... | |
std::vector< std::vector < double > > | curve |
Map used to store the parametric study data. More... | |
std::ofstream | myfile |
File object for output logging. More... | |
std::vector< std::string > | name_responses |
int | n_resp |
const unsigned int | max_num_parameters = 10 |
Set the maximum number of parameters that you can alter in a Parametric Study. More... | |
FuelCell::ApplicationCore::FEVector | coarse_solution |
Vector used to store the solution from the previous iteration if convergence has been achieved. More... | |
This application is used to compute the polarization curve for a given fuel cell model.
This class reads the linear and a nonlinear applications to be used from the parameter file and uses them in order to obtain a polarization curve for the given application.
Note that this is a specific implementation of the ParametricStudy class.
b) The application can return an the current density. The current density is returned under name "current"
This class is used in SimulationBuilder to run a complete polarization curve. All parameters for this application should be defined in the main parameter file under the following section:
To use the class, imply create an object, declare the parameters, read the file, initialize and run
FuelCell::PolarizationCurve< dim >::PolarizationCurve | ( | ) |
Constructor.
FuelCell::PolarizationCurve< dim >::~PolarizationCurve | ( | ) |
void FuelCell::PolarizationCurve< dim >::declare_parameters | ( | ParameterHandler & | param | ) | const |
Declare all parameters that are needed for:
Currently the options implemented are:
void FuelCell::PolarizationCurve< dim >::initialize | ( | ParameterHandler & | param | ) |
Read parameters from file.
|
privatevirtual |
Print polarization curve header into a file.
Reimplemented from FuelCell::ParametricStudy< dim >.
|
privatevirtual |
Print parameters:
Reimplemented from FuelCell::ParametricStudy< dim >.
|
privatevirtual |
Modify cell voltage and any other parameters that you would like to modify with respect to the inital input file.
Reimplemented from FuelCell::ParametricStudy< dim >.