mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Added heat radiation to H/E pipes
Added black-body heat radiation to H/E pipes placed over /turf/space according to Stephan-Botzmann law
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
#define STEFAN_BOLTZMANN_CONSTANT 0.0000000567
|
||||||
|
|
||||||
datum/pipeline
|
datum/pipeline
|
||||||
var/datum/gas_mixture/air
|
var/datum/gas_mixture/air
|
||||||
|
|
||||||
@@ -39,7 +41,7 @@ datum/pipeline
|
|||||||
|
|
||||||
member.air_temporary.oxygen = air.oxygen*member.volume/air.volume
|
member.air_temporary.oxygen = air.oxygen*member.volume/air.volume
|
||||||
member.air_temporary.nitrogen = air.nitrogen*member.volume/air.volume
|
member.air_temporary.nitrogen = air.nitrogen*member.volume/air.volume
|
||||||
member.air_temporary.phoron = air.phoron*member.volume/air.volume
|
member.air_temporary.toxins = air.toxins*member.volume/air.volume
|
||||||
member.air_temporary.carbon_dioxide = air.carbon_dioxide*member.volume/air.volume
|
member.air_temporary.carbon_dioxide = air.carbon_dioxide*member.volume/air.volume
|
||||||
|
|
||||||
member.air_temporary.temperature = air.temperature
|
member.air_temporary.temperature = air.temperature
|
||||||
@@ -209,5 +211,12 @@ datum/pipeline
|
|||||||
(partial_heat_capacity*target.heat_capacity/(partial_heat_capacity+target.heat_capacity))
|
(partial_heat_capacity*target.heat_capacity/(partial_heat_capacity+target.heat_capacity))
|
||||||
|
|
||||||
air.temperature -= heat/total_heat_capacity
|
air.temperature -= heat/total_heat_capacity
|
||||||
|
if(network)
|
||||||
|
network.update = 1
|
||||||
|
|
||||||
|
proc/radiate_heat(surface, thermal_conductivity)
|
||||||
|
var/total_heat_capacity = air.heat_capacity()
|
||||||
|
var/heat = STEFAN_BOLTZMANN_CONSTANT * surface * air.temperature ** 4 * thermal_conductivity
|
||||||
|
air.temperature = max(0, air.temperature - heat / total_heat_capacity)
|
||||||
if(network)
|
if(network)
|
||||||
network.update = 1
|
network.update = 1
|
||||||
@@ -4,6 +4,7 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging
|
|||||||
icon_state = "intact"
|
icon_state = "intact"
|
||||||
level = 2
|
level = 2
|
||||||
var/initialize_directions_he
|
var/initialize_directions_he
|
||||||
|
var/surface = 2
|
||||||
|
|
||||||
minimum_temperature_difference = 20
|
minimum_temperature_difference = 20
|
||||||
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
|
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
|
||||||
@@ -49,12 +50,11 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging
|
|||||||
else
|
else
|
||||||
var/datum/gas_mixture/environment = loc.return_air()
|
var/datum/gas_mixture/environment = loc.return_air()
|
||||||
environment_temperature = environment.temperature
|
environment_temperature = environment.temperature
|
||||||
|
var/datum/gas_mixture/pipe_air = return_air()
|
||||||
|
if(abs(environment_temperature-pipe_air.temperature) > minimum_temperature_difference)
|
||||||
|
parent.temperature_interact(loc, volume, thermal_conductivity)
|
||||||
else
|
else
|
||||||
environment_temperature = loc:temperature
|
parent.radiate_heat(surface, 1)
|
||||||
var/datum/gas_mixture/pipe_air = return_air()
|
|
||||||
if(abs(environment_temperature-pipe_air.temperature) > minimum_temperature_difference)
|
|
||||||
parent.temperature_interact(loc, volume, thermal_conductivity)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction
|
obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction
|
||||||
|
|||||||
Reference in New Issue
Block a user