I want to simulate 2D temperature distribution in water, the heating source is circle and always turn on (time-step is 3600 and dt is 1). When I set Gaussian initial temperature distribution, I confused about the equation in the example-Heat Diffusion In A Homogeneous Medium below,
% set Gaussian initial temperature distribution [degC]
width = 4 *dx;
source.T0 = 37 + 5.*exp( -(kgrid.x./width).^2 - (kgrid.y./width).^2);
My understanding is width can change the size of heating source in the figure, 37 is initial temperature, but how does '5' come from? I think it's related to Volume rate of heat deposition, and I want to know how to calculate when simulating in water. Is there any principle? Below is my whole programming,
% create the computational grid
PML_size = 5; % size of the PML in grid points
Nx = 235 - 2*PML_size; % number of grid points in the x (row) direction
Ny = 579 - 2*PML_size; % number of grid points in the y (column) direction
dx = 1e-3; % grid point spacing in the x direction [m]
dy = 1e-3; % grid point spacing in the y direction [m]
kgrid = kWaveGrid(Nx, dx, Ny, dy);
% define medium properties
medium.density = 1000; % [kg/m^3]
medium.thermal_conductivity = 0.6; % [W/(m.K)]
medium.specific_heat = 4200; % [J/(kg.K)]
% set Gaussian initial temperature distribution [degC]
width = 25*dx;
source.T0 = 25 + 5.*exp( -(kgrid.x./width).^2 - (kgrid.y./width).^2);
% set input args
input_args = {'PlotScale','auto'};
% create kWaveDiffusion object
kdiff = kWaveDiffusion(kgrid, medium, source, [], input_args{:});
% % take time steps (temperature can be accessed as kdiff.T)
Nt = 60*60;
dt = 1;
kdiff.takeTimeStep(Nt, dt);
% plot the current temperature field
figure;
kdiff.plotTemp;
% =========================================================================
% VISUALISATION
% =========================================================================
figure;
imagesc(kgrid.y_vec * 1e3, kgrid.x_vec * 1e3, kdiff.T);
h = colorbar;
xlabel(h, '[^\circC]');
ylabel('x-position [mm]');
xlabel('y-position [mm]');
axis image;
title('Final Temperature Distribution');
colormap(jet);
Thanks!