# Coupled Elastic-Plastic Damage Modeling of Rock Based on Irreversible Thermodynamics
## 2 Basic Framework of the Elastoplastic Damage Coupled Model  
### Thermodynamic Framework  
From the perspective of macroscopic continuum mechanics, the occurrence of damage in shale is always accompanied by energy dissipation. This process must comply with the laws of irreversible thermodynamics. According to the principle of energy conservation, the equation can be written as:  
\[\dot{K}+\dot{E}=W+q \tag{1}\]  
where \(K\) is kinetic energy; \(E\) is internal energy; \(W\) is the work done by external forces; \(q\) is the rate of change of internal energy.  
Expanding the expression for kinetic energy:  
\[K=\frac{1}{2}\int_{\Omega}\dot{p}\dot{u}\cdot\dot{u}d\Omega \tag{2}\]where \(\rho\) is material density; \(u\) is the rate of displacement change; \(\Omega\) is the volume of the material.  
Taking the time derivative of \(K\), we obtain the rate of change of kinetic energy:  
\[\dot{K}=\frac{d}{dt}\bigg{(}\frac{1}{2}\int_{\Omega}\rho\dot{u}\cdot\dot{u}d \Omega\bigg{)}=\frac{1}{2}\int_{\Omega}\rho\dot{u}\cdot\dot{u}d\Omega \tag{3}\]  
where \(\ddot{u}\) is the acceleration of the material.  
From the equilibrium equation of elasticity:  
\[\rho\ddot{u}=\
abla\cdot\sigma+\rho b \tag{4}\]  
Substituting Equation (4) into Equation (3), we obtain the expansion for the rate of change of kinetic energy:  
\[\begin{array}{l}\dot{K}=\int_{\Omega}\rho\dot{u}\cdot(\
abla\cdot\sigma+\rho b )d\Omega=\int_{\Omega}\
abla\cdot\sigma\cdot\dot{u}d\Omega+\int_{\Omega}\rho \dot{u}\cdot\dot{bd}\Omega\\ =\int_{\Omega\Omega}\sigma\cdot n\cdot\dot{u}dS-\int_{\Omega}\sigma:(\
abla u )d\Omega+\int_{\Omega}\rho\dot{u}\cdot\dot{bd}\Omega\\ =\int_{\Omega\Omega}t\cdot\dot{u}dS-\int_{\Omega}\sigma:\dot{e}d\Omega+\int_ {\Omega}\rho\dot{u}\cdot\dot{bd}\Omega\end{array} \tag{5}\]  
The expansions for internal energy \(E\), external work \(W\), and the rate of change of internal energy \(q\) are as follows:  
\[E=\int_{\Omega}ped\Omega \tag{6}\]  
\[W=\int_{\partial\Omega}t\cdot\dot{u}dS+\int_{\Omega}\rho\dot{u}\cdot\dot{bd}\Omega \tag{7}\]  
\[q=\frac{\partial Q}{\partial t}=\int_{\Omega}\rho\gamma d\Omega-\int_{\Omega} \sigma:(\
abla\dot{u})d\Omega \tag{8}\]  
Substituting Equation (5) to Equation (8) into Equation (1), we obtain:  
\[\rho\dot{e}=\sigma:\dot{e}+\rho\gamma-\
abla\cdot h \tag{9}\]  
When only heat exchange with the surroundings occurs without material exchange:  
\[\left\{\begin{array}{l}\frac{dS}{dt}=\frac{\dot{Q}}{T}+\dot{S}_{i}\\ \dot{S}_{i}\geq 0\end{array}\right. \tag{10}\]  
Rewriting Equation (10), we obtain the Clausius-Duhem inequality:  
\[\frac{dS}{dt}\geq\frac{\dot{Q}}{T} \tag{11}\]  
The integral form of Equation (11):  
\[\int_{\Omega}\rho\dot{s}d\Omega\geq\int_{\Omega}\frac{\rho\gamma}{T}d\Omega- \int_{\partial\Omega}\frac{h\cdot n}{T}dS \tag{12}\]  
Based on the divergence theorem, this equation is transformed to:  
\[\int_{\Omega}\rho\dot{s}d\Omega\geq\int_{\Omega}\frac{\rho\gamma}{T}d\Omega- \int_{\Omega}\bigg{(}\frac{\
abla\cdot h}{T}-\frac{h}{T^{2}}\cdot\
abla T \bigg{)}d\Omega \tag{13}\]  
\[\int_{\Omega}\bigg{(}\rho\dot{s}-\frac{\rho\gamma}{T}+\frac{\
abla\cdot h}{T} -\frac{h}{T^{2}}\cdot\
abla T\bigg{)}d\Omega\geq 0 \tag{14}\]Since Equation (14) holds under any arbitrary volume and the absolute temperature is always non-negative, removing the integral sign and rearranging:  
\[\rho T\dot{s}-(\rho\gamma-\
abla\cdot h)-\frac{h}{T}\cdot\
abla T\geq 0 \tag{15}\]  
Combining Equation (9) and Equation (9), the arrangement yields:  
\[\sigma:\dot{\varepsilon}-\rho(\dot{e}-T\dot{s})\geq 0 \tag{16}\]  
Helmholtz free energy can be defined as:  
\[\phi=\rho e-\rho T\dot{s} \tag{17}\]  
At this point, the final form of the Clausius-Duhem inequality is:  
\[\sigma:\dot{\varepsilon}-\dot{\phi}\geq 0 \tag{18}\]  
where \(\sigma\) is the stress tensor; '\(\therefore\)' is the double dot product operation between two tensors.