MATLAB: Pdetool concentration profile simulation

pdetool simulation

I want to use pdetool to simulate the hydrogen concentration profile based on the fick's second law in two dimensional system. the model is like this, there is two joined region A and B. diffusion coefficient in A is faster than that in B. hydrogen diffusion in this two region is 2 dimension(along x and y). they have the same boundary condition, for example the initial concentration is constant and same in A and B. how do we set the different diffusion coefficient in this two region? how should I do with the border between A and B region, since hydrogen will diffuse from A to B (y direction) since it is faster in A region. To me, it seems that after I set the boundary condition, I can not set different D in this two region.

Best Answer

You can set different D in the PDE app by selecting PDE > PDE Mode and then double-clicking each region to set its coefficients. I assume that you already set the problem type to Diffusion.
Alan Weiss
MATLAB mathematical toolbox documentation