- #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:
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.
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.