Declarative modeling of coupled advection and diffusion as applied to fuel cells
Davies, Kevin L.
MetadataShow full item record
The goal of this research is to realize the advantages of declarative modeling for complex physical systems that involve both advection and diffusion to varying degrees in multiple domains. This occurs, for example, in chemical devices such as fuel cells. The declarative or equation-based modeling approach can provide computational advantages and is compatible with physics-based, object-oriented representations. However, there is no generally accepted method of representing coupled advection and diffusion in a declarative modeling framework. This work develops, justifies, and implements a new upstream discretization scheme for mixed advective and diffusive flows that is well-suited for declarative models. The discretization scheme yields a gradual transition from pure diffusion to pure advection without switching events or nonlinear systems of equations. Transport equations are established in a manner that ensures the conservation of material, momentum, and energy at each interface and in each control volume. The approach is multi-dimensional and resolved down to the species level, with conservation equations for each species in each phase. The framework is applicable to solids, liquids, gases, and charged particles. Interactions among species are described as exchange processes which are diffusive if the interaction is inert or advective if it involves chemical reactions or phase change. The equations are implemented in a highly modular and reconfigurable manner using the Modelica language. A wide range of examples are demonstrated—from basic models of electrical conduction and evaporation to a comprehensive model of a proton exchange membrane fuel cell (PEMFC). Several versions of the PEMFC model are simulated under various conditions including polarization tests and a cyclical electrical load. The model is shown to describe processes such as electro-osmotic drag and liquid pore saturation. It can be scaled in complexity from 4000 to 32,000 equations, resulting in a simulation times from 0.2 to 19 s depending on the level of detail. The most complex example is a seven-layer cell with six segments along the length of the channel. The model library is thoroughly documented and made available as a free, open-source software package.