Page 1 of 1

TTV Simulation or I Have Too Much Time

Posted: Sun Nov 17, 2019 9:37 am
by Alureon
Alright everyone, let's get straight to the point: I want to make a spreadsheet that tells me what the resulting pressure would be if I were to connect two tanks of gasses together and let them mix. Basically, it's a TTV simulator. However, there are several issues which I need to resolve before I can go about making my spreadsheet. These are:

1) I need to know the molar heat capacity of each of the gasses involved (ie. Tritium, Oxygen, Plasma, Carbon Dioxide, and Water Vapor). I have read the Wiki's Guide to Atmospherics, and it does provide the heat capacity of each gas. What units are the heat capacities in? Yes, that is very important here.

Image
Not exactly helping if we don't know the units

2) I need to know how many moles of oxygen it takes to combust 1 mole of plasma and how many moles of oxygen it takes to combust one mole of tritium. I have already done experiments in-game to determine that, so this issue is solved.

3) I need to determine how much energy is actually released by the combustion of plasma and tritium. If I know the answer to Issue 1, this should be straightforward.

4) I have been told that the yield of a TTV or single-tank bomb is determined by the pressure that is inside the container when the gasses react. More pressure=more boom. This seems logical, but then again, games don't follow logic. Is what I have been told true?

5) How difficult do you think making this would be?

6) Besides the fact that there is a cap on explosion size, what aspects of the game could otherwise cause my spreadsheet to be inaccurate?

Frequently Asked Questions:
1) Do you have a life?
No
2) Do you plan on sharing it when you're done?
Yes. I'm not a goonfag.
3) Why not just experiment in the bomb lab?
Trial-and-error experimentation is not something that I find appealing. Trying out every combination of gasses at different temperatures until you find one that yields the biggest boom seems like a task best suited for a computer.

Re: TTV Simulation or I Have Too Much Time

Posted: Sun Nov 17, 2019 12:09 pm
by deedubya
Figuring this stuff out is the entire point of playing toxins. The whole process of discovery is all that there is. Once you've figured out the best way to achieve your maxcaps, it's just antag rolling or on to a new job.

Re: TTV Simulation or I Have Too Much Time

Posted: Sun Nov 17, 2019 2:09 pm
by Dr_bee
Reading atmos code would probably be your best bet to figuring out the basic math. Granted that would require reading atmos code, which is punishment in itself.

Re: TTV Simulation or I Have Too Much Time

Posted: Sun Nov 17, 2019 5:06 pm
by Yenwodyah
You might find this, this, and this useful.

Re: TTV Simulation or I Have Too Much Time

Posted: Sun Nov 17, 2019 5:34 pm
by Electronics
Having made one of these myself, I think it might be a bit hard to figure out in a spreadsheet. There's quite a lot of reactions that block others running in a tick, and also a TTV sometimes takes multiple reaction cycles to actually hit the pressure to cause an explosion. Really looking through the atmos processing code (between tanks/vessels) would be my starting point and getting to understand how it all works. Do also try some testing in game, I seem to remember some things if you take the face-value of what it said in the code, it wasn't exactly how BYOND decided the calculation would work due to rounding and such like.

Re: TTV Simulation or I Have Too Much Time

Posted: Sun Nov 17, 2019 6:12 pm
by skoglol
Electronics wrote:Having made one of these myself, I think it might be a bit hard to figure out in a spreadsheet. There's quite a lot of reactions that block others running in a tick, and also a TTV sometimes takes multiple reaction cycles to actually hit the pressure to cause an explosion. Really looking through the atmos processing code (between tanks/vessels) would be my starting point and getting to understand how it all works. Do also try some testing in game, I seem to remember some things if you take the face-value of what it said in the code, it wasn't exactly how BYOND decided the calculation would work due to rounding and such like.
Even yours wasn't very precise, maybe it would work better now that there is just a single reaction before it blows.

Re: TTV Simulation or I Have Too Much Time

Posted: Sun Nov 17, 2019 8:38 pm
by oranges
we'll change the bomb equations again, don't test us

Re: TTV Simulation or I Have Too Much Time

Posted: Sun Nov 17, 2019 10:55 pm
by skoglol
Not even intentionally

Re: TTV Simulation or I Have Too Much Time

Posted: Sun Nov 17, 2019 11:48 pm
by ThanatosRa
oranges wrote:we'll change the bomb equations again, don't test us
Do it

Re: TTV Simulation or I Have Too Much Time

Posted: Mon Nov 18, 2019 5:11 am
by Dr_bee
ThanatosRa wrote:
oranges wrote:we'll change the bomb equations again, don't test us
Do it
Random bomb equations when?

Re: TTV Simulation or I Have Too Much Time

Posted: Mon Nov 18, 2019 5:22 am
by Sandshark808
Dr_bee wrote:
ThanatosRa wrote:
oranges wrote:we'll change the bomb equations again, don't test us
Do it
Random bomb equations when?
>round starts
>bomb and fusion formulas are randomized
>lavaland atmosphere is randomized
>lavaland is now a fusion canister
Please coderbus please.

Re: TTV Simulation or I Have Too Much Time

Posted: Mon Nov 18, 2019 5:57 am
by Alureon
Yenwodyah wrote:You might find this, this, and this useful.
I just read through those three files. Either I'm a smoothbrain, or they do not actually contain the information I seek. From my understanding, they only say things to the effect of "Do this operation with HEAT_CAPACITY", not what the heat capacity actually is.

Re: TTV Simulation or I Have Too Much Time

Posted: Mon Nov 18, 2019 7:37 am
by Grazyn
oranges wrote:we'll change the bomb equations again, don't test us
Research points are capped and the wiki already explains how to reach the cap in one boom. Explosion size is capped too. So even if they figure out the secret bomb theory of everything, there will be no difference in game except for higher numbers in the tachyon report thing.

Re: TTV Simulation or I Have Too Much Time

Posted: Mon Nov 18, 2019 7:03 pm
by Sandshark808
Grazyn wrote:
oranges wrote:we'll change the bomb equations again, don't test us
Research points are capped and the wiki already explains how to reach the cap in one boom. Explosion size is capped too. So even if they figure out the secret bomb theory of everything, there will be no difference in game except for higher numbers in the tachyon report thing.
Knowing byond, what would happen is that a minmaxer would just cause the number to get so high it reset to the lowest possible integer and it would destroy 0 tiles.

Re: TTV Simulation or I Have Too Much Time

Posted: Tue Nov 19, 2019 6:11 am
by Alureon
So I tried to test whether the wiki was being truthful with the heat capacities of the gasses. Now, the molar heat capacity of a substance is the temperature needed to raise one mole of said substance by 1 kelvin. As we know, the energy released or absorbed is equal to the amount of moles multiplied by the molar heat capacity multiplied by the change in temperature.

Here was my experiment: I took a default tank containing room-temperature oxygen, which according to the wiki has a heat capacity of 20 and noted the amount of moles. I then heated a canister of N2O (Heat cap of 40, according to the wiki) a bit, noted the temperature and amount of moles, then added some of the heated N2O to the oxygen tank and recorded the final temperature. Now, if the wiki is being truthful with the heat capacities of the gasses, then the mol*deltaT*Heatcap for the O2 should equal to the mol*deltaT*heatcap for N2O, but I got nothing of the sort.

Tl;DR: The wiki lied about the heat capacities of the gasses.

Re: TTV Simulation or I Have Too Much Time

Posted: Tue Nov 19, 2019 6:18 am
by Whoneedspacee
the wiki isnt wrong you’re wrong

don’t release it it never works out, as that guy said this is the entire job, don’t ruin it (i did)

not that oranges is even close to correct about changing the bomb equations or some shit, they just nerfed the hell out of point gen lol

Re: TTV Simulation or I Have Too Much Time

Posted: Tue Nov 19, 2019 6:46 am
by Alureon
Whoneedspacee wrote:the wiki isnt wrong you’re wrong

don’t release it it never works out, as that guy said this is the entire job, don’t ruin it (i did)

not that oranges is even close to correct about changing the bomb equations or some shit, they just nerfed the hell out of point gen lol
Here is my data for the experiment:
Image
What do you find wrong with it?
don’t release it it never works out, as that guy said this is the entire job, don’t ruin it (i did)
I will release it if I complete it. If one wants to experiment in the bomb lab him/herself, he/she is free to not use my spreadsheet. I, however, am not a fan of SIKREET content.

Re: TTV Simulation or I Have Too Much Time

Posted: Tue Nov 19, 2019 4:33 pm
by Whoneedspacee
energy = specific heat * moles * temperature

temperature = energy / (specific heat * moles)

energy_oxy = 17.47 * 20 * 293.15

energy_n2o = 852.96 * 2.88 * 40

(energy_oxy + energy_n20) / (17.47 * 20 + 2.88 * 40)

final temp = 431.957 kelvin

Re: TTV Simulation or I Have Too Much Time

Posted: Wed Nov 20, 2019 1:17 am
by Alureon
Whoneedspacee wrote:energy = specific heat * moles * temperature

temperature = energy / (specific heat * moles)

energy_oxy = 17.47 * 20 * 293.15

energy_n2o = 852.96 * 2.88 * 40

(energy_oxy + energy_n20) / (17.47 * 20 + 2.88 * 40)

final temp = 431.957 kelvin
You are right: The numbers for the heat capacities on the Wiki are correct (At least for O2 and N2O) and I was wrong. I did another experiment, and the final temperature calculated by doing what you did matched the actual final temperature.

What I tried to do was calculate the energy absorbed by the oxygen and the energy released by the N2O using the mol*DeltaT*Heatcap formula and see if the energy absorbed by the O2 and released by N2O were equal to determine whether the heat capacities for each gas were accurate. It seems as though gasses (at least in SS13) do not work like that.

Thank you.