-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fire creates unreasonably high temperatures #36449
Comments
(Opened a PR with fix here #36450 ) |
(all information from the same source you used, you can also read the document paper given as source) The actual Windchill effect only applies below ~25°C. Above that high humidity hinders sweat evaporation so that air actually starts feeling hotter, not colder. This is measured by the heat index, which only applies until felt! temperatures of at best 50°C. (That means 50°C with 0% air humidity only) A bigger question would be why the Windchill formula is included at all. A standard heat exchange formula would fare much better and could use clothing coverage to reduce thermal conductivity accordingly. |
@Cool3303 Yeah, there are some things subtly wrong with using windchill here. Most notably, if it's, say, 10C out, but extremely windy, it's actually possible in-game for body temperature to fall below 10C, which is impossible in the real world (otherwise you'd be able to freeze water just by aiming enough fans at it instead of having to use complicated compressor/condensor setups). For this specific issue, though, I'd like to avoid getting into those weeds, since changing them would require touching several larger systems. |
Describe the bug
As currently implemented, fire appears to create unreasonably high values of "windchill", and therefore of
temp_conv
, and therefore of body temperature. This means standing next to (or in) fires causes your body temperature to increase up to the 2e7-5e7 range, which, using the conversion of 0.02C = 10u found inweather.h
, equates to a temperature range of 40000C-100000C.Incidentally, there are no real direct effects of being at 100000C other than blisters. The main problem is how long it takes to cool down; you might retain the
Scorching
effect for hours or even days, which slowly eats away your HP/stamina, generates pain, and eventually kills you.This usually doesn't matter in gameplay—since players will generally first die from other fire-related issues, like being on fire, when standing in or near many large fires—but occasionally shows up in strange edge cases (see e.g. #32861 , which appears to be a manifestation of this same issue). The issue is most reproducible with the Thermal Dissipation CBM installed, since that negates most of the negative field effects of fires but not the high temperature itself.
My best guess for why this happens is:
Weather::get_local_windchill
is designed for normal ambient temperatures, rather than the 600-1000C you might expect to find inside an active fire. Indeed, plugging an input value of 1000C (with 50%RH and 0 windspeed) into the equation causes it to return a result of over a million (as in, the projected apparent temperature is over 1000000C). 1000C is, of course, fairly high, but is also a very possible value forplayer_local_temp
when standing in or among fires due to reason 2.Game::get_heat_radiation
scales inverse-linearly with manhattan distance rather than inverse-quadratically with euclidean distance. This means it (often significantly) overestimates the heat transferred by radiation from nearby fires. E.g. a fire three tiles up from the player would only divide heat by 3, rather than by 9.Steps To Reproduce
Steps to reproduce the behavior:
temp_cur
/temp_conv
/whatever. You can use gdb or add a println. You can also save, and just look at the values in your savegame JSON. There's probably also some debug-menu way to look at your temperature that I don't know about.Scorching!
condition, sometimes for hours. Turning off Thermal Dissipation at this time can be done with no ill effects other than allowing blisters, although you continue to beScorching!
.Expected behavior
Fires shouldn't be able to heat the player to >1e7u (>20000C) of temperature; that's more than three times as hot as the surface of the sun. Most real-life fires are in the 600C-1000C range at hottest.
Possibly the best thing to do here is to "cap" the extra apparent temperature that
Weather::get_local_windchill
produces; the runaway term that's responsible for the lion's share of the unreasonably-largeness in the windchill model we use is theexp(17*T/(237+T))
one, which represents vapor pressure, and it's very clear that most normal fires don't produce 1e7Pa of extra water vapor pressure (that's about 100 atmospheres) in their vicinity anyways. Capping that term to, say, 100C would make fire heat a lot less unreasonable.If desirable, I can throw together a PR that addresses the issue in this way.
Screenshots
Here's a screenshot of standing in some fires with Thermal Dissipation on. I "modded" the game here to print radiative temperature, convective temperature, and current body temperature of the torso on every turn, which you can read off the message log. Note that
![Screen Shot 2019-12-25 at 3 53 41 PM](https://user-images.githubusercontent.com/1035409/71451612-d395a500-272e-11ea-882d-80856847c17c.png)
player_local_temp
is the sum of radiative and convective temperature.Versions and configuration
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food]
]
Additional context
The text was updated successfully, but these errors were encountered: