# A Finite Element Method for Nonlinear and Fully Coupled Transient Hydrothermal Transfer
## 3 Finite Element Scheme  
Equation (5a,b) are fully coupled, nonlinear, and transient-governing equations for the moisture and heat transfer. To derive the system of finite element equations, it is assumed that the body is subjected to a virtual change of moisture content \(\delta H\) and a virtual change of temperature \(\delta T\). By multiplying Equation (5a) by \(\delta H\) and Equation (5b) by \(\delta T\) and integrating the resulting equations in the whole space domain \(\Omega\), it can be seen that  
\[\int_{\Omega}\Big{[}\
abla(D_{11}\
abla H)+\
abla(D_{12}\
abla T)-c_{0}\frac{ \partial H}{\partial t}\Big{]}\delta H\mathrm{d}\Omega+\int_{\Omega}\Big{[} \
abla(D_{21}\
abla H)+\
abla(D_{22}\
abla T)-\rho c\frac{\partial T}{\partial t }\Big{]}\delta T\mathrm{d}\Omega=0 \tag{8}\]  
The fundamental idea of the finite element model is to divide the continuum into a finite number of elements. For each element, the moisture content and temperature at any point inside the element can be expressed in terms of their values at their nodal points of the element by  
\[H(x_{1},x_{2},x_{3},t)=[N_{H}]\{\psi\},\ T(x_{1},x_{2},x_{3},t)=[N_{T}]\{\psi\} \tag{9}\]  
\[\{\psi\}=(H_{1},T_{1},H_{2},T_{2},\ldots,H_{n},T_{n})^{T} \tag{10}\]  
in which \(n\) is the number of nodes of the element and  
\[[N_{H}]=(N_{1},0,N_{2},0,\ldots,N_{n},0)^{T} \tag{11a}\]  
\[[N_{T}]=(0,N_{1},0,N_{2},\ldots,0,N_{n})^{T} \tag{11b}\]  
are so-called shape function matrices and \(\{\Psi\}\) is a vector containing the moisture content and temperature values at the nodal points of the element. The gradients for moisture content and temperature at any point in the element can be written as  
\[\Big{\{}\partial H/\partial x_{1},\partial H/\partial x_{2},\partial H/ \partial x_{3}\}^{T}=[B_{H}]\{\psi\} \tag{12a}\]  
\[\Big{\{}\partial T/\partial x_{1},\partial T/\partial x_{2},\partial T/ \partial x_{3}\}^{T}=[B_{T}]\{\psi\} \tag{12b}\]  
where \([B_{H}]=[L][N_{H}]\), \([B_{T}]=[L][N_{T}]\), and \([L]\) denotes a differential operator matrix. Substituting Equation (12) into Equation (4), the general moisture transfers \(J_{1}\) and heat fluxes \(q_{i}\) in the element can be obtained as follows:  
\[\{J\}=\Big{\{}J_{1},J_{2},J_{3}\}^{T}=-D_{11}[B_{V}]\{\psi\}-D_{12}[B_{T}]\{\psi\} \tag{13a}\]  
\[\{q\}=\Big{\{}q_{1},q_{2},q_{3}\}^{T}=-D_{21}[B_{V}]\{\psi\}-D_{22}[B_{T}]\{\psi\} \tag{13b}\]  
Finally, by substituting Equation (9) into Equation (8), the finite element formulation of the moisture and temperature conductions can be obtained as (after assemblage)  
\[[C(\{\psi\})]\Big{\{}\dot{\psi}\Big{\}}+[K(\{\psi\})]\{\psi\}=\{p\} \tag{14}\]  
where the dot represents differentiation with respect to time. The element matrices and general load vector \(\{p\}\) are given by  
\[H(x_{1},x_{2},x_{3},t)=[N_{H}]\{\psi\},\ T(x_{1},x_{2},x_{3},t)=[N_{T}]\{\psi\} \tag{9}\]0  
\[H(x_{1},x_{2},x_{3},t)=[N_{H}]\{\psi\},\ T(x_{1},x_{2},x_{3},t)=[N_{T}]\{\psi\} \tag{9}\]1  
\[H(x_{1},x_{2},x_{3},t)=[N_{H}]\{\psi\},\ T(x_{1},x_{2},x_{3},t)=[N_{T}]\{\psi\} \tag{9}\]2\[H(x_{1},x_{2},x_{3},t)=[N_{H}]\{\psi\},\ T(x_{1},x_{2},x_{3},t)=[N_{T}]\{\psi\} \tag{9}\]3  
The integrals involved in Equation (15) can be evaluated by the Gauss-Legendre numerical technique. Since \(c_{0}\), \(D_{11}\), \(D_{12}\), and \(D_{22}\) depend on the moisture content and temperature, Equation (14) is a system of highly nonlinear, time-related, first-order matrix differential equations. Furthermore, in real applications, the external load \(\{p\}\) may also vary with time. Equation (14) will be solved by using direct numerical difference in time. For this, the value of \(\{\Psi\}\) is calculated at \(t_{m}\) and is denoted as \(\{\Psi\}_{m}\). This is \(\{\Psi\}_{m}=\{\Psi(t_{m})\}\) for some points \(t_{m}\) in the interval \([0,\,t_{0}]\), where \(t_{m}=m(\Delta t)\), \(m=0\), \(\ldots\), \(M\) and the step length \(\Delta t\) is such that \(\Delta t=t_{0}/M\) for an integer \(M\).