Model almost-transparent mesh

13 views
Skip to first unread message

Xiuxiu Zhang

unread,
Nov 24, 2025, 11:43:57 AMNov 24
to mmc-users
Dear Dr. Qianqian Fang and mmcusers, 

Hope this message finds you well. 

I am planning to simulate a pencil beam from top of the mesh boundary and goes down into the mesh. In the first figure, I show the fluence of the mmc using code from demo-mmc-basic.m after changing the optical property to cfg.prop = [0 0 1 1; 0.0001 0 1 1.49]; As the numbers indicated here, label 1 material is very low absorption, almost no scattering, which is exact what we expect to see in Figure 1. However, when I make the code more complicated and incorporate more different optical properties, the fluence data start to deviate from what we expect to see
 
[node, face, c0] = latticegrid([0 60], [0 60], [0 5 10 15 20]);
[node, elem] = surf2mesh(node, face, [], [], 1, [], c0);
cfg.node = node;
cfg.elem = elem;
cfg.elemprop = cfg.elem(:, 5);
cfg.elem = cfg.elem(:, 1:4);
cfg.prop = [0 0 1 1;
0.0001 0 1 1.49;
0.025 35.3 0.9 1.40;
0.63 23.3 0.9 1.40;
0.0001 0 1 1.49];
cfg.srcpos = [25.0 35.0 20.0];
% cfg.e0 = tsearchn(cfg.node, cfg.elem(:, 1:4), cfg.srcpos);
cfg.srcdir = [0, 0, -1];
cfg.srctype = 'pencil';
cfg.srcparam1 = [0 0 0 0];
cfg.srcparam2 = [0 0 0 0];
cfg.nphoton = 1e6;
cfg.tstart = 0;
cfg.tend = 5e-9;
cfg.tstep = 5e-9;
cfg.debuglevel = 'TP';
cfg.method = 'elem';
[fluence] = mmclab(cfg);

Attached Figure 2 is the results of the mmc run. Do you by any chance have any input on mmc modelling in almost transparent mesh? If so, would love to hear it.Screenshot 2025-11-24 at 10.23.26 AM.pngScreenshot 2025-11-24 at 11.19.02 AM.png

Thanks,
Xiuxiu

Qianqian Fang

unread,
Nov 28, 2025, 11:11:57 PM (13 days ago) Nov 28
to mmc-...@googlegroups.com, Xiuxiu Zhang

hi Xiuxiu,

you will have to provide more details on "the fluence data start to deviate from what we expect to see" - 

1) what exactly did you expect to see? and why?

2) which of the figures should I look at in your attachment, and why you believe these figures are in correct?

--
You received this message because you are subscribed to the Google Groups "mmc-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mmc-users+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mmc-users/5a18b091-4b09-4e36-9864-752f2f597c06n%40googlegroups.com.

Xiuxiu Zhang

unread,
Nov 29, 2025, 4:52:54 PM (12 days ago) Nov 29
to mmc-users
Hi Dr. Fang,

1) We expected a result similar to Figure 1 (left), where a pencil beam propagates through the mesh with cfg.prop = [0 0 1 1; 0.0001 0 1 1.49]. Given that this property set corresponds to very low absorption, negligible scattering, and a high anisotropy factor, we would expect the photons to travel essentially in a straight line through the mesh.

2) In contrast, we do not expect the pattern observed in Figure 2 (right), especially in the region between z = 15 and 20, where the elements are assigned [0.0001 0 1 1.49]. In this layer, photons appear highly scattered, whereas we would anticipate a narrow, nearly ballistic photon path similar to what is seen in Figure 1.
 
Let me know if I can clarify anything else. Thanks!

Best,
Xiuxiu

Qianqian Fang

unread,
Nov 30, 2025, 4:07:34 PM (11 days ago) Nov 30
to mmc-...@googlegroups.com, Xiuxiu Zhang

hi Xiuxiu,

if you look at the code you shared below - the cfg.prop contains 5 rows, with labels 2,3,4 being scattering medium (mus>0).

if you plot your mesh using plotmesh(cfg.node, [cfg.elem cfg.elemprop]), you can see all these labels are used in your mesh. So, having scattering medium in the domain, you should not expect that your simulation continues behaving like air.

did I miss anything?

Qianqian

Xiuxiu Zhang

unread,
Dec 3, 2025, 1:48:32 PM (8 days ago) Dec 3
to mmc-users
Hi Dr. Fang, 

I understand that labels 2, 3, and 4 correspond to scattering media. My confusion came from the fact that I had labeled the top layer of the cube as “1,” which should have had zero scattering. However, the visualization in Figure 2 still showed scattering occurring at the top. I later realized that this was due to the element size in the mesh, and the issue was resolved after generating a mesh with much smaller element sizes.

Thanks for your help!

Best,
Xiuxiu
Reply all
Reply to author
Forward
0 new messages