Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I'm making a simple heat distribution program. It's a $2D$ matrix with cells holding heat value. Every iteration looks for cells near current which have lower heat value and gives them some of its heat. Each cell gets different amount of heat (based on heat difference and conductivity).

The problem is with the stage where the distributed amount of heat needs to be multiplied by a certain number to account for up to three nearby cells that don't accept heat (hotter than current cell). I can't figure out how to calculate that multiplier.

share|improve this question
    
I think you're going to have to supply a bit more detail than that. What's the purpose of this "accounting for"? –  joriki Aug 10 '12 at 17:01
    
It's for giving the full amount of distributable heat to all available cells proportionately. –  user1306322 Aug 10 '12 at 17:08

1 Answer 1

up vote 1 down vote accepted

The usual approach is to have each cell have a temperature, where the quantity of heat in the cell is the temperature times the heat capacity. Then the heat flow across a boundary is the difference of the temperatures times the conductivity. So if you have a cell that is hotter than one neighbor and colder than the other three, it supplies heat to the colder neighbor and receives heat from the others. There is no need to treat hotter and colder neighbors separately. The total heat in your model is constant aside from what conducts through the boundaries.

share|improve this answer
    
Oh, looks like I've got over my head on this. Thanks for straighting this out for me. –  user1306322 Aug 10 '12 at 17:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.