Boundary condition at interface

34 Views Asked by At

I am trying to solve the parabolic heat equation $\frac{\partial T}{\partial t}=D\frac{\partial^2 T}{\partial x^2}$ in two different regions with an interface (say $\alpha$). The conditions at the interface are given as

$$T_1=K T_2$$ $$\frac{\partial T_1}{\partial x}=D_s\frac{\partial T_2}{\partial x}$$

I am trying to solve the equations with FDM and the Method of lines. But I am facing problems in code (maybe) due to the implementation of the interface conditions. May I request the experts to kindly suggest how to implement the conditions properly?