Destroy: Chemistry and Carnage

Destroy: Chemistry and Carnage

71 Downloads

Acids do not dissociate (probable source of bug found maybe)

TheRedCrafter344 opened this issue ยท 3 comments

commented

Sulfuric acid does not dissociate in water in a Vat. However, minimal amounts of its dissociation products (HSO4,SO4) were present after adding it. After digging in the source code for a while, I found that the probable source of the bug was that the reaction was occuring so slowly that the vat thought it was in equilibrium after just 1 tick of adding the acid. This was confirmed after testing with Hydrochloric Acid, which has a significantly higher rate constant that sulfuric acid, and did dissociate, albeit very slowly, and Nitric Acid, which with a rate constant smaller than sulfuric acid also did not dissociate, with trace amounts of nitrate in the vat.

Rate constants for acid dissociations are probably too small, and should be increased alongside the reverse constants by some factor.

Potential Bonus Bug:
When registering an acid dissociation reaction via ReactionBuilder.acid(), its activation energy is set to 0. However, ReactionBuilder.build() treats this as an invalid value and then sets its activation energy to 50, which further slows down the reaction.
This probably causes the reactions to be too slow, and if fixed, the rate constants might not even need tweaking.

commented

Yep, the kinetic constants of pretty much every single reaction need work. Currently I'm pretty sure the most acidic substance in the mod is water.

commented

(Also an activation energy of 50 as a default feels absurdly high)

commented

In 0.6 acids now dissociate at the proper rate.