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

Small scale anaerobic digestion system #72987

Merged

Conversation

osuphobia
Copy link
Contributor

@osuphobia osuphobia commented Apr 12, 2024

Summary

Features "Small scale anaerobic digestion system"

Purpose of change

Added an anaerobic digestion furniture, organic_waste requirement, biogas, biogas tank and cooker, and relevant recipes.
Borrowed and modified fermenting vat functions. Get biogas and fermented liquid from anaerobic digester.
Close #72828

Describe the solution

Spreading manure on crops recycles the nutrients, but as it decomposes it releases methane. And lots of it. Agriculture is the largest source of methane emissions globally. Each year, methane from livestock manure has the warming equivalent of 240 million tons of carbon dioxide, or the same as a year of emissions from 52 million cars.

One of the most effective ways of mitigating this powerful greenhouse gas is to capture it and burn it as natural gas. The Chinese government has been incentivising farmers to do this for decades, so are the US government.

For now, I only managed to introduce a small scale anaerobic digestion system to dda.

Dig a deep pit and build an anaerobic digester on it, mix dungs and water, pour them into the digester.
After one month, the biogas generating process will start, you can get biogas from the digester every 24 hours.
After two months, you can get fermented fertilizer liquid, and make liquid fertilizer from it with a simple step.

I think it's more realistic than the plan in #72828, as well as the exsisting simple recipe( so I removed it, the complex one is left though).

China_biogas_digester_training-768x576
Training programme in biogas digester construction in Shandong province (Image: Karen Mancl)
SASSE 1998 and TUTORVISTA 2010  Three types of fixed-dome biogas reactor  Each biogas plant

Describe alternatives you've considered

Add compost heap item? But it may attract a lot of scavengers and monsters in this apocalypse world.

Testing

Compiled and tested locally.

ssads 123

Additional context

Add industrial anaerobic digester in the future for farms and faction camp. AgSTAR in dda!

biogas, biogas tank and cooker, and relevant recipes.
Get biogas and fermented liquid from anaerobic digester.
Add water_sewage to organic_waste.
@github-actions github-actions bot added [JSON] Changes (can be) made in JSON Crafting / Construction / Recipes Includes: Uncrafting / Disassembling [C++] Changes (can be) made in C++. Previously named `Code` Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Items: Ammo / Guns Ammunition for all kinds of weapons and these weapons themselves Items: Containers Things that hold other things <Enhancement / Feature> New features, or enhancements on existing labels Apr 12, 2024
src/iexamine.cpp Outdated Show resolved Hide resolved
src/iexamine.cpp Outdated Show resolved Hide resolved
src/iexamine.cpp Outdated Show resolved Hide resolved
src/iexamine.cpp Outdated Show resolved Hide resolved
src/iexamine.cpp Outdated Show resolved Hide resolved
src/item.cpp Outdated Show resolved Hide resolved
src/item.cpp Outdated Show resolved Hide resolved
src/item.cpp Outdated Show resolved Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Contributor

Spell checker encountered unrecognized words in the in-game text added in this pull request. See below for details.

Click to expand
  • No biogass gathered.

This alert is automatically generated. You can simply disregard if this is inaccurate, or (optionally) you can also add the new words to tools/spell_checker/dictionary.txt so they will not trigger an alert next time.

Hints for adding a new word to the dictionary
  • If the word is normally in all lowercase, such as the noun word or the verb does, add it in its lower-case form; if the word is a proper noun, such as the surname George, add it in its initial-caps form; if the word is an acronym or has special letter case, such as the acronym CDDA or the unit mW, add it by preserving the case of all the letters. A word in the dictionary will also match its initial-caps form (if the word is in all lowercase) and all-uppercase form, so a word should be added to the dictionary in its normal letter case even if used in a different letter case in a sentence.
  • For a word to be added to the dictionary, it should either be a real, properly-spelled modern American English word, a foreign loan word (including romanized foreign names), or a foreign or made-up word that is used consistently and commonly enough in the game. Intentional misspelling (including eye dialect) of a word should not be added unless it has become a common terminology in the game, because while someone may have a legitimate use for it, another person may spell it that way accidentally.

@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Apr 12, 2024
@Hyperseeker
Copy link
Contributor

This is definitely an interesting approach. I'd like to see where it goes.

One thing that doesn't quite jive, at least intuitively, is only requiring 60 bricks and a single metal sheet to produce a thousand-liter-capable container. Even the pit in the first image seems to be using far more than 60 bricks alone. Plus, having it only take 3 hours seems like superhuman speed.

Have these values been vetted in any way, or are they a placeholder?

@osuphobia
Copy link
Contributor Author

osuphobia commented Apr 13, 2024

Have these values been vetted in any way, or are they a placeholder?

@Hyperseeker

You are right, I just forgot to change them to resonable values, considering changing the amount of bricks to 600 and time needed to 2 days. For the single metal sheet, I was imaging a metal cover when starting to write this PR, but now I just want to remove it from the recipe, as the metal tank serves as the gasholder sits on top of the digester.

Besides that, I shouldn't modify the density of dungs in this PR, should have spilt the modification to another single PR.

And there are also some issues needed to be fixed as well, so I'll mark this as draft.

@osuphobia osuphobia marked this pull request as draft April 13, 2024 04:28
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Apr 13, 2024
@Karol1223
Copy link
Contributor

So I get it I can close #65413 then?

@osuphobia
Copy link
Contributor Author

So I get it I can close #65413 then?

@Karol1223
The function in my PR works as intended, but there still are some weird things mainly in JSON, minor but quite annoying.
Had a glance, codes in your PR need to be rewritten, because of a recent code migration #72954.
Since that your PR is not finished yet, yes you can wait my one to be finished and then close yours.

@Rocket-F-1024
Copy link
Contributor

Is 600 bricks a bit too much? A whole pallet of bricks in the game is only 400. And actually 1000 liters (1 cubic meter) isn't really that big, it's actually only 1 meter on each side if it's a standard cube.
The other thing is that the structure presumably doesn't need to be heat resistant, so perhaps it could be built using adobe bricks?

anaerobic digester, and use it in the recipes of
fermentable_liquid_mixture.
Add CONTAIN level 1 to the requirement of simple
liquid fertilizer recipe.
@github-actions github-actions bot added the Player Faction Base / Camp All about the player faction base/camp/site label Apr 13, 2024
@osuphobia
Copy link
Contributor Author

Is 600 bricks a bit too much? A whole pallet of bricks in the game is only 400. And actually 1000 liters (1 cubic meter) isn't really that big, it's actually only 1 meter on each side if it's a standard cube. The other thing is that the structure presumably doesn't need to be heat resistant, so perhaps it could be built using adobe bricks?

@Rocket-F-1024
An anaerobic digester like the one in the photo above do need that much. Maybe we need less in the game, but I'm not familiar with the game-to-reality conversion ratio.
And please note that the volume of the anaerobic digester is larger than 1000 liter.
For the adobe brick, since that anaerobic digester needs to be (almost) airtight, it may not be a good idea IMO.

@osuphobia osuphobia marked this pull request as ready for review April 13, 2024 11:51
@github-actions github-actions bot removed the BasicBuildPassed This PR builds correctly, label assigned by github actions label Apr 13, 2024
src/iexamine.cpp Outdated Show resolved Hide resolved
Co-authored-by: Jianxiang Wang (王健翔) <[email protected]>
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Apr 14, 2024
@ADekema
Copy link

ADekema commented Apr 14, 2024

  1. Why can you only put use butchery refuse and feces in the digestor? You could pretty much use any kind of organic material as long as it rots (even whole bodies). You should probably include all types of food (good way to recycle rotten food), by products (from milling, oil pressing, cheesemaking, etc) and butchering products. The only exeptions should be woody materials, bone and chitin. You could techically digest those things it would simply take much longer so wouldn´t be worth it.

  2. Would it be possible to just make propane tanks be able to hold biogas instead of ¨Crafting¨ them into biogas tanks? Als seems strange that gas tanks can only hold a certain type of gas. You would think that a gas tank would be capable of holding any type of gas. Might be some exemptions and even if there aren´t doing a gas tank overhaul would be a differant PR,

  3. Can you really use biogas simply as is? Isn´t there a lot of moistere, carbondioxide, and nasty smelling adolterants mixed into the gas? Isn´t there like a whole series of steps that need to be undertaken to upgrade the gas to burnable/cooking/primitive generator grade and even more work to upgrade it to methane/vehicle/gas generator grade?

@osuphobia
Copy link
Contributor Author

osuphobia commented Apr 15, 2024

  1. Why can you only put use butchery refuse and feces in the digestor? You could pretty much use any kind of organic material as long as it rots (even whole bodies). You should probably include all types of food (good way to recycle rotten food), by products (from milling, oil pressing, cheesemaking, etc) and butchering products. The only exeptions should be woody materials, bone and chitin. You could techically digest those things it would simply take much longer so wouldn´t be worth it.
  2. Would it be possible to just make propane tanks be able to hold biogas instead of ¨Crafting¨ them into biogas tanks? Als seems strange that gas tanks can only hold a certain type of gas. You would think that a gas tank would be capable of holding any type of gas. Might be some exemptions and even if there aren´t doing a gas tank overhaul would be a differant PR,
  3. Can you really use biogas simply as is? Isn´t there a lot of moistere, carbondioxide, and nasty smelling adolterants mixed into the gas? Isn´t there like a whole series of steps that need to be undertaken to upgrade the gas to burnable/cooking/primitive generator grade and even more work to upgrade it to methane/vehicle/gas generator grade?
  1. Of course, kitchen and garden wastes are suitable materials, while woody materials are not, as they contain a lot of lignin which resists anaerobic fermentation and should therefore not be used unless pre-composted and preferably chopped. For the food stuff and corpse, I can deal with them afterwards, but the digestion functions need to be somewhat rewritten then. Now I'm just sitting here praying for getting this PR merged.
  2. The pocket type needs to be container to gather biogas from digester, otherwise the digestion functions need to be totally rewritten (and I don't know how to do it btw).
  3. Yes and no. Biogas does contain impurities (mainly carbon dioxide), you can purify it to get methane, but you can also simply use it as it is. https://www.youtube.com/watch?v=c_Jtl-VhkKI Here's a video of a DIY biogas digester made of a plastic barrel, biogas is used by the gas stove as it is. Purification of biogas would be a differant PR.

@osuphobia osuphobia marked this pull request as draft April 15, 2024 02:02
@osuphobia osuphobia marked this pull request as ready for review April 15, 2024 02:03
@anothersimulacrum anothersimulacrum self-requested a review April 17, 2024 18:42
@Maleclypse Maleclypse merged commit 326e9b2 into CleverRaven:master Apr 18, 2024
34 of 40 checks passed
@osuphobia osuphobia deleted the Small-scale-anaerobic-digestion-system branch April 18, 2024 06:16
@LyleSY LyleSY mentioned this pull request May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Crafting / Construction / Recipes Includes: Uncrafting / Disassembling <Enhancement / Feature> New features, or enhancements on existing Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Items: Ammo / Guns Ammunition for all kinds of weapons and these weapons themselves Items: Containers Things that hold other things [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Player Faction Base / Camp All about the player faction base/camp/site
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants