This application is used to perform a parametric study for a given fuel cell model.
More...
|
virtual void | set_parameters (ParameterHandler ¶m, const shared_ptr< FuelCell::ApplicationCore::AdaptiveRefinement< dim > > &solver, const int iteration, const std::string parameter_name, 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 | run_point (ParameterHandler ¶m, const std::string simulator_parameter_file_name, const boost::shared_ptr< SimulationSelector< dim > > sim_selector, const int iteration, const std::string parameter_name, const 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 |
|
virtual void | print_parameters () const |
| Print parameters: More...
|
|
virtual void | print_parameteric_study (const std::vector< std::vector< double > > &curve) const |
| Print parameteric study results into a file. More...
|
|
void | register_data (const double, std::map< std::string, double > &functionals) |
| Store the value of the current density in the solution. More...
|
|
|
std::string | parameter_filename |
| Variable where the output file to store parameteric study results is stored. More...
|
|
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< 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...
|
|
FuelCell::ApplicationCore::FEVector | coarse_solution |
| Vector used to store the solution from the previous iteration if convergence has been achieved. More...
|
|
template<int dim>
class FuelCell::ParametricStudy< dim >
This application is used to perform a parametric study 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 parameteric study for the given application.
Note that this is an implementation of the more general ParametricStudy class.
Usage
This class is used in SimulationBuilder to run a complete parameteric study. All parameters for this application should be defined in the main parameter file under the following section:
* subsection Simulator
* subsection Parametric study
* set Parameter Name = subsection>>subsection>>name
* set Initial Value = 0.5 #Enter the value you would like to start the parameteric study from.
* set Final Value = #Enter the final value for the parameteric study.
* set Increment = 0.1 #Spacing between points in the parameteric study
* set Adaptive Increment? =
false #Set to
true if you would like to reduce the voltage increment adaptively
if convergence could not be achieved with the larger value
* set Min. Increment [V] = 0.1 #If Adaptive Increment? is set to true, this value controls the
* # minimum change in cell voltage before the parameter study gives up
* # and the voltage is updated again. Note that this value has to be more
* #than 0.01 V as a value of zero would lead to an infinite loop.
* end
* end
*
To use the class, imply create an object, declare the parameters, read the file, initialize and run
* ParameterHandler param;
* std::string simulator_parameter_file_name = "input_file.prm";
* param.read_input(simulator_parameter_file_name,
* true);
* curve.
run(param, simulator_parameter_file_name, sim_selector);
*
- Author
- M. Secanell, 2014