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

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

wants to merge 7 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Jan 18, 2020

Summary

SUMMARY: Content "adds chem_dnp chem_tnt, chem_toluene and recipes"

Purpose of change

Reworking explosives - mostly from chemistry perspective

  • Added 2,4-DNP and its synthesis recipe
  • Added two recipes for phenol synthesis (from acetylsalicylic acid and coal cracking)
  • Added TNT and its synthesis recipe
  • Added Toluene (found in labs) and Paint thinner (hardware stores etc), usable as toluene substitute
  • Updated supply groups
  • Added explosives_reference book

Describe alternatives you've considered

Adding more in one go

Testing

recipes work, debug spawning works, spawning contained works
note chem_phenol does not have weight defined so results appear strange

Notes

DNP should be the explosive of choice for any budding post-apocalyptic chemist, it is safe and easy to make while also being more economical than TNT - since other than hardware store paint thinner (done) or finding toluene cistern in some chemical factory (try bottle in a lab, perhaps a tank one day), most accessible roads to toluene are from phenol.

TNT equivalent (RE factor) of DNP is 0.81

@Brian-Otten
Copy link
Contributor

Looking good to me, if i may make a suggestion, if you add the DNP as an alternative explosive material to the bombs where it makes sense it would give the player a reason to craft it along with the method.
Add enough DNP so it's the same TNT equivalent as the other explosive materials in the recipe and this PR has a purpose for the players right away.

@ghost
Copy link
Author

ghost commented Jan 18, 2020

That's not a bad idea but I rather do that after adding TNT (in the next issue) and reviewing dynamites, RDX, CompB and CompC (in the one following, which would mostly conclude secondary explosives) than go over changing recipe list multiple times.

@Maleclypse
Copy link
Member

Is this related to Tannerite? I understand that Tannerite the most common commercially available explosive in the US and fairly chemically modular to people with a degree in chemistry? Also Tannerite should be found easily in gun stores. If not it's cool, I'll just put adding Tannerite on my todo list.

@ghost
Copy link
Author

ghost commented Jan 18, 2020

Not at all, DNP is WWI era explosive used primarily in large ordinance, by WWII it was completely supplanted by RDX as importance of power/weight ratio rose (its a secondary consideration in artillery shells or a naval torpedo, but with bombers weight matters) and resulting development of industrial production methods of cyclonite.

@ghost
Copy link
Author

ghost commented Jan 18, 2020

Tannerite seems to be rough equivalent of ammonium nitrate based gunpowder, about as powerful as black powder but with faster detonation. ANFO, even from fertilizer grade (non prilled crystals) is a much better bang for your AN buck.

@Shodan14
Copy link

Looking forward to thermite for opening all those sneaky metal bunker doors.

@John-Candlebury John-Candlebury added [JSON] Changes (can be) made in JSON Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Items / Item Actions / Item Qualities Items and how they work and interact labels Jan 18, 2020
@ghost
Copy link
Author

ghost commented Jan 18, 2020

Looking forward to thermite for opening all those sneaky metal bunker doors.

So am I. And sneaky metal bunker doors - was that parapraxis from making sneaky feature request?

Seriously though, don't get you hopes up but I'll see what can be done - after explosives.

@ghost ghost changed the title Explosive chemistry - in very small steps, issue I Explosive chemistry - in very small steps, issue I & II Jan 19, 2020
@ghost ghost mentioned this pull request Jan 19, 2020
28 tasks
Copy link
Member

@I-am-Erk I-am-Erk left a comment

Choose a reason for hiding this comment

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

About my only concern is that advchem, labchem, and textbook_chemistry are severely overloaded books already... I was planning to break them up. Perhaps you could add a cookbook with this, eg "Sins of our Fathers: explosives of the 20th century" and put them in there at a reasonable level, bumping up the level or removing them from the others? It's not a requirement but otherwise someone else is going to have to do it soon.

Edit: I also think you should be requiring the ANALYSIS tool property here, at least. You'd be a fool to attempt to make explosives without basic chemical analysis tools.

@ghost
Copy link
Author

ghost commented Jan 21, 2020

I was planning to break them up.

Good idea, there should be more variants, about splitting up recipes though.. Well, they are chemistry books after all - it's not a bug, it's a (core) feature.

Perhaps you could add a cookbook with this, eg "Sins of our Fathers: explosives of the 20th century" and put them in there at a reasonable level, bumping up the level or removing them from the others? It's not a requirement but otherwise someone else is going to have to do it soon.

Title carries moral judgement - I would be weary of trusting single word from such book. How about I just plagiarize the title of my primary reference - "The Preparatory Manual of Explosives".

