looms-polimi / SOFCPoliMi

Modelica models of Solid Oxyde Fuel Cells developed at Politecnico di Milano
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

SOFC PoliMi

A library showing how a Solide-Oxide Fuel Cell dynamic model for plant-wide studies might be modelled in Modelica, as presented in the paper doi:10.1109/CCTA54093.2023.10252534.

The library does not use Modelica.Media for fluid property computation, but rather fully equation-based fluid models. There are two main reasons behind that:

  1. this component is then used as a part of the model of the SOS-CO2 oxy-combution power plant, which is not publicly available at the moment, which also uses real gas models based on Peng-Robinson's implicit equation of state, which is written in a fully declarative way using implicit equations only;
  2. the model is meant for simulation studies but also for direct optimal control computations using gradient-based methods; this preferably requires the model to be fully based on equations, so that efficient code for Jacobian and Hessian computation can be automatically generated by differentiating them.

In its present form, this package is not really meant to be used as a re-usable component library, as it is actually a fragment of a larger project that is currently not available as open-source. It is rather meant to have the following purposes:

Content

The package contains a 1D dynamic model of a SOFC, including all the sub-components required to build it, as well as equation-based models of ideal gas mixtures. The package is self-contained, only depending on the Modelica Standard Library version 4.0.0.

How to use

The Modelica code is meant to run on all Modelica tools supporting the latest Modelica language specification. The simulation models were tested successfully using Dymola 2024x and OpenModelica 1.24.0; the library is also tested on a nightly basis with the latest development version of OpenModelica, see the test report.

To run the model in Dymola, it is suggested to run a script such as start_up_dymola.mos to enable parallelization and to directly solve the initialization problem using homotopy, rather than trying first without it (spoiler alert: it won't work, the initialization problems are simply too hard to be solved without homotopy).

Some vendor-specific annotations were added to successfully run the models in OpenModelica:

Other tools may need similar hints to successfully solve the initialization problem. Feel free to contact the developers @casella and @matteodepascali if you run the model with other tools and you want to report success or issues.

Versions

At the moment there is no official release for this library, please use the HEAD revision on the master branch.

Bibliography

M. L. De Pascali, A. Donazzi, E. Martelli and F. Casella, "A Control-Oriented Modelica 1-D Model of a Planar Solid-Oxide Fuel Cell for Oxy-Combustion Cycles," 2023 IEEE Conference on Control Technology and Applications (CCTA), Bridgetown, Barbados, 2023, pp. 394-399, doi:10.1109/CCTA54093.2023.10252534. Winner of the Outstanding Student Paper Award.