Fixed purity calculation issue

This commit is contained in:
Thalpy
2019-04-14 05:56:38 +01:00
parent ed27c5dfe4
commit a082b3c532
+4 -2
View File
@@ -498,8 +498,10 @@
//TODO Add CatalystFact
stepChemAmmount = multiplier * deltaT
P.purity = (P.purity + deltapH) /2 //This should add the purity to the product
if (ammoReacted > 0)
P.purity = ((P.purity * ammoReacted) + (deltapH * stepChemAmmount)) /(2 * (ammoReacted + stepChemAmmount)) //This should add the purity to the product
else
P.purity = deltapH
//Apply pH changes and thermal output of reaction to beaker
chem_temp += (C.ThermicConstant * stepChemAmmount)
pH += (C.HIonRelease * stepChemAmmount)