mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-24 04:26:38 +01:00
Improves h/e radiation
This commit is contained in:
@@ -200,9 +200,13 @@ datum/pipeline
|
||||
if(network)
|
||||
network.update = 1
|
||||
|
||||
proc/radiate_heat(surface, thermal_conductivity)
|
||||
//surface must be the surface area in m^2
|
||||
proc/radiate_heat_to_space(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 the h/e pipes radiate less than the AVERAGE_SOLAR_RADIATION, then they will heat up, otherwise they will cool down. It turns out the critical temperature is -26 C
|
||||
var/heat_gain = surface*(AVERAGE_SOLAR_RADIATION - STEFAN_BOLTZMANN_CONSTANT*thermal_conductivity*(air.temperature - COSMIC_RADIATION_TEMPERATURE) ** 4)
|
||||
|
||||
air.add_thermal_energy(heat_gain)
|
||||
if(network)
|
||||
network.update = 1
|
||||
@@ -4,7 +4,7 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging
|
||||
icon_state = "intact"
|
||||
level = 2
|
||||
var/initialize_directions_he
|
||||
var/surface = 2
|
||||
var/surface = 2 //surface area in m^2
|
||||
|
||||
minimum_temperature_difference = 20
|
||||
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
|
||||
@@ -53,8 +53,8 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging
|
||||
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)
|
||||
else if(istype(loc, /turf/space/))
|
||||
parent.radiate_heat_to_space(surface, 1)
|
||||
|
||||
|
||||
obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction
|
||||
|
||||
Reference in New Issue
Block a user