TTV Simulation or I Have Too Much Time

General SS13 Chat
Post Reply
Alureon
Joined: Sat Nov 16, 2019 8:46 am
Byond Username: Alureon

TTV Simulation or I Have Too Much Time

Post by Alureon » #524438

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.
deedubya
Confined to the shed
Joined: Wed Aug 15, 2018 2:05 am
Byond Username: Deedubya
Location: shitting up your thread

Re: TTV Simulation or I Have Too Much Time

Post by deedubya » #524446

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.
Galatians 4:16 "Have I now become your enemy by telling you the truth?"
hey imma teegee admeme compliment me on my appearance here

flattering compliments people have given me:
Spoiler:
oranges wrote:honestly holy shit deedubs you're a dent head
wesoda25 wrote:deedub is one of the people that makes me wish i could block users on forums
IkeTG wrote:every post from deedubya is worrying behavior
Super Aggro Crag wrote:you're a poo head!!!!!
TheMythicGhost wrote:You're a moron, but that's really nothing new since you're Deedubya, and really at this point I'm just playing an instrument by speaking since your head is so goddamn empty these words are resonating as they pass through.
Lazengann wrote:What's interesting about deedubya is the guy has no reading skills or comprehension and his ADHD is so severe he can't read through a single thread but he shows up to argue anyway
annoyinggreencatgirl wrote:you really are almost superhumanly retarded dude, holy smokes.
Image
Dr_bee
Joined: Fri Dec 23, 2016 6:31 pm
Byond Username: DrBee

Re: TTV Simulation or I Have Too Much Time

Post by Dr_bee » #524449

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.
User avatar
Yenwodyah
Joined: Mon Jan 15, 2018 10:47 pm
Byond Username: Yenwodyah
Github Username: Yenwodyah

Re: TTV Simulation or I Have Too Much Time

Post by Yenwodyah » #524459

You might find this, this, and this useful.
Image
User avatar
Electronics
Github User
Joined: Fri Sep 19, 2014 4:49 pm
Byond Username: Electronics111
Github Username: Electronics

Re: TTV Simulation or I Have Too Much Time

Post by Electronics » #524461

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.
User avatar
skoglol
Joined: Wed Jun 13, 2018 5:25 am
Byond Username: Skoglol
Github Username: kriskog

Re: TTV Simulation or I Have Too Much Time

Post by skoglol » #524463

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.
User avatar
oranges
Code Maintainer
Joined: Tue Apr 15, 2014 9:16 pm
Byond Username: Optimumtact
Github Username: optimumtact
Location: #CHATSHITGETBANGED

Re: TTV Simulation or I Have Too Much Time

Post by oranges » #524479

we'll change the bomb equations again, don't test us
User avatar
skoglol
Joined: Wed Jun 13, 2018 5:25 am
Byond Username: Skoglol
Github Username: kriskog

Re: TTV Simulation or I Have Too Much Time

Post by skoglol » #524492

Not even intentionally
User avatar
ThanatosRa
Rarely plays
Joined: Fri Apr 18, 2014 4:07 pm
Byond Username: ThanatosRa
Location: Las Vegas, Nevada, USA

Re: TTV Simulation or I Have Too Much Time

Post by ThanatosRa » #524499

oranges wrote:we'll change the bomb equations again, don't test us
Do it
my forum gimmick is that no one knows who i am

gender is irrelevant NO UR IRRELEVANT
u a bish
y u heff 2 b med
Dr_bee
Joined: Fri Dec 23, 2016 6:31 pm
Byond Username: DrBee

Re: TTV Simulation or I Have Too Much Time

Post by Dr_bee » #524522

ThanatosRa wrote:
oranges wrote:we'll change the bomb equations again, don't test us
Do it
Random bomb equations when?
User avatar
Sandshark808
Joined: Wed Sep 04, 2019 6:56 pm
Byond Username: Sandshark808

Re: TTV Simulation or I Have Too Much Time

Post by Sandshark808 » #524525

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.
Image
Alureon
Joined: Sat Nov 16, 2019 8:46 am
Byond Username: Alureon

Re: TTV Simulation or I Have Too Much Time

Post by Alureon » #524534

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.
User avatar
Grazyn
Joined: Tue Nov 04, 2014 11:01 am
Byond Username: Grazyn

Re: TTV Simulation or I Have Too Much Time

Post by Grazyn » #524544

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.
User avatar
Sandshark808
Joined: Wed Sep 04, 2019 6:56 pm
Byond Username: Sandshark808

Re: TTV Simulation or I Have Too Much Time

Post by Sandshark808 » #524599

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.
Image
Alureon
Joined: Sat Nov 16, 2019 8:46 am
Byond Username: Alureon

Re: TTV Simulation or I Have Too Much Time

Post by Alureon » #524682

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.
User avatar
Whoneedspacee
Joined: Mon May 21, 2018 2:07 am
Byond Username: Whoneedspacee

Re: TTV Simulation or I Have Too Much Time

Post by Whoneedspacee » #524683

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
retired ss13 coderman
Alureon
Joined: Sat Nov 16, 2019 8:46 am
Byond Username: Alureon

Re: TTV Simulation or I Have Too Much Time

Post by Alureon » #524687

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.
User avatar
Whoneedspacee
Joined: Mon May 21, 2018 2:07 am
Byond Username: Whoneedspacee

Re: TTV Simulation or I Have Too Much Time

Post by Whoneedspacee » #524725

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
retired ss13 coderman
Alureon
Joined: Sat Nov 16, 2019 8:46 am
Byond Username: Alureon

Re: TTV Simulation or I Have Too Much Time

Post by Alureon » #524757

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.
Post Reply

Who is online

Users browsing this forum: No registered users