# Defining a geometry to apply Heat flux - PDEPE Toolbox

2 views (last 30 days)
Hung Nguyen on 4 Mar 2020
Commented: Hung Nguyen on 4 Mar 2020
Hi everyone,
I am making a heat transfer model that shows the impact of laser beam on a small, spherical particle using PDEPE in Matlab. Diameter of the particle is around 60 um, while the laser spot radius is 250 um.
thermalBC(thermalmodel,'Face',1,'HeatFlux',11713803.81)
If I define the heat flux as above, PDEPE model will assume that the heat flux is apply to all spots around the sphere. However, in my case, the heat flux only apply to half of the sphere - as the laser beam only shine through one side of the particle. How can I define the laser impact area, in order to define the area that the heat flux apply to?
Thank you everyone.

Ravi Kumar on 4 Mar 2020
Exactly as in the example you pointed to, in which you will find:
thermalBC(thermalmodel,'Face',4,'HeatFlux',@externalHeatFlux,'Vectorized','on');
if you look at the externalHeatFlux, it applies heat flux only to certain region based on the value of phi. Modify this function to suite your needs.

Hung Nguyen on 4 Mar 2020
I have seen it, but I do not really understand the externaleHeatFlux function. It apply to a certain region based on the value of phi, so where are wee define the heat flux. For example, I have a laser beam with flux = 11713803.81, where can I define it in that function?
Ravi Kumar on 4 Mar 2020
Qflux(ids) = theta(ids).^2.*(pi - theta(ids)).^2.*phi(ids).^2.*(pi - phi(ids)).^2;
The above line defines value of heat flux as RHS expression. In you case, once you know the ids and defined a zero vector of Qflux, as in the example you can assign the values to the ids as:
Qflux(ids) = 11713803.81
Regards,
Ravi
Hung Nguyen on 4 Mar 2020
Thank you very much! I have looked into the analytical solution and understand it.