Heat Transfer Formula for 2D Vector Games

AI Thread Summary
The discussion centers on creating a realistic heat transfer system in a game, where heat is added based on player movement and reduced when stationary. The complexities of heat transfer involve convection, radiation, and conduction, making it challenging to develop a simple formula. The player’s temperature dynamics are influenced by environmental factors, such as being submerged in water or exposed to the vacuum of space. A suggested approach includes using basic thermodynamic principles, like the formula ΔU = Q + W, while also considering simplifications for gameplay. For accurate modeling, collaboration with someone knowledgeable in physics or studying thermodynamics is recommended.
lxXTaCoXxl
Messages
9
Reaction score
0
I'm a game developer and I have an idea to make something heat up and cool off and I would like to use realistic style formulas to do the math. Instead of making it add dramatically over time. I basically need a formula for adding and removing heat from a 2 dimensional vector based on acceleration. The idea is that when the player is moving, heat will be added, and when the player is not moving heat will be reduced. So a formula and a brief explanation of the formula would be a big help.

Thanks,
Jamie
 
Science news on Phys.org
Hello!

Heat transfer is a though thing. This heat process you describe is very complex and if you want to make it realistic you must acknowledge you are going into a bunch of physics. Heat transfer is mainly governed by three physical phenomena: convection, radiation and conduction. It really depends on what you are considering to "shout a formula" (such a thing doesn't even exist, actually). Modelling a game this realistically would take a lot of effort and depends on many factors such as the environment, what is around your object and even the weather.
 
Okay well I'm not wanting it that realistic really, I mean I want the rate of change to be realistically based on movement (like say friction or extreme pressure) for a perfect example you can't start a fire under water, so in the level that is water based the player's temperature grows colder while they are submerged, and while they are above the surface the temperature of the player increases (if the player gets too cold they begin moving slower, and eventually turn into a block of ice (cartoon style game) and loses a life. The first level is in space so I do believe fire isn't possible there (from what I remember space is a vacuum meaning no air, and no air means no fire since it's the main contributing factor to a flame) so it isn't as realistic as I made it out to be but I still want some of the basic physics formulas to apply; for example I visited the library on this site and found the following formula for heat that should help to add and remove slowly from the temperature of the player.

Heat
ΔU = Q + W
Q = Initial Heat
W = Work Done

That's how I understand it anyways. Thank you for your swift reply, please note I don't have an awesome habit of asking the correct questions for some reason.
 
Still there is a lot to take in account.

For space, let's see: the player will lose heat to space mainly by radiation. We would have to simplify this a lot, such as: considering a human being is made of around 70% water, let's make it a round ball of water. Also, this ball of water is in thermodynamical equilibrium at every timestep, that is, the temperature is always equal in the whole body of the player at any given time. Also, the player exchanges heat only by radiation and emits it spherically as a point, obeying Planck's law for a blackbody (this is a "formula" developed by Planck for a blackbody, which is a body that emits the largest amount of energy than any other at the same temperature). Then we would have to make an energy balance, which is basically the formula you put in there.

Even though there is a lot of simplifications involved the analysis I just made and it is probably not hard to implement in your code, you must know some physics to understand everything and this is just for one level (and space is probably the easiest one to model). Even though I have no experience in game design, I don't think the analysis I just made would be much more accurate than an intuitive and simple formula, such as "I believe the player will lose about 10 degrees Celsius in 7 seconds" and adjusting as you wish.

However, if you want to model everything physically, I believe that you should either have someone who knows physics to work with you (if you don't know, of course) or start digging into physics textbooks, specially thermodynamics (which will probably take much longer, but you'll gain knowledge).
 
Try search on "Newtons Law of Cooling"

it's good enough for everyday work.
 
I need to calculate the amount of water condensed from a DX cooling coil per hour given the size of the expansion coil (the total condensing surface area), the incoming air temperature, the amount of air flow from the fan, the BTU capacity of the compressor and the incoming air humidity. There are lots of condenser calculators around but they all need the air flow and incoming and outgoing humidity and then give a total volume of condensed water but I need more than that. The size of the...
Thread 'Why work is PdV and not (P+dP)dV in an isothermal process?'
Let's say we have a cylinder of volume V1 with a frictionless movable piston and some gas trapped inside with pressure P1 and temperature T1. On top of the piston lay some small pebbles that add weight and essentially create the pressure P1. Also the system is inside a reservoir of water that keeps its temperature constant at T1. The system is in equilibrium at V1, P1, T1. Now let's say i put another very small pebble on top of the piston (0,00001kg) and after some seconds the system...
Back
Top