VirtualFCS.Media.PartialCondensingMixture

This extension of PartialMedium models a mixture of multiple components, several of which may or may not condense into liquid phase.
This can be used to model e.g. condensing air in a fuel cell's cathode, the anodic loop of a PEM electrolyser and ammonia-air systems.
Note that condensation is inherently an extra calculation, and gas mixtures or pure liquids should be preferred when possible.

Derived classes

To implement your medium, you need to provide implementations for the following:

Implementation

The model uses a Rachford-Rice equation to calculate the equilibrium compositions for both phases (and whether there is one or both phases).
Rachford-Rice is an implicit equation and as such it is inherently computationally onerous; if your mixture has only one condensable component (e.g. water), it may be worth it to replace the implementation of flashVaporisation with a direct approach to achieve better computational performance.

Utilities

The model provides some useful functions:

Reference

Whitson, Curtis H., and Michael L. Michelsen. "The negative flash." Fluid phase equilibria 53 (1989): 51-71.

Contents