For a project I am assigned to solve the heat equation in a 2D environment in Python. To do this, I am using the Crank-Nicolson ADI scheme and so far things have been going smooth. I would also like to add that this is the first time that I have done numerical computing like this and I don't have a lot of experience with PDE's and finite difference methods.
However, problems start when I try to add a second material with a different thermal diffusivity. At the boundaries of the 2 materials, the temperature keeps rising and rising exponentially, but only at the boundaries (as if they are a heat source). Any other place in the domain functions fine and does not show this behaviour at all. Why does this happen and how can I stop it? Do I need to impose new boundary conditions on these boundaries, or can I just 'force' my way through this by calculating the temperature on the boundary and treating the two materials as independent domains?