Clarification on Grain Size Discrepancy Between 2D and 3D Simulations

28 views
Skip to first unread message

maryam wahaj

unread,
Dec 24, 2025, 6:02:37 AM12/24/25
to mumax2
Hi,
I hope you are doing well.
In our simulations, we define a grain size of 15 nm. For the 2D case, the resulting microstructure shows grains of comparable size, which aligns well with the defined parameter. However, when we use the same grain size value (15 nm) in the 3D simulation, the plotted microstructure appears to exhibit significantly larger grains.
I am a bit confused about this discrepancy between the 2D and 3D cases, despite using the same nominal grain size in both simulations. Could you please help me understand why the grains appear larger in the 3D case? Is this related to how grain size is interpreted or implemented differently in 2D versus 3D simulations, or possibly due to the visualization or meshing effects?
I have attached the relevant files and plots below for your reference.
I look forward to your insights, thanks for your time and guidance.
Kind regards,
3D.txt
2D grains.png
3D.png
2D.txt

Josh Lauzier

unread,
Dec 29, 2025, 4:54:35 AM (13 days ago) 12/29/25
to mumax2
Hi,

It is a real difference, not just visualization. I am not completely sure why, but if you look to the source code I think there is some slightly different logic in how the methods generate grains. In particular, for the 3D method to get the number of expected grains it compares the average grain volume to the total shape volume. To estimate grain volume it assumes the volume of grains to be 4/3 * pi * r ^3, where the grainsize is 2*r.  This will underestimate the number of grains (~297 for your numbers), when it should be something like ~2300 or so. The 2D version does not use this estimate. I would recommend just sticking to the 2D method for a 2D film.

Best,
Josh L.
Reply all
Reply to author
Forward
0 new messages