18 #ifndef _FUELCELLSHOP__GAS_DIFFUSION_LAYER_H
19 #define _FUELCELLSHOP__GAS_DIFFUSION_LAYER_H
28 #include <base/parameter_handler.h>
29 #include <base/point.h>
30 #include <base/function.h>
31 #include <lac/vector.h>
32 #include <fe/fe_values.h>
38 using namespace dealii;
40 namespace FuelCellShop
199 static void declare_GasDiffusionLayer_parameters (
const std::string& gld_section_name, ParameterHandler ¶m)
206 iterator->second->declare_parameters(gld_section_name, param);
212 static void set_GasDiffusionLayer_parameters (
const std::vector<std::string>& name_dvar,
213 const std::vector<double>& value_dvar,
214 std::string gld_section_name,
215 ParameterHandler ¶m)
221 iterator->second->set_parameters(name_dvar,value_dvar,gld_section_name, param);
237 static boost::shared_ptr<FuelCellShop::Layer::GasDiffusionLayer<dim> > create_GasDiffusionLayer (
const std::string& gld_section_name,
238 ParameterHandler ¶m)
241 boost::shared_ptr<FuelCellShop::Layer::GasDiffusionLayer<dim> > pointer;
243 std::string concrete_name;
244 param.enter_subsection(
"Fuel cell data");
246 param.enter_subsection(gld_section_name);
248 concrete_name = param.get(
"Gas diffusion layer type");
249 deallog <<
"name: "<<concrete_name.c_str()<<std::endl;
251 param.leave_subsection();
253 param.leave_subsection();
259 if (iterator->second)
265 deallog<<
"Pointer not initialized"<<std::endl;
271 deallog<<
"Concrete name in FuelCellShop::Layer::GasDiffusionLayer<dim>::create_GasDiffusionLayer does not exist"<<std::endl;
275 pointer->initialize(param);
290 virtual void set_diffusion_species_name(std::string &name)
292 Assert((name !=
"oxygen" || name !=
"nitrogen" || name !=
"water" || name !=
"electron"),
293 ExcNotImplemented());
294 diffusion_species_name = name;
316 const std::type_info& get_base_type()
const
324 virtual void test_class()
const;
337 virtual void effective_gas_diffusivity(
const double& ,
340 const std::type_info& info =
typeid(*this);
341 deallog <<
"Pure function " << __FUNCTION__
342 <<
" called in Class "
343 << info.name() << std::endl;
355 virtual void effective_gas_diffusivity(
const double& ,
358 const std::type_info& info =
typeid(*this);
359 deallog <<
"Pure function " << __FUNCTION__
360 <<
" called in Class "
361 << info.name() << std::endl;
370 virtual void effective_gas_diffusivity(Table<2, double>& D_eff )
const;
379 virtual void effective_gas_diffusivity(Table< 2,
Tensor<2,dim> > &D_eff )
const;
391 virtual void derivative_effective_gas_diffusivity(std::vector<Table< 2,
Tensor<2,dim> > >& )
const
393 const std::type_info& info =
typeid(*this);
394 deallog <<
"Pure function " << __FUNCTION__
395 <<
" called in Class "
396 << info.name() << std::endl;
402 virtual void effective_electron_conductivity(
double& )
const
404 const std::type_info& info =
typeid(*this);
405 deallog <<
"Pure function " << __FUNCTION__
406 <<
" called in Class "
407 << info.name() << std::endl;
413 virtual void effective_electron_conductivity(
const double& ,
double& )
const
415 const std::type_info& info =
typeid(*this);
416 deallog <<
"Pure function " << __FUNCTION__
417 <<
" called in Class "
418 << info.name() << std::endl;
426 const std::type_info& info =
typeid(*this);
427 deallog <<
"Pure function " << __FUNCTION__
428 <<
" called in Class "
429 << info.name() << std::endl;
434 virtual void effective_electron_conductivity(
const double& ,
Tensor<2,dim>& )
const
436 const std::type_info& info =
typeid(*this);
437 deallog <<
"Pure function " << __FUNCTION__
438 <<
" called in Class "
439 << info.name() << std::endl;
447 virtual void derivative_effective_electron_conductivity(std::vector<
Tensor<2,dim> >& )
const
449 const std::type_info& info =
typeid(*this);
450 deallog <<
"Pure function " << __FUNCTION__
451 <<
" called in Class "
452 << info.name() << std::endl;
458 virtual void gas_permeablity(
double& )
const
460 const std::type_info& info =
typeid(*this);
461 deallog <<
"Pure function " << __FUNCTION__
462 <<
" called in Class "
463 << info.name() << std::endl;
470 const std::type_info& info =
typeid(*this);
471 deallog <<
"Pure function " << __FUNCTION__
472 <<
" called in Class "
473 << info.name() << std::endl;
480 virtual void derivative_gas_permeablity(std::vector<
Tensor<2,dim> >& )
const
482 const std::type_info& info =
typeid(*this);
483 deallog <<
"Pure function " << __FUNCTION__
484 <<
" called in Class "
485 << info.name() << std::endl;
490 virtual void liquid_permeablity(
double& )
const
492 const std::type_info& info =
typeid(*this);
493 deallog <<
"Pure function " << __FUNCTION__
494 <<
" called in Class "
495 << info.name() << std::endl;
502 const std::type_info& info =
typeid(*this);
503 deallog <<
"Pure function " << __FUNCTION__
504 <<
" called in Class "
505 << info.name() << std::endl;
512 virtual void derivative_liquid_permeablity(std::vector<
Tensor<2,dim> >& )
const
514 const std::type_info& info =
typeid(*this);
515 deallog <<
"Pure function " << __FUNCTION__
516 <<
" called in Class "
517 << info.name() << std::endl;
527 typedef std::map< std::string, GasDiffusionLayer<dim>* >
_mapFactory;
571 void declare_parameters (ParameterHandler ¶m)
const
573 this->declare_parameters(this->name, param);
580 virtual void declare_parameters (
const std::string& name,
581 ParameterHandler ¶m)
const;
587 virtual void set_parameters (
const std::vector<std::string>& name_dvar,
588 const std::vector<double>& value_dvar,
589 const std::string& name,
590 ParameterHandler ¶m)
const
592 const std::type_info& info =
typeid(*this);
593 deallog <<
"Pure function " << __FUNCTION__
594 <<
" called in Class "
595 << info.name() << std::endl;
615 virtual boost::shared_ptr<FuelCellShop::Layer::GasDiffusionLayer<dim> > create_replica (
const std::string &name)
617 const std::type_info& info =
typeid(*this);
618 deallog <<
"Pure function " << __FUNCTION__
619 <<
" called in Class "
620 << info.name() << std::endl;
661 #endif // _FUELCELLSHOP__GAS_DIFFUSION_LAYER_H