Maximum intensity for planar source

60 views
Skip to first unread message

zhang haohui

unread,
Dec 11, 2023, 12:57:22 AM12/11/23
to mcx-users
Hello, Prof. Fang,

In the following code, I applied a planar source 20*20 and try to find the maximum intensity in the body. The maximum intensity is under the source and equal to 8.5e-3. However, according to my understanding, when 1 unit power is applied, the maximum intensity should be 1/(20^2) = 2.5e-3. Why the computed maximum intensity is much larger than this value?

I also tried different area and the point source. It is always the case. 

Thank you very much!

Best wishes 
Haohui

clear cfg
cfg.nphoton=1e8;
cfg.outputtype='fluence';
cfg.seed = 77542;
cfg.vol=ones(200,200,200);
cfg.prop = [0,0,0,1;0.006,1.3,0,1];
% light source
cfg.srctype = 'planar';
cfg.srcpos=[0,90.5,90.5];
cfg.srcparam1=[0,20,0];
cfg.srcparam2=[0,0,20];
cfg.srcdir=[1,0,0];
cfg.issrcfrom0=1;
% time windows
cfg.tstart=0;
cfg.tend=1e-8;
cfg.tstep=1e-9;
% other simulation parameters
cfg.isspecular=1;
cfg.isreflect=1;
cfg.autopilot=1;
cfg.gpuid=1;
cfg.issaveref=1; % save diffuse reflectance
% Unit length
% cfg.unitinmm = 0.6;
% Detector
cfg.detpos=[20,20,20,2];
tic
%% run MCX simulation
flux = mcxlab(cfg);
toc
%% post-simulation data processing and visualization
% convert time-resolved fluence to CW fluence
CWfluence=sum(flux.data,4);
cwdref=sum(flux.dref,4); % diffuse reflectance
max(CWfluence,[],'all')

Qianqian Fang

unread,
Dec 11, 2023, 1:35:08 AM12/11/23
to mcx-...@googlegroups.com, zhang haohui

hi Haohui

this is a misunderstanding of a unitary source.

if you look at the Green's function of fluence for the diffusion equation in the infinite space

Phi = 1/(4*pi*D).*[exp(-k*r)./r ]

where r is the distance to the source, you can see that Phi(r=0) is infinity - so if you are looking for the maximum value of the fluence, it is infinity in continuous space.


On 12/11/23 00:57, zhang haohui wrote:
Hello, Prof. Fang,

In the following code, I applied a planar source 20*20 and try to find the maximum intensity in the body. The maximum intensity is under the source and equal to 8.5e-3. However, according to my understanding, when 1 unit power is applied, the maximum intensity should be 1/(20^2) = 2.5e-3. Why the computed maximum intensity is much larger than this value?


if you are looking for something that can sum up to 1, you are looking for energy deposition. in this case, you should set cfg.output to 'energy'.

the sum of the energy deposition should be equal to the absorption fraction printed at the bottom of mcx's simulation log.

Qianqian


--
You received this message because you are subscribed to the Google Groups "mcx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mcx-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mcx-users/9b33553b-2a9a-4d3a-8382-f793668bf8f1n%40googlegroups.com.

zhang haohui

unread,
Dec 11, 2023, 2:54:31 AM12/11/23
to mcx-users
Hello, Prof. Fang,

Regarding the matter at hand, I believe the issue isn't directly related to the diffusion equation, given that we're utilizing Monte Carlo methods to tackle the problem. Specifically, at r=0, the apparent infinity intensity stems from the point source—a characteristic inherent to point sources resulting in an infinite intensity.

However, the discrepancy arises from my use of a planar source, which eliminates the concept of an infinite source. Despite this, I've observed a maximum intensity of 8.5e-3 uniformly across first layer of the bulk material under the irradiated area, exceeding the source intensity, which appears to be inaccurate.

I have verified the total energy deposition within the codes is correct. Please let me know if there's any ambiguity in my explanation or if further details are required. Your insights into this matter are greatly appreciated.

Best wishes
Haohui

Qianqian Fang

unread,
Dec 11, 2023, 7:59:25 AM12/11/23
to mcx-...@googlegroups.com, zhang haohui

again, you can not directly translate the norm of the source-term (right-hand-side/RHS) to the max/norm of the solution of a PDE/or integral-differential equation like RTE

in many cases, a PDE/integral-differential equation can be represented by a linear operator, L(), and the PDE can be solved as

L(Phi)=S

where S is the source; this gives you Phi = inv(L)(S)

if L is a linear matrix, like in FEM/finite-difference, i.e. L=A where A is a matrix, then Phi=inv(A)*S

the max/norm of solution Phi depends on the eigenvalues of the system matrix A, and they not 1 in most cases.

zhang haohui

unread,
Dec 11, 2023, 11:35:01 AM12/11/23
to mcx-users
Hello, Prof. Fang,

Thanks for your very helpful understanding. I will think over it.

Best wishes
Haohui
Reply all
Reply to author
Forward
0 new messages