Merge pull request #10126 from Putnam3145/he-tweaks
Makes HE pipes realistically radiate away heat
This commit is contained in:
@@ -154,6 +154,11 @@
|
||||
var/partial_heat_capacity = total_heat_capacity*(share_volume/air.volume)
|
||||
var/target_temperature
|
||||
var/target_heat_capacity
|
||||
// first calculate heat from radiation. there's an implied "* 1 tick" here.
|
||||
// 0.05 magic multiplicand is, first, 0.1 deciseconds; second, half of the radiation's going right back into the gas.
|
||||
var/share_constant = STEFANBOLTZMANN*(share_volume**(2/3))*0.05
|
||||
// Minimizing temp to 4 billion is mostly to prevent -infinity temperatures.
|
||||
var/heat = share_constant*(min(air.temperature,4000000000)**4)
|
||||
|
||||
if(isopenturf(target))
|
||||
|
||||
@@ -165,8 +170,8 @@
|
||||
|
||||
if((modeled_location.heat_capacity>0) && (partial_heat_capacity>0))
|
||||
var/delta_temperature = air.temperature - target_temperature
|
||||
|
||||
var/heat = thermal_conductivity*delta_temperature* \
|
||||
heat -= share_constant*(min(target_temperature,4000000000)**4)
|
||||
heat += thermal_conductivity*delta_temperature* \
|
||||
(partial_heat_capacity*target_heat_capacity/(partial_heat_capacity+target_heat_capacity))
|
||||
|
||||
air.temperature -= heat/total_heat_capacity
|
||||
@@ -183,7 +188,8 @@
|
||||
var/sharer_temperature_delta = 0
|
||||
|
||||
if((sharer_heat_capacity>0) && (partial_heat_capacity>0))
|
||||
var/heat = thermal_conductivity*delta_temperature* \
|
||||
heat -= share_constant*(min(target_temperature,4000000000)**4)
|
||||
heat += thermal_conductivity*delta_temperature* \
|
||||
(partial_heat_capacity*sharer_heat_capacity/(partial_heat_capacity+sharer_heat_capacity))
|
||||
|
||||
self_temperature_delta = -heat/total_heat_capacity
|
||||
@@ -199,10 +205,12 @@
|
||||
if((target.heat_capacity>0) && (partial_heat_capacity>0))
|
||||
var/delta_temperature = air.temperature - target.temperature
|
||||
|
||||
var/heat = thermal_conductivity*delta_temperature* \
|
||||
heat -= share_constant*(min(target.temperature,4000000000)**4)
|
||||
heat += thermal_conductivity*delta_temperature* \
|
||||
(partial_heat_capacity*target.heat_capacity/(partial_heat_capacity+target.heat_capacity))
|
||||
|
||||
air.temperature -= heat/total_heat_capacity
|
||||
air.temperature = CLAMP(air.temperature,TCMB,INFINITY) // i have no idea why TCMB needs to be the min but i ain't changing it
|
||||
update = TRUE
|
||||
|
||||
/datum/pipeline/proc/return_air()
|
||||
|
||||
@@ -26,9 +26,7 @@
|
||||
|
||||
var/turf/T = loc
|
||||
if(istype(T))
|
||||
if(islava(T))
|
||||
environment_temperature = 5000
|
||||
else if(T.blocks_air)
|
||||
if(T.blocks_air)
|
||||
environment_temperature = T.temperature
|
||||
else
|
||||
var/turf/open/OT = T
|
||||
|
||||
Reference in New Issue
Block a user