From 1b3246c1962d7b47d3e5258248fecb21bc9d4656 Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Tue, 13 Jan 2015 15:22:55 -0700 Subject: [PATCH 1/5] Adds a constant for the surface area of a HE pipe exposed to sunlight. --- code/setup.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/setup.dm b/code/setup.dm index 723766ea786..68842e7e088 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -11,8 +11,9 @@ //radiation constants #define STEFAN_BOLTZMANN_CONSTANT 0.0000000567 //W/(m^2*K^4) #define COSMIC_RADIATION_TEMPERATURE 3.15 //K -#define AVERAGE_SOLAR_RADIATION 200 //W/m^2. Kind of arbitrary. Really this should depend on the sun position much like solars. +#define AVERAGE_SOLAR_RADIATION 200 //W/m^2. Kind of arbitrary. Really this should depend on the sun position much like solars. From the numbers on Erebus, this'd be an orbit of 23.3 lightseconds. #define RADIATOR_OPTIMUM_PRESSURE 110 //kPa at 20 C +#define RADIATOR_EXPOSED_SURFACE_AREA 0.03 //The pipe looks to be thin vertically and wide horizontally, so we'll assume that it's three centimeters thick and only explosed to the sun edge-on. #define CELL_VOLUME 2500 //liters in a cell #define MOLES_CELLSTANDARD (ONE_ATMOSPHERE*CELL_VOLUME/(T20C*R_IDEAL_GAS_EQUATION)) //moles in a 2.5 m^3 cell at 101.325 Pa and 20 degC From 1ab66130ffe40eb1c617d9a90ce846473e443530 Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Tue, 13 Jan 2015 15:28:42 -0700 Subject: [PATCH 2/5] Changed heat exchange pipe properties. No more suns above and below station shining on every square centimeter of it. --- code/ATMOSPHERICS/datum_pipeline.dm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/ATMOSPHERICS/datum_pipeline.dm b/code/ATMOSPHERICS/datum_pipeline.dm index aa4473babd5..d2978e887a4 100644 --- a/code/ATMOSPHERICS/datum_pipeline.dm +++ b/code/ATMOSPHERICS/datum_pipeline.dm @@ -205,9 +205,13 @@ datum/pipeline var/gas_density = air.total_moles/air.volume thermal_conductivity *= min(gas_density / ( RADIATOR_OPTIMUM_PRESSURE/(R_IDEAL_GAS_EQUATION*T20C) ), 1) + // We only get heat from the star on the exposed surface area. + var/heat_gain = AVERAGE_SOLAR_RADIATION * RADIATOR_EXPOSED_SURFACE_AREA * thermal_conductivity + //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) + // Only would happen if both sides (all 2 square meters of surface area) were exposed to sunlight. We now assume it aligned edge on. + heat_gain += surface * STEFAN_BOLTZMANN_CONSTANT * thermal_conductivity * (air.temperature - COSMIC_RADIATION_TEMPERATURE) ** 4 air.add_thermal_energy(heat_gain) if(network) - network.update = 1 \ No newline at end of file + network.update = 1 From 82b5bd0f5223f9425bbbeb814d05ba55822aebb9 Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Tue, 13 Jan 2015 15:32:03 -0700 Subject: [PATCH 3/5] Sign errors are almost as bad as off-by-one. --- code/ATMOSPHERICS/datum_pipeline.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ATMOSPHERICS/datum_pipeline.dm b/code/ATMOSPHERICS/datum_pipeline.dm index d2978e887a4..d72b8b2dbf7 100644 --- a/code/ATMOSPHERICS/datum_pipeline.dm +++ b/code/ATMOSPHERICS/datum_pipeline.dm @@ -210,7 +210,7 @@ datum/pipeline //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 // Only would happen if both sides (all 2 square meters of surface area) were exposed to sunlight. We now assume it aligned edge on. - heat_gain += surface * STEFAN_BOLTZMANN_CONSTANT * thermal_conductivity * (air.temperature - COSMIC_RADIATION_TEMPERATURE) ** 4 + heat_gain -= surface * STEFAN_BOLTZMANN_CONSTANT * thermal_conductivity * (air.temperature - COSMIC_RADIATION_TEMPERATURE) ** 4 air.add_thermal_energy(heat_gain) if(network) From 5104e40be3b2256940c13d030eca5919bfe51de8 Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Tue, 13 Jan 2015 15:41:45 -0700 Subject: [PATCH 4/5] Adding calculated temperature for HE pipes. --- code/ATMOSPHERICS/datum_pipeline.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/ATMOSPHERICS/datum_pipeline.dm b/code/ATMOSPHERICS/datum_pipeline.dm index d72b8b2dbf7..f663ccb34e5 100644 --- a/code/ATMOSPHERICS/datum_pipeline.dm +++ b/code/ATMOSPHERICS/datum_pipeline.dm @@ -210,6 +210,7 @@ datum/pipeline //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 // Only would happen if both sides (all 2 square meters of surface area) were exposed to sunlight. We now assume it aligned edge on. + // It currently should stabilise at 85K or -183C. heat_gain -= surface * STEFAN_BOLTZMANN_CONSTANT * thermal_conductivity * (air.temperature - COSMIC_RADIATION_TEMPERATURE) ** 4 air.add_thermal_energy(heat_gain) From 12d056106ec0154e94815a187e240190b7bf8c02 Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Thu, 15 Jan 2015 17:57:52 -0700 Subject: [PATCH 5/5] Adjusts informative comments. --- code/ATMOSPHERICS/datum_pipeline.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/ATMOSPHERICS/datum_pipeline.dm b/code/ATMOSPHERICS/datum_pipeline.dm index f663ccb34e5..fd933bf94dc 100644 --- a/code/ATMOSPHERICS/datum_pipeline.dm +++ b/code/ATMOSPHERICS/datum_pipeline.dm @@ -206,9 +206,10 @@ datum/pipeline thermal_conductivity *= min(gas_density / ( RADIATOR_OPTIMUM_PRESSURE/(R_IDEAL_GAS_EQUATION*T20C) ), 1) // We only get heat from the star on the exposed surface area. + // If the HE pipes gain more energy from AVERAGE_SOLAR_RADIATION than they can radiate, then they have a net heat increase. var/heat_gain = AVERAGE_SOLAR_RADIATION * RADIATOR_EXPOSED_SURFACE_AREA * thermal_conductivity - //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 + // Previously, the temperature would enter equilibrium at 26C or 294K. // Only would happen if both sides (all 2 square meters of surface area) were exposed to sunlight. We now assume it aligned edge on. // It currently should stabilise at 85K or -183C. heat_gain -= surface * STEFAN_BOLTZMANN_CONSTANT * thermal_conductivity * (air.temperature - COSMIC_RADIATION_TEMPERATURE) ** 4