hi Haohui,
I acknowledge that I have read your previous message, before this
re-post, and had spent some time debugging mcx and trying to
understand what was the reason, but I still don't have a clear
answer for you, yet.
I also tested our built-in pattern3d source demo code, shown
below
https://github.com/fangq/mcx/blob/v2023/mcxlab/examples/demo_mcxlab_srctype.m#L270-L311
the energy conservation can be verified - you can add
cfg.outputtype='energy';
to the original cfg definition, and then run
sum(flux.data(:))
you can see the output matches the percentage absorption. Even I
multiply cfg.srcpattern by 2, the conservation is still satisfied.
however, in your case, if I add
cfg.outputtype='energy';
cfg.isnormalized=0;
and run your test, your total absorbed energy sum(flux.data(:))=1.7e8 is even bigger than the total launched energy (1.5e8), which does not make any sense.
I have a feeling that perhaps this is somehow related to your source shape - you used a 2D array to define a volumetric source, with the source area directly in contact with the bounding box (i.e. some photons are directly launched into the background, not even propagating).
but still, this seems to be a tricky case, and I still don't have
an answer for you why.
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/aeeeb9a2-905c-40fe-80d7-366438875dd5n%40googlegroups.com.