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:
UristMcKerman
2014-05-20 06:50:26 +04:00
parent 08357b5cb5
commit 2164f03655
2 changed files with 15 additions and 6 deletions

View File

@@ -1,3 +1,5 @@
#define STEFAN_BOLTZMANN_CONSTANT 0.0000000567
datum/pipeline
var/datum/gas_mixture/air
@@ -39,7 +41,7 @@ datum/pipeline
member.air_temporary.oxygen = air.oxygen*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.temperature = air.temperature
@@ -211,3 +213,10 @@ datum/pipeline
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)
network.update = 1

View File

@@ -4,6 +4,7 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging
icon_state = "intact"
level = 2
var/initialize_directions_he
var/surface = 2
minimum_temperature_difference = 20
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
@@ -49,12 +50,11 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging
else
var/datum/gas_mixture/environment = loc.return_air()
environment_temperature = environment.temperature
else
environment_temperature = loc: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
parent.radiate_heat(surface, 1)
obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction