File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 75
75
// Arbitrary number to reduce temperature by a significant amount.
76
76
var /const /base_temp_loss_per_one_reaction = - 240000
77
77
mixture. add_thermal_energy( cooling_coefficient * reaction_coefficient * base_temp_loss_per_one_reaction, 0.1 )
78
+
79
+
80
+ / datum / gas_reaction/ n2o_thermal_decomposition
81
+ name = " N2O decomposition"
82
+
83
+ / datum / gas_reaction/ n2o_thermal_decomposition/ reaction_is_possible( datum / gas_mixture/ mixture)
84
+ return mixture. temperature>= 300 + T0C && mixture[GAS_SLEEPING ]> 0
85
+
86
+
87
+ / datum / gas_reaction/ n2o_thermal_decomposition/ reaction_amounts_requested( datum / gas_mixture/ mixture )
88
+ var /to_return = list ()
89
+ var /cratio = (mixture. temperature- 300 - T0C )/ 900
90
+ cratio*= 1 - (1 / ((mixture. pressure/ ONE_ATMOSPHERE )+ 1 )) // higher pressures make more reactions happen
91
+ cratio= max(0 ,cratio)** 0.5
92
+ cratio= min(0.95 ,cratio)
93
+ to_return[GAS_SLEEPING ]= mixture[GAS_SLEEPING ]* cratio
94
+ return to_return
95
+
96
+
97
+ / datum / gas_reaction/ n2o_thermal_decomposition/ perform_reaction( datum / gas_mixture/ mixture, reactant_amounts )
98
+ if (! reactant_amounts)
99
+ return
100
+ var /const /decomposition_energy = 82050 // 82.05 Kj/mol
101
+ var /moles_n2o = reactant_amounts[GAS_SLEEPING ]
102
+
103
+ mixture[GAS_OXYGEN ]+= reactant_amounts[GAS_SLEEPING ]* 0.5
104
+ mixture[GAS_NITROGEN ]+= moles_n2o
105
+ mixture[GAS_SLEEPING ]= max(0 ,mixture[GAS_SLEEPING ]- moles_n2o)
106
+
107
+ mixture. add_thermal_energy(moles_n2o* decomposition_energy)
108
+
109
+ mixture. update_values()
You can’t perform that action at this time.
0 commit comments