Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CO₂ scrubbers #1934

Merged
merged 3 commits into from
Dec 9, 2018
Merged

CO₂ scrubbers #1934

merged 3 commits into from
Dec 9, 2018

Conversation

ec429
Copy link
Contributor

@ec429 ec429 commented Oct 14, 2018

Our MM patches for CO₂ scrubbers using LithiumHydroxide were broken in various ways.
Note that I haven't tested patch 3 (c97b09c), because it's mildly game-breaking: previously any crew cabin with one of these scrubbers would run a water surplus, so you didn't need to take much water with you; now you get much less water (about a tenth of what a 'naut drinks) and it's not potable.
Also, that patch was created with a horrendous grep/tr/sed/bash script; hopefully it's correct.

ec429 added 3 commits October 14, 2018 06:07
If the patch had more input resources than the original config, then node
 patches beyond the last would edit the last one instead of adding a new
 one.  This meant that several CO₂ scrubbers did not actually consume CO₂.
The previous config generated too much, violating conservation of mass.
I calculated a new value from mass conservation, and checked the results
 according to the formula CO₂ + 2LiOH → Li₂CO₃ + H₂O, which gave:
.00261 mol CO₂ in
.00521 mol LiOH in
.00261 mol Li₂CO₃ out
.00261 mol H₂O out (assuming WasteWater to be just H₂O)
This is consistent with the numbers of each species in the formula, so I
 reckon it's probably correct.
Previously they all outputted Water, and too much of that (violating
 conservation of mass).  Instead, copy the output value from the patch
 creating RO_TACLithiumHydroxide, since that's where the other values
 all seem to have come from.
@MikeOnTea
Copy link
Contributor

I have not tested it, but i get to roughly the same values so calculations seem to be correct (except that i think your mol values in the commit message are off by a factor of 1/10 :))
Everything else also looks good to me.

@ec429
Copy link
Contributor Author

ec429 commented Oct 14, 2018

except that i think your mol values in the commit message are off by a factor of 1/10

That's as a result of two errors that nearly cancelled out... I stripped a couple of leading zeroes off all the densities while calculating, because reasons (involving dc), and then forgot to allow for the fact that KSP measures mass in tonnes rather than kg.

Ah well, it doesn't matter.

@raidernick
Copy link
Contributor

Can this be merged did anyone else test it?

@raidernick raidernick added the Ready to Merge? Is this ready to merge? Needs feedback label Nov 4, 2018
@pap1723
Copy link
Contributor

pap1723 commented Dec 9, 2018

The conservation of math has been confirmed.

@pap1723 pap1723 merged commit d1af263 into KSP-RO:master Dec 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready to Merge? Is this ready to merge? Needs feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants