I have to calculate the cool down process of a regenerative heat exchanger. I solved the problem in Excel before, but now I want to do it with Mathematica. I want to create a table with the variables t and z. For t = 0, there is a function which gives the temperature for each layer z. For z = 0, there is another function which gives the temperature for the first layer for each t. the rest of the table should be calculated layer by layer, so that z is constant while t goes form t0 to tend, then z should increase 1 step and so on. I tried out some simple code, but it didn't work. What's worng? Are there any other ways to solve my problem?
RecurrenceTable[{
T[t + 1, z + 1] == T[t, z + 1] + T[t + 1, z],
T[t + 1, 0] == T[t, 0]/2,
T[0, z] == z + 2
},
T, {t, 0, 6}, {z, 0, 4}] // Grid

