17 #ifndef _FUELCELLSHOP__POROUS__LAYER_H
18 #define _FUELCELLSHOP__POROUS__LAYER_H
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>
37 using namespace dealii;
39 namespace FuelCellShop
72 void set_gases_and_compute (std::vector<FuelCellShop::Material::PureGas*>& gases_in,
73 const double& pressure_in,
74 const double& temperature_in);
94 inline void set_gases (std::vector<FuelCellShop::Material::PureGas*>& gases_in,
95 const double& pressure_in)
97 Assert(gases_in.size() >= 2, ExcMessage(
"Number of gases should be more than or equal to two in PorousLayer::set_gases method."));
98 this->gases = gases_in;
99 this->pressure = pressure_in;
109 this->T_vector = T_in;
122 Assert(index > 0 || index < gases.size(), ExcIndexRange(index,0,gases.size()));
130 std::vector<FuelCellShop::Material::PureGas*> get_gases()
const
143 void get_T_and_p(
double &T,
double &p)
const
145 T = this->temperature;
152 void get_p(
double& p)
const
162 virtual void print_layer_properties()
const
164 const std::type_info& info =
typeid(*this);
165 deallog <<
"Pure function " << __FUNCTION__
166 <<
" called in Class "
167 << info.name() << std::endl;
173 virtual bool test_layer()
const;
209 virtual void declare_parameters (
const std::string &name, ParameterHandler ¶m)
const
213 param.enter_subsection(
"Fuel cell data");
215 param.enter_subsection(name);
219 param.leave_subsection();
221 param.leave_subsection();
230 virtual void declare_parameters (ParameterHandler ¶m)
const
232 declare_parameters(this->name, param);
239 virtual void initialize (ParameterHandler ¶m);
252 void set_parameters(
const std::string &object_name,
253 const std::vector<std::string>& name_dvar,
254 const std::vector<double>& value_dvar,
255 ParameterHandler ¶m)
259 param.enter_subsection(
"Fuel cell data");
261 param.enter_subsection(object_name);
266 param.leave_subsection();
268 param.leave_subsection();
278 virtual void set_parameters(
const std::vector<std::string>& name_dvar,
279 const std::vector<double>& value_dvar,
280 ParameterHandler ¶m)
291 virtual void gas_diffusion_coefficients(Table< 2, double > &)
const;
303 virtual void derivative_gas_diffusion_coefficients(std::vector< Table< 2, double > >&)
const;
313 std::vector<FuelCellShop::Material::PureGas*>
gases;
350 #endif // _FUELCELLSHOP__GENERIC__LAYER_H