I am not from a mechanical engineering background and I have not taken any courses in PDE so this may seem trivial for many. and I am writing a Matlab code with the objective to solve for the steady state temperature distribution in a 2D rectangular material that has 'two phases' of different conductivity.
I was able to do it considering the entire material as one single phase where at each iteration,the value of temperature is updated as the average of temperature of 4 nearest neighbors(central difference method) until the error is less than a specified value between consecutive iterations.
How can I calculate the temperature distribution when I have two phases, taking into consideration the conductivity of each material and how can I make sure that there is temperature continuity at the interface?