Cataclysm-DDA icon indicating copy to clipboard operation
Cataclysm-DDA copied to clipboard

[CR] Allow Fruit Sugar refining using Potassium Hydroxide

Open Pabblusansky opened this issue 1 year ago • 2 comments

Summary

Balance "Add Potassium Hydroxide alternative to produce sugar"

Purpose of change

Based on the #74547 suggestion

Describe the solution

fixes #74547 It simply adds the possibility for the player to use the sodium hydroxide lye powder OR the potassium hydroxide powder to refine sugar. The logic of the production value requirement is the following: Based on the molecular weight difference between KOH and NaOH(56 g/mol for KOH and 40 g/mol for NaOH), about 1.4 times(maths: 56/40 = 1.4) more KOH is required to achieve the same chemical reaction. The base recipe uses 20 u of the sodium hydroxide lye powder, so 20 * 1.4 = 24 u. The sources used for this adjustment include: https://araxchemi.com/en/potassium-hydroxide-vs-sodium-hydroxide/ https://patents.google.com/patent/US3098045A/en ("The alkali metal hydroxide we employ may be NaOH, KOH or LiOI-l. For reasons of economy NaOH is preferred.")

Testing

Compiled the game and checked the recipe, the player can now use the sodium hydroxide lye powder OR the potassium hydroxide powder to refine sugar

Pabblusansky avatar Oct 18 '24 12:10 Pabblusansky

Reading the linked patent, the actual purpose of the hydroxides in the first place is as a 'decoloring' agent, and doing a few minutes of looking into the purpose of 'decoloring' sugar, it's purely a cosmetic thing

Decolorizing fruit sugar removes organic impurities that cause the sugar to appear colored. This ensures that the color doesn't pass on to the food, drinks, or other products that the sugar sweetens

In a post apocalyptic world, is this really a process that a survivor would consider to be worth spending time and resources on?

I would propose that we just remove the hydroxides requirements from these recipes instead of adding alternatives, and embrace having colored sugar in the apocalypse \o/

Side, note, I went into a big spiel in the linked suggestion about how these recipes are incredibly lacking from a tool requirement standpoint, but think that might be outside the scope of this PR

AudBobb avatar Oct 18 '24 15:10 AudBobb

Yes, in general I noticed some simplicity in the crafting tools. Overall, the recipe is pretty old (funny: I noticed the following comment on this recipe: "Not sure why the recipe is using cooking skill… Handling lye powder and using CHEM 2 quality is in line with chemistry, IMHO."), but my initial thought about this PR was based on the #74547 suggestion(and the fact that it was labeled as a good first issue), to only add the KOH. So, I think we need more opinions on this topic, but if anything, I'm willing to add the changes.

Pabblusansky avatar Oct 18 '24 16:10 Pabblusansky

Yes, in general I noticed some simplicity in the crafting tools. Overall, the recipe is pretty old (funny: I noticed the following comment on this recipe: "Not sure why the recipe is using cooking skill… Handling lye powder and using CHEM 2 quality is in line with chemistry, IMHO."), but my initial thought about this PR was based on the #74547 suggestion(and the fact that it was labeled as a good first issue), to only add the KOH. So, I think we need more opinions on this topic, but if anything, I'm willing to add the changes.

Definitely a separate PR. I'm fine to merge this but it looks like you are questioning whether it makes sense to whiten the sugar?

Maleclypse avatar Oct 24 '24 03:10 Maleclypse

Yes, in general I noticed some simplicity in the crafting tools. Overall, the recipe is pretty old (funny: I noticed the following comment on this recipe: "Not sure why the recipe is using cooking skill… Handling lye powder and using CHEM 2 quality is in line with chemistry, IMHO."), but my initial thought about this PR was based on the #74547 suggestion(and the fact that it was labeled as a good first issue), to only add the KOH. So, I think we need more opinions on this topic, but if anything, I'm willing to add the changes.

Definitely a separate PR. I'm fine to merge this but it looks like you are questioning whether it makes sense to whiten the sugar?