Edit: I also think you should be requiring the ANALYSIS tool property here, at least. You'd be a fool to attempt to make explosives without basic chemical analysis tools.

Not really, you're not devising new procedures to write a paper about but following tried and tested ones, perhaps adapting some industrial process at most. As to new qualities at large, nearly all of them can be improvised to sufficient degree and are tools of convenience, also chemistry set should contain thermometer, litmus paper and small electronic scale to be of any use - for anything really, just overlooking this for now.

@I-am-Erk
Copy link
Member

I-am-Erk commented Jan 21, 2020

Title carries moral judgement

Use a different one then, I was writing that as a humorous option.

Not really, you're not devising new procedures to write a paper about but following tried and tested ones, perhaps adapting some industrial process at most. As to new qualities at large, nearly all of them can be improvised to sufficient degree and are tools of convenience, also chemistry set should contain thermometer, litmus paper and small electronic scale to be of any use - for anything really, just overlooking this for now.

The chemistry set doesn't have charges and isn't constructed with those items, so no, it doesn't have it. It's lab glassware and a few other bits and pieces, that's why I added the analytical tools in the first place.

If you want to make jury riggable analytical tools, I'd be all for that, but it's not the sort of thing that should be done in background assumptions, especially not when you're talking about synthesizing explosives.

@ghost
Copy link
Author

ghost commented Jan 22, 2020

The chemistry set doesn't have charges and isn't constructed with those items, so no, it doesn't have it. It's lab glassware and a few other bits and pieces, that's why I added the analytical tools in the first place.

Adding a bit of wire and a hotplate to what was previously few jars, bottles and hoses does not warrant upgrading chem from 2 to 3 nor dropping in labs as standard equipment - hence I always treated that recipe as placeholder.

I suppose it is time to upgrade it to something more representative. At least kitchen precision, small electronic scale and thermometer are a must, adding some bits of glass, copper and plastic, along with thermal processing requirements could represent various fittings required.
But frankly more comprehensive approach would be preferred here, eg. making chem set from glassware pieces found in labs with an option of replacing few bits like bakers with jars etc, not as direct upgrade of basic chem set. Though, when going this route, care should be taken so as not to end up with dozen of rb flask variations with different joint sizes and neck counts and so on.

NB. Analysis should be reserved for when you actually do require exceptional purity, eg. injectables.

@tenmillimaster
Copy link
Member

tenmillimaster commented Jan 23, 2020

adapting some industrial process at most

Scaling down from process scale to small batch is simply unfeasible in some cases. Chemists I have worked with have often lamented that their equipment could not replicate conditions producible in the plant. Take for example, ethylene production. Small scale lab synthesis isn't done at a kajillion degrees with hydrocarbons and steam, it's done with ethanol and sulfuric acid.

Adding a bit of wire and a hotplate to what was previously few jars, bottles and hoses does not warrant upgrading chem from 2 to 3 nor dropping in labs as standard equipment - hence I always treated that recipe as placeholder.

It sounds like you're referring to the chemistry set. The chemistry set is plenty useful without the analysis tools you're suggesting, a thermometer, scale and etc. The glassware alone is useful for basic synthesis and extraction. But purification and QC are very important steps to consider here, specifically for these explosives.

