Hi,
The equations involved are pretty simple — you can see what the Python Quantity class does for the “A += B” operation in the implementation of Quantity.__iadd__. Most of the complexity just comes from the various options of mixing at constant volume or constant pressure and whether the objects are configured to use a mass or molar basis for the properties (which isn’t a consideration in C++).
Regards,
Ray