Based on the AudBob's reply, yes, he was questioning the whole idea of using hydroxides for a survivor in a post-apocaliptic world when refining the sugar. If we are removing the use of hydroxides from the recipe, we assume that the survivor would obtain a more low-quality unrefined sugar, which contains a variety of impurities, including organic acids, proteins, and other unwanted compounds. In a nutshell, I see two options:

  1. We assume that the survivor wants every time the best version of sugar, so he would use the hydroxides and more sophisticated tools to try to match the industrial method of the refining.
  2. We assume that the survivor wants just the product; he doesn't use any hydroxides; he simply boils the sugar beet or other alternatives. I would mark the second variant as the most inappropriate, because we just could not ignore the "correct" version of refining sugar and remove the hydroxides from all current recipes as AudBob proposed. As an alternative, if we are willing to add the recipe that uses no hydroxides, we need to mirror the low-quality obtained sugar on a bunch of recipes, which is a huge, huge work.

Pabblusansky avatar Oct 24 '24 15:10 Pabblusansky

we assume that the survivor would obtain a more low-quality unrefined sugar, which contains a variety of impurities, including organic acids, proteins, and other unwanted compounds.

I'm not sure that the difference is really as impactful as you are thinking it is. Here is an article where someone actually goes through a process he performed at home for refining sugar beets into sugar, including pictures.

The notable takeaways from the article are that he had to peel and remove any undesirable parts of the beets prior to processing, resulting in around 1/3 waste compared to industrial processes, however this doesn't have anything to do with the hydroxide, and everything to do with industrial filters.

He likely lost some sugar water due to using a cheesecloth instead of a press

Adding a tiny amount of seed sugar to the molasses after it has cooled, but before the crystallization process starts is beneficial to the crystallization process

The crystallization process takes around 2 weeks.

From 5lbs of beets he started with, he produced around 1lb of sugar.

Quote from the article

The sugar itself tastes more strongly of regular molasses than of beets. This is because there is, in fact, molasses still in the sugar. However, it is sweet and crunchy, which I think is the most important thing.

The hydroxide is mainly for the cosmetic whitening of the sugar, and the removal of impurities that actually affect the sugar quality comes from the incredibly fine filtering of the sugar water that industrial facilities are capable of. At home sugar is going to have some impurities due to this, but should be a perfectly valid substitute for factory produced sugar.

Picture of the final product from the article (My man must've been using some crazy halogen lights to get that orange tint) image

Edit: Tried to trace back to the PR where either the sugar recipe was added or where lye was added as an ingredient to see if it would be possible to glean any information from that, but couldn't find anything searching PR's for sugar, and github blame deadends around 10 years ago, when the recipe files were split from being one massive file into seperate categories.

Edit Edit: Found the original PR, #3478. Not really any information to be gleaned, other than it was a small part of a massive batch of additions to give the chemistry set some use.

Lol @ the eyes. It's been a slow week at work and I have entirely too much time to research these things

AudBobb avatar Oct 24 '24 17:10 AudBobb

The notable takeaways from the article are that he had to peel and remove any undesirable parts of the beets prior to processing, resulting in around 1/3 waste compared to industrial processes, however this doesn't have anything to do with the hydroxide, and everything to do with industrial filters.

Oh, well, you're right. I just researched not so deeply and was confused by the two-way controversary information. However, after you provided a real-life example, it all became clear.

Edit Edit: Found the original PR, https://github.com/CleverRaven/Cataclysm-DDA/pull/3478. Not really any information to be gleaned, other than it was a small part of a massive batch of additions to give the chemistry set some use.

Yeah, it was clearly positioned as a "pseudoscientific package", and clearly now it needs a overhaul. <Lol @ the eyes. It's been a slow week at work and I have entirely too much time to research these things

Thanks a lot for your contribution! I'm closing this PR and starting to work on your suggestions. I'll look forward to seeing you in future PRs.

Pabblusansky avatar Oct 24 '24 18:10 Pabblusansky

I'll admit, it was pretty confusing trying to figure out what was going on in the industrial process. Part of the confusion I think is due to the fact that many industrial processes do use calcium hydroxide as a clarification agent, but this requires additional steps afterwards to remove the calcium carbonate back out of the sugar liquor.

Finding a real at home recipe definitely clarified a lot for me as well.

AudBobb avatar Oct 24 '24 18:10 AudBobb