how to add some parameters into the kWaveDiffusion, bioheatExact functions

I have two questions. Firstly, I have read about the details of heat diffusion part of K-wave toolbox in MATLAB documentation. I am very surprised that there are only three important terms: heat diffusion, heat perfusion and heat deposition in Pennes's bioheat equation. I think that I want to make the more realistic simulation by adding metabolic heat generation parameter (qm). Is it possible to add (qm) into the kWaveDiffusion and bioheatExact functions. Secondly, I want to make the 2D heat diffusion simulation which there is a circle tumor tissue at the center of grid domain. Moreover, there is the human tissue around tumor tissue. two heat sources are set at the center point of tumor tissue and at any point on tumor tissue, respectively. From the first question, I ask about (qm) because it must be considered in tumor tissue. Can this K-wave toolbox make this simulation? please give me some suggestion. Thank you very much.

Do you want to include a (temperature dependent) formula for metabolic heat generation, or just add a known or fixed value? If the latter, you can just bundle this in with the existing heat deposition term.

Secondly, For the example codes of heat diffusion in K-wave toolbox, There are only a heat source at center of simulation. If I put four heat sources at different positions on simulation, Am I going to have to make the new four ndgrid matrixes?

Yes, that's what I was thinking. For your second question, you can define the heat source distribution however you like (it's a matrix of numbers). For example, you could sum together four Gaussians centred at different spatial positions, and so on.

Hi Brad
thank you very much for your helps. I understand a lot about how to make four gaussian heat sources in thermal simulation in previous time. However, I got a new problem after studying the fourth example code (heating the focused ultrasound transducer). In a part of acoustic simulation, I try to make the heterogenous medium to be the 2D breast structure having (skin layer, fat layer, gland layer with a small circular tumor, muscle layer). To make this structure more real, I created it look like the semicircle layer structure for skin, fat and gland layer. Muscle layer was assigned as the rectangle plate under gland and fat layer. In addition, air was created around breast structure. Next, medium.sound_speed and medium_density were defined from this breast structure. The problem is that the simulation showed a black color on the simulation run screen (It doesn't work) after kspacefirstorder2D is called. Is the breast structure I made complicated for simulation run? I observed that the medium.sound_speed and medium.density in example code of heterogenous medium are only defined as two rectangle regions. These are given below

Is kgrid.makeTime(medium.sound_speed) maybe wrong in my simulation? I'm not sure because my medium structure is heterogenous but I used kgrid.makeTime(1500) in which this value come from example code.

Finally, in a part of heat simulation, there is an error in my acoustic part, so I used the gaussian distribution as a heat source to prove that my simulation can run. Since there is a region of air around skin structure, I try to defined the heat perfusion parameters of air as zero value. I also defined normally heat diffusion parameters of air. The results after simulation run is quite weird. This mean that I cannot make the air region in heterogenous medium right?

please give me some reason and recommend me. I'm sorry to make you feel tired for my question. Thank you so much Brad.

The first problem sounds like a classic instability. Try reducing the size of the time step, e.g., by setting a smaller CFL when you call kgrid.makeTime.

In general, simulations that include air are computationally difficult because of the density contrast (1000 to 1). Do you get more sensible results if you increase the density in air to 10 or 100 kg/m^3?