Erk is referring to the "basic analysis kit" which, with its melting point apparatus, you could use to determine Identity (melting point temperature) and some measure of purity (instanteous or gradual transition from solid->liquid. If you pair that with a decent thermometer and slightly upgraded distillation setup, you can get some idea of whatever compound you're getting.

"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.

"//": "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.

@ghost
Copy link
Author

ghost commented Jan 23, 2020

adapting some industrial process at most

Scaling down from process scale to small batch is simply unfeasible in some cases. Chemists I have worked with have often lamented that their equipment could not replicate conditions producible in the plant. Take for example, ethylene production. Small scale lab synthesis isn't done at a kajillion degrees with hydrocarbons and steam, it's done with ethanol and sulfuric acid.

Indeed, there are industrial processes that can be scaled down easily, some with more difficulty and some that it would be impossible. Your point?

Adding a bit of wire and a hotplate to what was previously few jars, bottles and hoses does not warrant upgrading chem from 2 to 3 nor dropping in labs as standard equipment - hence I always treated that recipe as placeholder.

It sounds like you're referring to the chemistry set.
I am.

The chemistry set is plenty useful without the analysis tools you're suggesting, a thermometer, scale and etc. The glassware alone is useful for basic synthesis and extraction. But purification and QC are very important steps to consider here, specifically for these explosives.

The chemistry set in game is basic chemistry set (made from bottles/jars) combined with hotplate and wire. Please do explain how it is a significant improvement that lets you do what it does.

Erk is referring to the "basic analysis kit" which, with its melting point apparatus, you could use to determine Identity (melting point temperature) and some measure of purity (instanteous or gradual transition from solid->liquid. If you pair that with a decent thermometer and slightly upgraded distillation setup, you can get some idea of whatever compound you're getting.

This is going out of scope. You need a scale and a thermometer for almost ANY reaction if you hope for it to yield useful product. I believe explicitly adding those qualities/ingredients to chemistry set would solve and future-proof this whole contention much better than adding analysis to everything.

ie.
chem 1 = somewhat acid-proof pot, eyeball your products in
chem 2 = makeshift/basic glassware, can distil but no temperature control and measurement devices are limited to spoons and roughly graduated bottle cutoffs
chem 3 = basic+ glassware, funnel included, can distill with temperature control, .5g precision kitchen electronic scale equivalent or better, mercury thermometer,
so chem 3 covers important bits of analysis kit and separation (can be done with makeshift clamp, funnel and bit of silicon/pvc hose)

@tenmillimaster
Copy link
Member

tenmillimaster commented Jan 23, 2020

My point with the scaling down process is that it is a flawed idea, in general, to assume that most industrial processes can be feasibly replicated on the bench.

As it pertains specifically to your PR, pyrolysis and separation and purification of useful endproducts from the tars and condensates of coal is very much an industrial process. A portion of the yielded product would indeed be phenol, a larger portion would be phenol deriviatives and other aromatics, another portion would be various alkanes, and also some polyaromatics. This is best done at a faction level, in my opinion, as it involves moving from just coal to coal tar, coal ash, various condensates, and controlling the pyrolysis under various atmopsheres.

Adding analysis to recipes covers some of the synthesis criteria/equipment, but it is largely done for quality control purposes.

That quality was merged for this kind of work, and is meant to future proof it, as you suggest.

I do not need to justify the differences between the chemistry set and basic chemistry set. That is not relevant to this pull request.

If, however, you would like to add another chemistry set item that contained a balance, some more handling tools, and process apparti (heating elements, foil, stir plate+stirbar, volumetric ware or whatever, and a balance) then you could, sure. We could add a "weighing" tool quality, and assign it to the balance, the analysis kit, and some hypothetical expanded chemistry set.

This would not reduce your need for some basic quality control.

@tenmillimaster
Copy link
Member

On NOx emissions: since you want to do dilutions/additions slower to control heat than the time recommended, you would also increase your exposure to the NOx fumes. A fumehood furniture item has been added, why not just require that? Or a makeshift glovebox.

@ghost
Copy link
Author

ghost commented Jan 23, 2020

As it pertains specifically to your PR, pyrolysis and separation and purification of useful endproducts from the tars and condensates of coal is very much an industrial process. A portion of the yielded product would indeed be phenol, a larger portion would be phenol deriviatives and other aromatics, another portion would be various alkanes, and also some polyaromatics. This is best done at a faction level, in my opinion, as it involves moving from just coal to coal tar, coal ash, various condensates, and controlling the pyrolysis under various atmopsheres.

Phenol seems to be primary product according to doi.org/10.1016/j.fuproc.2014.06.004

Also, while coal cracking is an industrial process, it translates reasonably well, especially if you don't care about other byproducts and can concentrate on dominant fraction.

@ghost
Copy link
Author

ghost commented Jan 23, 2020

On NOx emissions: since you want to do dilutions/additions slower to control heat than the time recommended, you would also increase your exposure to the NOx fumes. A fumehood furniture item has been added, why not just require that? Or a makeshift glovebox.

  1. Slower dilution also greatly limits NO evolution
  2. That would be going way to far into excessive realism territory

@ghost
Copy link
Author

ghost commented Jan 23, 2020

IDK how I feel about all this, analysis kit used like that does not sit well with me. Spectrophotometer, full blown F-J apparatus.. analysis as its own quality makes sense for some applications, but adding it to everything just to account for gram precision weighting, occasional rough MP estimation and where odd bit of litmus paper suffices for ph control seems ill conceived idea.

@tenmillimaster
Copy link
Member

Like I said above, it's mostly for quality control, not the use of a balance.

Table 2 of doi.org/10.1016/j.fuproc.2014.06.004 says that the of the coal samples tested, 0.02, 0.03, 0.17, and 0.01 micrograms of phenol per gram of coal was recovered. Of the same samples, .72, .34, 2.4, and .11 micrograms of phenols per gram of coal were recovered, respectively.

You're correct that NOx formation would be lower. To avoid thermal runaway during the last addition of nitric acid, I suggest titrating it in slowly instead of adding it as the paper suggests.

A chiller loop item or water jacket, or chilled bath would really be helpful here.

@ghost
Copy link
Author

ghost commented Jan 23, 2020

To avoid thermal runaway during the last addition of nitric acid, I suggest titrating it in slowly instead of adding it as the paper suggests.

That is standard practice, I reckon they just forgot the obvious. Also, I did that reaction, several times in fact.

@ghost
Copy link
Author

ghost commented Jan 23, 2020

Table 2 of doi.org/10.1016/j.fuproc.2014.06.004 says that the of the coal samples tested, 0.02, 0.03, 0.17, and 0.01 micrograms of phenol per gram of coal was recovered. Of the same samples, .72, .34, 2.4, and .11 micrograms of phenols per gram of coal were recovered, respectively.

table 2 is coal extract, table 4 is cracking product...

@ghost
Copy link
Author

ghost commented Jan 23, 2020

Like I said above, it's mostly for quality control, not the use of a balance.

And like I said above, MP test of sufficient precision can be done with basic glassware and thermometer.

@I-am-Erk
Copy link
Member

I-am-Erk commented Jan 23, 2020

Ok, 1n17, you have both of the chemists on the dev team arguing with you here and we're getting nowhere. If your issue is with chemistry tools and their properties, raise an issue about that, back up your statements, and propose changes there. I don't even disagree with your general point, the "analysis" property is intentionally vague so that recipes and players don't have to track in detail which exact analysis tools they have, but that does mean it's overkill for some things.

In this PR, we've told you what you need and you staunchly refuse to listen. I don't have the time or mental energy for this: either add the requested details, or I will close the PR because it's not going to meet requirements from the maintainers of the project and we're all just wasting our time.

@tenmillimaster
Copy link
Member

Oops!

Table 3 and 4 were for the novel methods, not the standard extract. Thanks for catching that.

Looks like we get... 1116 ug phenol/g raw coal on average doing simple pyrolysis and a bit more if we do a sequential one. This is still a small fraction, and is still in a mixture with other phenolic compounds requiring more separation or conversions.

@ghost
Copy link
Author

ghost commented Jan 23, 2020

If by standard extract you mean pre cracking coal, then yes.

@ghost
Copy link
Author

ghost commented Jan 23, 2020

If your issue is with chemistry tools and their properties

It appears so

...or I will close the PR

Neither do I. I reckon I will be closing it anyhow as we cant seem to get a consensus on analysis quality, its purpose and relation to chem quality. Although considering relevant information on chemistry set surfaced in #37232, I would hope it changes things, if it doesn't - I consider whole project scrapped.

@I-am-Erk
Copy link
Member

I-am-Erk commented Jan 23, 2020

There's plenty of consensus on what analysis means.

#27206
#27212

Again, you're not understanding what a tool quality is. I'm not saying your recipe requires the basic analysis kit. I'm saying it needs analysis to pass. Using a tool quality allows for other objects to have the tool quality. If you really want to, you can do what I decided against in that second link, and add sub-qualities for individual tools, but I stand by my rationale for leaving those out.

It doesn't really matter what the original intent of the Chem tool quality was, it currently represents what is represented in the sets - having something to be the basic glassware, clamps, filters, stands, and other things you need to set up a lab environment.

For the record, my child has three different kids chemistry sets, and not one has a weigh scale or thermometer. All the ingredients are pre-measured, and the only temperature based measurements I've seen are "touch it, feel that it got warm".

@tenmillimaster
Copy link
Member

tenmillimaster commented Jan 23, 2020

The changes requested are small. Add tool qualities, axe coal pyrolysis or greatly reduce yields and increase times.
There is good work here, I would like to see it in game.

@Zireael07
Copy link
Contributor

Chem tool quality represents, AFAIK, the chemistry set as it is - that, is, the basic kids set as I linked in the other issue.

Nothing however stops you from adding a second, complex set that has the thermometers and whatnot, possibly with CHEM 3 or some other higher tool quality.

@stale
Copy link

stale bot commented Feb 22, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@stale stale bot added the stale Closed for lack of activity, but still valid. label Feb 22, 2020
@ifreund ifreund removed the stale Closed for lack of activity, but still valid. label Feb 22, 2020
@kevingranade
Copy link
Member

This has been sitting with must have feedback for months, feel free to reopen with those issues fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Items / Item Actions / Item Qualities Items and how they work and interact [JSON] Changes (can be) made in JSON
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants