I want to solve a diffusion analysis using finite elements. According to fick's law, governing equation is
$$\frac{\partial h}{\partial t} = D \frac{\partial^{2} h}{\partial x^{2}}$$
. h is relative humidity and D is moisture diffusion coefficient and it is relative humidity dependence.
$$D = 2.26 \times 10^{-6} \Bigg ( 0.05 + \frac{1-0.05}{1+\Big ( \frac{1-h}{1-0.78} \Big )^{4}} \Bigg )$$
Weak form is
$$C \frac{\partial h}{\partial t} + Kh = F$$
When I assemble the diffusivity matrix K, I don't know how I deal with D.
$$B = \begin{bmatrix} \frac{1}{l} & \frac{1}{l} \end{bmatrix}$$
$$K = A \int_{0}^{l} B^{T}DB dx$$
$$K_{e} = \frac{A}{l} \begin{bmatrix} D(h_{1}) + D(h_{2}) & D(h_{1}) + D(h_{2}) \\ D(h_{1}) + D(h_{2}) & D(h_{1}) + D(h_{2}) \end{bmatrix}$$
Is that right?