Null's Math Problem for 6 Months

Working on it and posting to save a spot (Will prolly post when my kid finally decides to conk out.) but also say this:


Y'all niggas need to learn what the Soret effect is.
The basics of how I understand the problem presentaed are two discrete volumes in a cubic configuration meet, and thus form a square plane across which the gas diffuses as the temperature, approaching equilibrium forms a gradient. This leads to a momentary point in the first split second where the heat and mass transport are coupled and the diffusion thus has a bit of a head start. The last term (Which I *might* not include is a minor pressure difference between the two volumes that leads to a small momentum impulse, further speeding diffusion up by a few microseconds. After this split second though, it might as well be normal diffusion as everything reaches equilibrium.

I'll post my math soon
 
The last term (Which I *might* not include is a minor pressure difference between the two volumes that leads to a small momentum impulse, further speeding diffusion up by a few microseconds. After this split second though, it might as well be normal diffusion as everything reaches equilibrium.
do you have a formula for the pressure difference?
also what are you working with? ideal gases`?
 
do you have a formula for the pressure difference?
also what are you working with? ideal gases`?
Based on Van Der Waal's EOS the system has a 0.046 bar difference , which with equilibrium prolly being at ~.30 bar still seems like it won't be that big of a deal.

Who uses ideal gases?
 
me, but i never said that i was very smert.
For Learning:

Ideal Gas law only applies at extremely high temperatures, low Pressures, Low molecular volumes AND low reactivity conditions. This is because PV-nRT=0 treats all associated molecules as hard point masses (no volume), with perfectly elastic collisions, No intermolecular foirces, and No reactivities. This post made by the "I spent WAYYY too much time studying Thermodynamics" gang.
 
Ideal Gas law only applies at extremely high temperatures, low Pressures, Low molecular volumes AND low reactivity conditions. This is because PV-nRT=0 treats all associated molecules as hard point masses (no volume), with perfectly elastic collisions, No intermolecular foirces, and No reactivities. This post made by the "I spent WAYYY too much time studying Thermodynamics" gang.
I studied killing and dissecting small animals and plants so ideal gas law hard enough.
i also came pretty close to your pressure numbers and i still think that just using pressure and ideal gases is the best way to get a working system for a game.
 
This way lies madness. You will absolutely positively crash your server trying to compute kinetic forces in gas.

I think the kinetic forces should be based on a lookup table, like a curve or something. X gas at Y volume has Z force. Forces would be cumulative at the exit/entrance. That way you simulate the increase in pressure at exit points. So all you need to know is what gases are in which tile and add the movement data to the next tile.

Diffusion speed across tiles, make it up. Use the theoretical weight of the gases and pick a baseline. Heavier gas gets -1 speed per unit of weight while lighter gases get +.
 
For Learning:

Ideal Gas law only applies at extremely high temperatures, low Pressures, Low molecular volumes AND low reactivity conditions. This is because PV-nRT=0 treats all associated molecules as hard point masses (no volume), with perfectly elastic collisions, No intermolecular foirces, and No reactivities. This post made by the "I spent WAYYY too much time studying Thermodynamics" gang.
I studied rocks and rock accessories. Ideal gas law was the most I learned about fluid dynamics aside from the Reynolds' number when describing the point at which a fluid transitions from laminar to turbulent flow.

The fact that I remember ideal gas law is enough for me.
 
whoever answers the riddle correctly receives the curse of running the farms
 
  • Horrifying
Reactions: TurdFondler
I'm not sure if it's implicit in my post but the crux of gas diffusion and kinetics in my mind would be vector data. Gases continue on a vector until hitting an immovable/impenetrable object. The vector gets changed by 90 degrees on impact. Any impact would reduce the total kinetic force in the square, and each gas should have a hard coded limit as to kinetic longevity: ie. After existing for X minutes kinetic energy will move to 0 as you assume gas occupies the entire area equally.
 
I'm not sure if it's implicit in my post but the crux of gas diffusion and kinetics in my mind would be vector data. Gases continue on a vector until hitting an immovable/impenetrable object. The vector gets changed by 90 degrees on impact. Any impact would reduce the total kinetic force in the square, and each gas should have a hard coded limit as to kinetic longevity: ie. After existing for X minutes kinetic energy will move to 0 as you assume gas occupies the entire area equally.
That seems like much simpler math than the diffusion shit though. I don't see why I can't just calculate these vectors.

Guessing force just seems messy and stupid.
 
If you figured out the problem your way you'd be on your way to a Nobel prize. It's one of the major hangups in weather modeling. There's just SO MUCH to calculate. You'd probably need a second server just for atmo calculations.

I think this problem is similar to fuel injection in cars. It could be very complicated as you want to know how much fuel to put into a cylinder of constantly varying volume, pressure and temp but they just hard code a "good enough" fuel curve into the ECU and then it reads a few cuck sensors to find its place in the curve.
 
If you figured out the problem your way you'd be on your way to a Nobel prize. It's one of the major hangups in weather modeling. There's just SO MUCH to calculate. You'd probably need a second server just for atmo calculations.

Why can't I just say "this cube has N pressure because of its content, and the neighboring cube has N2pressure because of its contents, so therefore we can add X,Y,Z to the force vector"
 
  • Like
Reactions: TurdFondler
Why not? I was thinking keep it integer based. Cubes have modifiers based on pressure and will move towards the biggest negative difference. 0 is equilibrium and space is like - 2, for example.

So oxygen at regular pressure of +2 will move towards an adjacent space cube of - 2, leaving a cube of - 1 or something in its spots. That would start a cascade as each cube moves towards space. The next 02 cube to touch the first would add its kinetic vector to the first and so on. That way a blow out of 3 wall blocks would vent quicker but create less kinetic force as cubes don't all have to go through the same spot, so fewer cubes transfer kinetic energy.

I'll try to model it graphically when I get home.
 
I'm going to double post.


A treatise on using unsigned integers in vectors and numerical gradients to simulate gas dissipation, submitted by T. Fondler, B.Sc in Theoretical Retardology.

  • Introduction
  • Assumptions
  • Mechanics
  • Vectors
  • Demonstration 1: 3 tile breach
  • 1 tile breach
  • Demonstration 3: re-pressurizing
  • Timers
  • Gameplay Balance Issues
  • Conclusion

Introduction:

I think I have a simple, neat and scaleable solution to implementing improved gas physics and simulating kinetic energy within gases by using unsigned integers. I am a professional retard and have little experience with the BYOND engine but from my observations it should be possible to implement this system over top of the existing gas physics in game. This solution will keep the spirit of already implemented phenomena and conveniently not require any knowledge of fluid dynamics or physics, which is great because those things are bullshit.


Assumptions:
  • I will treat each in-game square as a container. I understand the squares may already be used as gas containers, but those (and their subsequent parameters) can be imagined as contained within this new container.
  • Gas pressure gradient values may transfer to vectors, but not vice-versa.
  • Vectors will contain a direction and a kinetic energy amount. Both will be on an unsigned integer scale.
  • Each container will be able to confer gradient data to the gas contained within
  • Existing pressure and temperature values will impact vector values.
  • Gases will move towards lower pressure gradients, always.
For the purpose of this explanation and to demonstrate my model I will be signing my integers because it’s easier to visualize the pressure gradient that way.

Mechanics:
  • Gases will start with a gradient value of 1 and a predetermined vector value.
  • The tile/container accumulates gradient values
  • Gradient values will impact vector values. All gases within a tile will have their vector value impacted by the tile’s gradient value.
  • Gases will always move to a lower gradient value
  • Upon encountering an impenetrable tile, gases will adjust their vector by 90 degrees
  • A tile can contain all types of gases
  • Gases are assumed to move through one another, if their vector value is below 2
  • At high enough gradient values gases will begin to act upon other gases
  • When a gas with a gradient value of 1 encounters a tile containing a gas with a gradient value of 1, the gradient will not be added.
  • Space tiles will have hard-coded and immutable negative gradient value. For the purpose of this model, we will use -2.
  • Space tiles will have increasing negative gradient as the distance from the station increases, until the gradient limit is reached. In this model the limit is -5.
  • Space tiles will accumulate vectors as regular tiles do, but with a negative modifier. The modifier increases as distance into space increases.
  • Maximum gradient space tiles destroy gas and reset vector
Vectors

Each gas will have a Vector, containing direction and force. Since each tile can be adjacent with 8 other tiles, it’s only necessary to have 8 vector values. Gases are assumed to be “spawned” at a canister or a vent/pump, their vector can be randomly determined when they are spawned in an area. Force of a gas (the kinetic energy it imparts) will be determined by the pressure and amount of gas, which are already decided in-game. The kinetic energy scale will consist of unsigned integers but the creation of the scale is outside the scope of this retardocument.
vectorAngles.png


  • Demonstration 1: 3 tile breach
  • This demonstration will show how a 3-tile breach causes realistic gas interactions using the above rules. The model consists of a room 3 tiles by 7 tiles, surrounded by a 1-tile wall and with an airlock marked in orange. The room starts off full of airmix with a gradient value of 1.
  • Granted, I’m a little drunk and my numbers are off but I think the model is pretty clear.
intactRoom1.png

An intact room

breach3_1.png

A breach of 3 tiles
breach3_2.png

02 exits via breach, gradient values accumulate near exit and decrease as gases leave tiles

breach3_3.png


breach3_final.png


As you can see, the gradient values which impart vector values increase near the exit point. It's assumed in the next image the gases in furthest space tiles will have been destroyed.


1 Tile breach

I’m not going to bother modeling it, but with the above graphics in mind, a 1 tile breach would necessarily produce much higher vectors at the exit point as all gases must transfer their vector value to a lesser amount of tiles adjacent to space tiles.

Repressurizing
  • For the sake of simplicity, I’m not delving into gas diffusion timing. I’m assuming gas diffuses at 1 tick, whether that be tied to real time clock values or existing in game tick values is irrelevant.
  • It’s assumed the room being repressurized has its walls intact and the gases within have reached equilibrium at 0 gradient value.
  • It’s assumed that the tile containing the pump will always contain the gas being pumped.
  • Gas enters the room with a gradient value of 1 with a predetermined vector. RNG could be used to give the gas a direction with a minimum value of kinetic energy.
  • In this model, the room has been repressurized via pump for a number of ticks. We are focusing on one gas. It can be assumed each tile is a discrete container for individual gases, ie. nitrogen entering a tile containing oxygen but no nitrogen encounters a gradient value of 1, but a 0% of nitrogen.
  • If a gas encounters a tile containing any value of its own type, it will enter an adjacent tile of 0% value of its own type. Once all possible tiles are populated with gas, the % of gas within a tile will increase but the vector values will not, given consistent predictable entry via pump.
    reprep1.png


Timers
  • To prevent inheritance issues which would cause increasing gas vectors in sealed rooms, I propose each tile have a timer with regards to gradient. If a tile does not obtain new values in 2 real time seconds, the gradient resets to 1 if gases present or 0 if gases absent

Gameplay balance Issues

New gas phenomena would impact the way hull breaches affect players. Currently there is little incentive to expediently repair hull breaches, as internals are plentiful and breaches do not significantly impact gameplay. The new gas mechanics would render breaches more serious, but at the benefit of creating “fun”, a little understood phenomena in current TG code. As a counter, I propose that the following mechanics be added if this gas model is implemented:
  • Smart Metal Foam Grenades contain a “smart” component. If a grenade encounters a gradient exceeding 2, it detonates regardless of timer. It would allow the user to seal breaches that would otherwise suck the grenade into space. The Smart Metal Foam is unaffected by gas gradient and kinetic energy.
  • Members of Security, Command and Engineering be given standard issue boots containing a single-use battery powering a magnetic element. Boots would turn into magboots for 15 seconds of real time, at the expense of player movement.
  • The “pull” mechanic working on immovable objects. If a player selects “pull” on a secured table, chair or other object, they will resist the kinetic gas forces until a certain threshold is passed, wherein they release.
Conclusion:

I have autism please laugh at me.
 
This isn't for SS13 specifically, just something I'm doing, but your diagrams are useful. I disagree that you need 8 adjacent tiles however. I think 6 works for a cube. The diagonal adjacents aren't important.

Going on a train ride today. Going to pick up a book on this and try to cram some in.
 
  • Agree
Reactions: TurdFondler
In SS13 specifically diagonal adjacents would add more unpredictability in depressurization events and would ensure gases don't always end up perpendicular to walls they hit.

That's the only reason I've included them, but otherwise yeah they're not important.

Also, in SS13 specifically I would model gases 2 dimensionally only to cut down on processing. It wouldn't meaningfully impact player experience I don't think.

Keep us updated on your weather control machine progress, Null.
 
Back