# mixture density error perfectGas reactingTwoPhaseEulerFoam

Calculating the density of a mixture of 2 components with different moleweights give wrong density from perfectGas equation of state. Error appears in v2012 and v2106, but not in v1912. Attached case with gas mixture of water (steam) and air prints (T.gas p water.gas thermo:rho.gas air.gas) to postprocessing file. The density should be rho = 1/(Y1/rho1 + Y2/rho2), with Yi being the mass fraction of component i and rhoi = p/(8.31447*T/wi) where wi is the composition moleweight. For v2012 and v2106 the density is erroneously calculated with mass fractions replaced by mole fractions Yi -> Xi = Yi/wi/sum(Yj/wj). Attached case is for reactingTwoPhaseEulerFoam, but same bug has been observed in reactingFoam with 2 components.