# Design of HIFU Treatment Plans Using Thermodynamic Equilibrium Algorithm
## 2 Materials and Methods
### Fitness Function
#### 2.5.2 Thermal Model Execution  
The numerical thermal model is then used to determine heat diffusion in the tissue in the second stage. Heat diffusion is predicted using the so-called Pennes' bioheat equation [51], which includes a matching source term for ultrasonic energy absorption (see Equation (24)).  
\[\rho C\frac{\partial T}{\partial t}=\
abla.(k\
abla T)+W_{b}C_{b}(T-T_{a})+Q \tag{24}\]  
Figure 4: Visualization of the focal region generated by a bowl HIFU transducer and its variation with distance.  
The tissue-specific heat \(C\) and blood \(C_{b}\) [J/kg\({}^{\circ}\)C] perfusion-related parameter \(W_{b}\) [kg/m\({}^{3}\)s], arterial temperature \(T_{a}\), and ultrasonic transducer power \(Q\) [W/m\({}^{3}\)] are all taken into account in this equation. The arterial temperature is considered to be 37 degrees Celsius.  
Blood perfusion, which can cool the tissue and hinder the thermal ablation of cancerous cells close to blood vessels, should be carefully considered, especially when determining the energy balance in heat transmission. This effect becomes more important as the heating period grows longer; for example, for volumetric ablation of vast tissue regions.  
Figure 5 depicts the temperature at the focus center during the duration of a 3-s sonication and a 7-s cooling interval. The temperature rises as soon as the transducer is turned on. Due to heat diffusion and blood circulation, the temperature gradually drops back to ambient levels after the transducer is turned off (during the cooling interval).  
Following sonication, the primary focus axis was subjected to temperature measurements every 2 s (see Figure 6). The temperature distribution in space is Gaussian when a major blood artery is absent. The temperature drops from a peak of around 65 \({}^{\circ}\)C at the end of the sonication phase to about 38 \({}^{\circ}\)C at the end of the cooling phase. On the other hand, the surrounding region with temperatures above 37 \({}^{\circ}\)C is progressively expanding.  
Thermal damage is often calculated using the Sapareto-Dewey iso-effect thermal dose equation [52], which gives the equivalent time in seconds required to induce the same biological effects at 43 \({}^{\circ}\)C. This statistic is known as cumulative equivalent minutes (CEM\({}_{43}\)). After calculating CEM\({}_{43}\) at each location in the tissue (see Equation (25)), \(S_{i}\) averages the results from all sonications.  
\[CEM_{43}=\int_{0}^{t_{on}+t_{off}}R^{(43-T)}dt,where\ R=\begin{cases}0&for\ T\leq 39 \ ^{\circ}C\\ 0.25&for\ 39\ ^{\circ}C<T\leq 43\ ^{\circ}C\\ 0.5&for\ T>43\ ^{\circ}C\end{cases}, \tag{25}\]  
Thermal doses of 240 min at 43\({}^{\circ}\) Celsius irreversibly destroy and coagulate vital cellular protein, tissue structural components, and the vasculature, leading to rapid tissue death [1]. In Figure 6, the region where the dose exceeds 240 CEM\({}_{43}\) is marked by yellow bar. Note that the threshold may vary depending on the kind of tissue.  
Patient-specific models of tissue anatomy are used to generate exact tissue parameter settings for implementation in Matlab using the FDA HIFU toolbox [53]. The Simulator predicts many important characteristics of continuous wave, high-intensity therapeutic ultrasound beams and their heating effects. The formulation is accurate and unconditionally stable for a homogeneous medium. Compared to standard pseudospectral time-domain approaches, the time scheme allows for greater time steps with the same degree of accuracy  
Figure 5: The temperature variation at the focus center during a sonication with \(t_{on}=3\) s and \(t_{off}=7\) s.  
in a heterogeneous medium. As a result, the convergence testing determines the resolutions in space and time for the grid that divides the simulation domain.