-
When generating large enough domains I see that some seeds are removed with the following error: "RuntimeWarning: Seeds were removed from the seed list during positioning. Their data has been written to seed_position_reject.log and their indices were [891, 895, 900, 970, 953, 955, 958, 963, 967, 968, 929, 938, 930, 931, 933, 935, 937, 941, 942, 944, 945, 946, 947]." Is this because there is a minimum size where the grains are deleted due to overlap of seeds? It would then seem that len(seeds) is not representative of the total number of grains in the final image. When I tried to access the data from seed_position_reject it stated NameError: name 'seed_position_reject' is not defined. Is there a more straightforward way to access this information? Additionally, I eventually want to determine the total length of the grain boundaries or perhaps just the area of the grain boundaries . Any thoughts on the best approach to this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @dpd5121 That warning comes up when not every seed can be positioned in a domain. There's a heuristic that determines how many seeds to sample, then those seeds are positioned in the domain from largest to smallest volume. If the positioning algorithm tries over 10k times to place a seed but fails, it moves on to the next seed. These rejected seeds get added to a file called For the length (2D) and area (3D) of grain boundaries, I would start with the facet list. The facets associated with the domain boundaries could be filtered out (neighbor = -1) as well as the facets internal to grains (same seed number on both sides). The 2D length of each facet can be found from differencing the positions of the endpoints and taking the norm. For 3D it gets a bit more interesting. The facets are ordered lists of points, so from the first three points in the facet you can define a plane. The set of points can then be mapped to 2D points in that plane (first point is the origin, second point is on the x-axis for example). From there, there's an algorithm to determine the area enclosed by a polygon in 2D based on the (x,y) coordinates of the vertices. The last step would be to check if a grain boundary has multiple facets. All the lengths/areas of facets between grain i and grain j should be summed up to get the grain boundary length/area. From there you can sum over all grain boundaries, take statistics on min/mean/max grain boundary, etc. |
Beta Was this translation helpful? Give feedback.
Hi @dpd5121 That warning comes up when not every seed can be positioned in a domain. There's a heuristic that determines how many seeds to sample, then those seeds are positioned in the domain from largest to smallest volume. If the positioning algorithm tries over 10k times to place a seed but fails, it moves on to the next seed. These rejected seeds get added to a file called
seed_position_reject.log
in the working directory.For the length (2D) and area (3D) of grain boundaries, I would start with the facet list. The facets associated with the domain boundaries could be filtered out (neighbor = -1) as well as the facets internal to grains (same seed number on both sides). The 2D length…