A Simple Model of Thermal Transfer in Air

In summary, the mod simulates heat transfer by increasing the temperature of blocks near furnaces, removing heat from blocks near furnaces, and forcing the temperature of a player to a set point.
  • #1
Schilcote
7
0
I'm making a Minecraft mod, and I need a bit of help. Quite simply, it simulates heat transfer.

Unfortunately, I don't know enough about the subject to construct a good model. Here's what I have so far:

The base idea of ThermoCraft is that each air/empty block has a certain floating-point temperature value (very roughly equivalent to watts of heat energy), which it will try to equalize with adjacent air blocks. Other blocks may be thermally conductive, but in the first version it may be best to stick to air only.

Air temperature values are affected in three ways:

Certain blocks, such as lit furnaces, fire, lava, nuclear reactors, the output side of a heat exchanger (see section on added blocks), etc... will increase the temperature value of each block of air that is touching them.

Certain other blocks, such as ice, snow, or the input side of a heat exchanger, will decrease the temperature value of each block of air touching them. Ice and snow will melt into water after “absorbing” enough temperature. This does not follow the heat-transfer rules described below- the block directly removes heat from the air around it.

Each air block in the world will look at each air block adjacent to itself and, if the checked block's temperature value is less than the checking block's value, it will increase the checked block's temperature level by 0.03*(highertemp-lowertemp) units and decrease its own by the same amount.

However, if the block being transferred to is above the block being transferred from, the temperature increase and respective decrease will be doubled. Inversely, if the block receiving the heat is below the block giving it, it will be halved.

I.E, if a block of air has a temperature value of 100, and a block beside it has a temperature value of 50, the colder block's temperature will increase by 0.03*(100-50)=1.5 units every tick, and the warmer block's temperature will decrease by 1.5 units every tick. If the colder block is above the warmer, however, the heat will transfer twice as quickly: 0.03*(100-50)*2=3 units per tick. If the colder block is below the warmer block, heat will transfer one-fifth as quickly: 0.03*(100-50)*0.2=0.3 units per tick. Obviously, it is therefore advantageous to put your heat-generating apparatuses at the bottom of any space that you wish to warm.

Each player also has a temperature value, representing their core temperature. This will change in the same manner as adjacent air blocks will (meaning that the presence of a player in a cold room will warm the room slightly, while chilling the player).

Looking back, I can see that simulating heat in terms of watts is probably a really silly way to do it. Wikipedia is being obtuse, Wolfram Alpha thinks I'm a lunatic, and my teachers don't know either. I need some guidance on how best to simulate what I want to simulate.

The parameters of the simulation are:

1. The simulation will only be run on the air and players, and only encompasses temperature, not humidity. All objects that are not air or a player are assumed to have exactly zero thermal conductivity.
2. Air is divided into blocks one cubic meter in volume.
3. Certain objects dump heat into the air.
4. Certain objects remove heat from the air.
5. A player (human being) simulates heat transfer in the same way as the air.
6. Players can put on insulative/heat-removing clothing to change the rate at which heat transfers to/from them.
7. A player contains a "heat pump" that tries to force his internal temperature to 37 degrees Celsius by generating heat or forcing it into the environment.
8. A player whose temperature goes below 35 °C or above 39 °C will enter a state of hypo/hyperthermia and become ill. Severity of effects will increase as the temperature moves further from the ideal.

Anyone have any ideas? I'm also not great with academic math, so I'm not going to be able to understand anything past the algebra II level without a little bit of help. Thanks.
 
Technology news on Phys.org
  • #2
Interesting and looks do-able, but not simple. Needless to say, you are dealing simultaneous equations...this looks very much like finite elements where your elements are 1 cubic meter in size, though.

Even if it may be more (CPU) time consuming than a simple "IF" statement, I think you need to automate your equations so that they just work...instead of this thing where you say "If this block is higher than that one"...

...Instead, I think you may need to introduce the height of a block and its neighbor into the equation so that depending on its own height and the others, the equation yields the correct delta of temperature for each block...maybe instead of a single term, you can have two terms or something...of course, the final units of each term needs to be celcius...the heights are simply there to produce an additional term of a certain magnitude and a certain sign (positive or negative).

also, the summation of all heats coming into and leaving a block need to add up to zero for conservation of energy...this looks very much like nodal analysis (looks very much like Kirchhoff's law

I do this sometimes, but solve for final steady state results under non-changing boundary conditions.

It seems that you would need to apply your temperatures deltas every time step.

...I am just rambling now...
 
  • #3
Your idea could make a realstic mode for heat conduction in a solid, if you get the right balance beteen the size of each block and the time step of the simulation. But it won't work very well for the atmosphere, because the main way heat is moved around is by convection. In other words, the air in one block moves into a different block, and takes its heat along with it.

The same thing happens in liquids. If you heat a pan of water on a stove, the heat doesn't conduct up through the water. The hot water at the bottom rises to the top, and some cold water sinks to the bottom to take its place. You can see this in a pan of water, especially if you put some sort of powder that doesn't disolve in the water so it's easier to see the movement.

Trying to model the "real" air motion would be much too expensive to do in "real time" in a game, but you might be able to think of a simple way to get the right sort of effect. For example if a block at 20 degrees has blocks at 10 degrees all around it, most of the heat should move upwards, rather than sideways or down.
 
  • #4
AlephZero: I thought his implicit *1.0 in the first equation and the explicit *2.0 and *0.2 were intended to simulate such behavior where hot air rather move up than down or to the side. That's what I thought, anyway.
 
  • #5
gsal said:
AlephZero: I thought his implicit *1.0 in the first equation and the explicit *2.0 and *0.2 were intended to simulate such behavior where hot air rather move up than down or to the side. That's what I thought, anyway.

That seems to imply that heat is only exchanged "symmetrically" between adjacent blocks. It is equivalent to a solid that conducts heat better in one direction (vertical) than the others. Or alternatively, it's equivalent to having blocks that are not cubes, but the height is smaller than the other two dimensions.

A convection current can carry heat around a "loop" of blocks, where the loop can be any size.

The simulation needs to have something equivalent to "conservation of energy" on a global scale, but not on the local scale between every pair of adjacent blocks.
 

Related to A Simple Model of Thermal Transfer in Air

1. What is thermal transfer and how does it occur in air?

Thermal transfer is the movement of heat energy from one object or substance to another. In air, thermal transfer occurs through conduction, convection, and radiation. Conduction is the transfer of heat through direct contact between molecules, while convection is the transfer of heat through the movement of fluids. Radiation is the transfer of heat through electromagnetic waves.

2. What factors affect thermal transfer in air?

The rate of thermal transfer in air is influenced by several factors, including temperature difference between objects, surface area, and the type of material. Additionally, the presence of insulation or air currents can also impact thermal transfer.

3. How does thermal transfer impact the temperature of a room?

Thermal transfer is responsible for both heating and cooling a room. In the winter, heat energy from inside the room is transferred to the colder outside air, causing the room to lose heat and cool down. In the summer, heat energy from outside is transferred to the inside of the room, causing it to heat up.

4. How can we calculate or model thermal transfer in air?

A simple model of thermal transfer in air can be calculated using the Fourier's Law of Heat Conduction, which states that the rate of thermal transfer is directly proportional to the temperature difference and the surface area, and inversely proportional to the distance between the objects.

5. How is thermal transfer in air relevant in everyday life?

Understanding thermal transfer in air is important in many aspects of everyday life, such as in heating and cooling systems, cooking, and weather forecasting. It also plays a crucial role in the design of buildings and insulation to maintain comfortable indoor temperatures and reduce energy consumption.

Similar threads

  • Thermodynamics
Replies
5
Views
1K
  • Introductory Physics Homework Help
Replies
6
Views
1K
  • Classical Physics
Replies
27
Views
919
  • Thermodynamics
Replies
4
Views
262
Replies
11
Views
1K
Replies
15
Views
1K
  • Introductory Physics Homework Help
Replies
8
Views
754
  • Introductory Physics Homework Help
Replies
1
Views
918
  • Differential Equations
Replies
3
Views
2K
  • Introductory Physics Homework Help
Replies
4
Views
1K
Back
Top