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

Explosive chemistry - in very small steps, issue I & II #37179

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions data/json/itemgroups/supplies.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@
[ "fertilizer_commercial", 30 ],
[ "chem_sulphuric_acid", 30 ],
[ "chem_muriatic_acid", 35 ],
[ "paint_thinner", 30 ],
[ "peephole", 25 ],
{ "item": "chem_chromium_oxide", "prob": 5, "charges-min": 100 },
{ "item": "chem_zinc_powder", "prob": 5, "charges-min": 100 },
Expand Down Expand Up @@ -262,6 +263,7 @@
[ "chem_acetic_acid", 10 ],
[ "chem_formaldehyde", 10 ],
[ "chem_acetone", 10 ],
[ "chem_toluene", 10 ],
{ "item": "chem_carbide", "prob": 10, "charges-min": 100 },
[ "chem_ammonium_nitrate", 10 ],
{ "item": "chem_chromium_oxide", "prob": 10, "charges-min": 100 },
Expand Down
20 changes: 20 additions & 0 deletions data/json/items/book/cooking.json
Original file line number Diff line number Diff line change
Expand Up @@ -498,5 +498,25 @@
"max_level": 4,
"intelligence": 7,
"copy-from": "cookbook_liverforkids"
},
{
"id": "reference_explosives",
"type": "BOOK",
"name": { "str": "Preparatory Manual of Explosives", "str_pl": "copies of Preparatory Manual of Explosives" },
"description": "A quite extensive compendium of energetic compounds, their properties and preparation formulas. Covers the expected explosives, initiators and propellants, but also includes chapters on basic laboraty equipment and procedure, safety practices, and even precursor synthesis.",
This conversation was marked as resolved.
Show resolved Hide resolved
"weight": "900 g",
"volume": "1250 ml",
"price": 5000,
"price_postapoc": 10000,
"bashing": 1,
"material": "paper",
"symbol": "?",
"color": "light_green",
"skill": "cooking",
"required_level": 2,
"max_level": 4,
"intelligence": 8,
"time": "15 m",
"fun": 1
}
]
64 changes: 64 additions & 0 deletions data/json/items/chemicals_and_resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -1462,5 +1462,69 @@
"explode_in_fire": true,
"explosion": { "power": 20, "shrapnel": 0 },
"flags": [ "NO_DROP", "IRREMOVABLE" ]
},
{
"type": "AMMO",
"id": "chem_dnp",
"category": "chems",
"price": 5000,
"name": "DNP",
"name_plural": "DNP",
"symbol": "=",
"color": "yellow",
"description": "2,4-Dinitrophenol, a yellow crystaline powder giving off distinct chemical smell. It seems to have a strange propensity to stain everything in its vincinity yellow. Mostly useful for its explosive qualities.",
This conversation was marked as resolved.
Show resolved Hide resolved
"material": "powder",
"//": "1.68g/ccm, WWI era high-explosive, TNT-RE 0.81, metabolic poison/dieting drug, readily sublimates",
This conversation was marked as resolved.
Show resolved Hide resolved
"volume": "230 ml",
"weight": "1 g",
"bashing": 1,
"ammo_type": "components",
"container": "bottle_plastic_small",
"count": 400
},
{
"type": "AMMO",
"id": "chem_toluene",
"category": "chems",
"price": 50,
"name": "toluene",
"name_plural": "toluene",
"symbol": "=",
"color": "white",
"description": "Toluene, combustible solvent often used as primary ingredient in many paint thinner formulations. Can be nitrated to form TNT.",
"volume": "750 ml",
"weight": "870 mg",
"count": 750,
"bashing": 1,
"ammo_type": "components",
"phase": "liquid",
"container": "bottle_glass"
},
{
"type": "AMMO",
"id": "paint_thinner",
"copy-from": "chem_toluene",
"name": "paint thinner",
"name_plural": "paint thinner",
"description": "Toluene based pint thinner. Can (probably) be directly used for TNT production."
},
{
"type": "AMMO",
"id": "chem_tnt",
"category": "chems",
"price": 7500,
"name": "TNT",
"name_plural": "TNT",
"symbol": "=",
"color": "yellow",
"description": "2,4,6-Trinitrotoluene, a yellowish crystaline powder. This highly stable, powerful explosive is still widely used either by itself, or as a part of many explosive compositions.",
"material": "powder",
"//": "1.65g/ccm, most common explosive of WWII era, TNT-RE 1.0",
"volume": "240 ml",
"weight": "1 g",
"bashing": 1,
"ammo_type": "components",
"container": "bottle_plastic_small",
"count": 400
}
]
78 changes: 78 additions & 0 deletions data/json/recipes/recipe_medsandchemicals.json
Original file line number Diff line number Diff line change
Expand Up @@ -1275,5 +1275,83 @@
"autolearn": true,
"qualities": [ { "id": "CHISEL", "level": 2 }, { "id": "HAMMER", "level": 2 } ],
"components": [ [ [ "material_rhodonite", 1 ] ] ]
},
{
"type": "recipe",
"result": "chem_phenol",
"category": "CC_CHEM",
"subcategory": "CSC_CHEM_CHEMICALS",
"skill_used": "cooking",
"difficulty": 4,
"time": "50 m",
"batch_time_factors": [ 85, 3 ],
"book_learn": [ [ "adv_chemistry", 3 ], [ "textbook_chemistry", 3 ], [ "recipe_labchem", 3 ], [ "reference_cooking", 6 ] ],
"charges": 100,
"//": "hydrolysis of acetylsalicylic to salicylic acid followed by thermal decomposition to phenol",
"qualities": [ { "id": "CHEM", "level": 3 } ],
"tools": [ [ [ "surface_heat", 120, "LIST" ] ] ],
"components": [ [ [ "aspirin", 200 ] ], [ [ "chem_sulphuric_acid", 1 ] ] ]
},
{
"type": "recipe",
"result": "chem_phenol",
"id_suffix": "by_pyrolysis",
"category": "CC_CHEM",
"subcategory": "CSC_CHEM_CHEMICALS",
"skill_used": "cooking",
"difficulty": 7,
"time": "30 m",
"book_learn": [ [ "adv_chemistry", 5 ] ],
"charges": 100,
"//": "pyrolysis of coal, 600-800C, add/substitute coal chemistry books if they appear, other phenols and cresols can be byproducts",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of things here. First off, pyrolysis of coal is going to produce a huge variety of products. To obtain a range of materials you are interested in, you would need some very fine temperature control. 600-800 c is also far too hot, as https://www.intechopen.com/books/pyrolysis/pyrolysis-of-low-rank-coal-from-research-to-practice seems to indicate that your useful fraction here is obtained at ~350c in general. As illustrated there in this image, this 'useful fraction' would still be very impure and require additional work.

Also 600-800 c is in the softening temperature range for soda-lime glass.

I'm not saying this can't be done, I'm saying you'd have way more byproducts than you indicate, some not useful to the survivor (or a faction even). A more controlled, dedicated pyrolysis and distillation setup is needed to really get this to be feasible.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Temperature would be dependent on type of coal used for reaction, so yes, for lignites it would be significantly lower than for anthracites. Pyrolysis is done in a crucible not in glassware, and products are significantly cooled before reaching refinement part of the setup.

"qualities": [ { "id": "CHEM", "level": 3 }, { "id": "HAMMER", "level": 3 } ],
"tools": [ [ [ "forging_standard", 10, "LIST" ] ], [ [ "crucible", -1 ], [ "crucible_clay", -1 ] ], [ [ "tongs", -1 ] ] ],
"components": [ [ [ "coal_lump", 50 ] ] ]
},
{
"type": "recipe",
"result": "chem_dnp",
"category": "CC_CHEM",
"subcategory": "CSC_CHEM_CHEMICALS",
"skill_used": "cooking",
"difficulty": 6,
"time": "2 h 30 m",
"batch_time_factors": [ 90, 4 ],
"charges": 250,
"book_learn": [ [ "recipe_labchem", 5 ], [ "reference_cooking", 8 ], [ "reference_explosives", 3 ] ],
"qualities": [ { "id": "CHEM", "level": 3 } ],
"//": "one of the safest explosive producing nitrations, if somewhat slow",
"tools": [ [ [ "surface_heat", 50, "LIST" ] ] ],
"components": [
[ [ "chem_phenol", 200 ] ],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing water, KNO2. Saltpeter is KNO3, not nitrite.

Also missing a HUGE amount of water, or ice water, or plenty of time, to take on all the heat your source wants to make to not explode your glassware when you dilute the nitric acid. The book also wants you to cool the mixture as it's forming the intermediate.

This also produces nitrogen oxide as a byproduct. These should either be: Scrubbed with a scrubber setup that's not in game, consumed by consuming filter mask charges, or dealt with safely by doing the work in a fumehood. Oh, or dealt with by the survivor inhaling them and getting serious lung injuries.

The cooling isn't really something we have in game yet as part of recipes...

The stoichometry appears to be a little off: 47 g phenol : 43 g KNO2: 21 g NaOH: 224 mL/(purity nitric acid used) of nitric acid. I'm not currently in a place to be able to balance the reaction and give the ratio of DNP produce, but I trust you'll be able to do so for your PR? I can assist later if not.

And, as erk says: this really needs to consume some analysis charges. Your source even mentioned the MP to check.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing water, KNO2. Saltpeter is KNO3, not nitrite.

Thermal decomposition with iron as catalyst, abstracted - to be revised if kno2 becomes useful in more reactions

Also missing a HUGE amount of water, or ice water, or plenty of time, to take on all the heat your source wants to make to not explode your glassware when you dilute the nitric acid. The book also wants you to cool the mixture as it's forming the intermediate.

Perhaps bit more water, definitely not huge amounts. Dilution can be done in controlled manner with stirring to reduce heat generation.

This also produces nitrogen oxide as a byproduct. These should either be: Scrubbed with a scrubber setup that's not in game, consumed by consuming filter mask charges, or dealt with safely by doing the work in a fumehood. Oh, or dealt with by the survivor inhaling them and getting serious lung injuries.

Can be simply done outside or by the open window, most any reaction involving HNO3 does so.

The cooling isn't really something we have in game yet as part of recipes...

Hence that requirement is omitted.

The stoichometry appears to be a little off: 47 g phenol : 43 g KNO2: 21 g NaOH: 224 mL/(purity nitric acid used) of nitric acid. I'm not currently in a place to be able to balance the reaction and give the ratio of DNP produce, but I trust you'll be able to do so for your PR? I can assist later if not.

Better to have nice round numbers than perfect accuracy, as long as its close enough. Though I might be convinced for going stichiometrically accurate once all reagents are converted to ml/grams and have concentrations defined.

And, as erk says: this really needs to consume some analysis charges. Your source even mentioned the MP to check.

No, you need a scale and a thermometer (like for almost ANY reaction). And for .5C precision test one does not need to go to F-J aparatus - a test tube, some oil and thermometer will do.

[ [ "chem_nitric_acid", 2 ] ],
[ [ "chem_saltpetre", 40 ] ],
[ [ "lye_powder", 100 ] ],
[ [ "scrap", 1 ] ]
]
},
{
"type": "recipe",
"result": "chem_tnt",
"category": "CC_CHEM",
"subcategory": "CSC_CHEM_CHEMICALS",
"byproducts": [ [ "gasoline", 2 ] ],
"skill_used": "cooking",
"difficulty": 7,
"time": "4 h",
"batch_time_factors": [ 95, 3 ],
"charges": 250,
"book_learn": [ [ "textbook_anarch", 5 ], [ "reference_cooking", 8 ], [ "reference_explosives", 4 ] ],
"qualities": [ { "id": "CHEM", "level": 3 } ],
"//": "no open flames strongly advised - perhaps add noflame_surface_haet, quite slow but scales extremely well",
"tools": [ [ [ "surface_heat", 75, "LIST" ] ] ],
"components": [
[ [ "chem_toluene", 250 ], [ "paint_thinner", 300 ] ],
[ [ "chem_nitric_acid", 2 ] ],
[ [ "chem_sulphuric_acid", 1 ] ],
[ [ "gasoline", 750 ] ],
[ [ "water_clean", 2 ] ],
[ [ "lye", 1 ], [ "ammonia", 1 ] ]
]
}
]