## 7 Model Setup  
In order to run numerical simulations, boundary conditions should be set according to experiment. During the collection of patient data, room temperature was recorded, therefore providing each simulation with its own ambient temperature (Table 1). The convection coefficient was set at 13.5 W/m\({}^{2}\)\({}^{\circ}\)C, as stated earlier and according to a previous study [27]. The internal thoracic wall was set to a constant temperature for internal organs at 37 \({}^{\circ}\)C. The third component of the Pennes equation is internal heat release due to metabolism. Blood perfusion is defined as the volumetric blood flow, based on an average flow rate per volume of tissue, in an area that contains sufficient capillaries. Most tissues, including most of the skin and brain, have high perfusion, with a perfusion coefficient designated as \(w_{b}\). These parameters are listed in Table 2, according to [27]. In this study, two computational studies were conducted: the first part assumed that there was no blood perfusion, which means that \(w_{b}\) was zero; in the second part of the study, blood perfusion was added to the equation. Reverse thermal modeling with an optimization process and 3D breast geometry and thermograms as inputs will help to find patient-specific tissue properties, which are a key novelty of this study. The heat transfer parameters as thermal conductivity, specific heat and density, and blood perfusion coefficient and fat/gland contents were obtained from different patients by reverse thermal modeling with design optimization, as described above. In the GA-based optimization, the number of samples for the first generation is 100, further generations consist of 50 samples, and the maximum number of generations is 20. The objective in the optimization was set to minimize the difference between computed temperature and temperature from experimental measurements from patients. The FEM analysis was performed using Comsol Multiphysics with the following steps:  
1. Create new parametric material in Material library;
2. Link with Solidworks to import 3D geometry;
3. Set depth and radius of tumor parametric;
4. Set simulation to transient;
5. Generate mesh;
6. Set constant temperature of 37 \({}^{\circ}\)C to thoracic wall;
7. Set convection on breast skin surface;
8. Set internal heat generation for tissues;
9. Set temperature probes on skin surface. \begin{table}
\begin{tabular}{c c} \hline \hline
**Patient Number** & **Ambient Temperature [\({}^{\circ}\)C]** \\ \hline
1 & 26.60 \(\pm\) 0.1 \\ \hline
2 & 24.60 \(\pm\) 0.1 \\ \hline
3 & 20.77 \(\pm\) 0.1 \\ \hline
4 & 26.95 \(\pm\) 0.1 \\ \hline
5 & 26.21 \(\pm\) 0.1 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Experiment ambient temperature. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter Name** & **Breast** & **Tumor** \\ \hline Blood perfusion (mL/s/mL) & 0.0006 & 0.012 \\ \hline Arterial temperature (\({}^{\circ}\)C) & 37 & 37 \\ \hline Metabolic heat generation (W/m\({}^{3}\)) & 700 & 70,000 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Pennes equation parameters [27]. Comsol Multiphysics has an optimization tool based on stochastic and gradient-based methods. The disadvantage of those methods is that they can get stuck in local minimums. In order to overcome this problem, Comsol Multiphysics is coupled with MatLab Livelink, where MatLab can be employed for GA optimization while Comsol Multiphysics is used for finite element analysis. MatLab is capable of performing the optimization process, while MatLab Livelink can make the MatLab optimizer and the Comsol FEM solver communicate to perform the optimization and FEA simultaneously in order to achieve the objectives of finding patient-specific tissue properties and tumor sizes and locations.