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:
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:
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.
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:
__OpenModelica_tearingSelect
was added to some variable declarations to make sure that the right tearing variables (pressures, temperatures, compositions, and currents) are selected when solving the steady-state initialization problem. Dymola automatically selects them based on structural analysis and proprietary heuristics;__OpenModelica_commandLineOptions = "--maxSizeNonlinearTearing=40000"
was added to the simulation models in order to make sure that tearing is applied to the steady-state initialization problem, whose size is currently larger than default maximum size for applying tearing 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.
At the moment there is no official release for this library, please use the HEAD revision on the master branch.
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.