-
Notifications
You must be signed in to change notification settings - Fork 54
Gap automeshing #2390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gap automeshing #2390
Conversation
one more point:
|
Thanks for this great feature!
Agree that we can set 1 as default if ti works quite well already. Then we can add an option like
Right now, we don't have good conformal scheme for thin strips, so probably no need right now.
Not too concerned, but I wonder that it's not hard to store them?
My understanding is that metallic structures are more of a concern. So we probably only need to distinguish between metallic (PEC, lossyMetal) and dielectric. |
3665737
to
f5a5d78
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Half way through the code. Looks quite nice, although taking quite a bit efforts in understanding the logic. Some high-level description in each function will be very helpful. Some minor comments so far:
f5a5d78
to
395f617
Compare
sprinkled around some more comments in the code, had to recall myself what I was doing 😅 |
395f617
to
ff7ac19
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another great feature! I found a couple of small things in the associated comments. The only real sticking point for me is that it would be nice to get a symmetric grid, when the structure itself is symmetric.
I think it came up in the meeting and maybe there is no easy solution. But for the structure below it seems to always give an asymmetric grid. I thought maybe part of the reason could be due to how intersections are found with grid boundaries, which does not make use of a tolerance. The grid boundary and the polygon vertex might be very close.
And here is the original grid without gap refinement. (setting gap_meshing_iters=0)
2fc76eb
to
b8cd3b1
Compare
44379b3
to
ddbe4ae
Compare
should be all addressed now. Some notable changes:
![]() ![]() ![]() ![]()
![]() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good! Just one part not fully understand: how re-entering subcell features are filtered. Could you provide some visual explanations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks pretty good! Just one improvement for code coverage, and friendly reminder for Changelog.
Also I tried another notebook with the gap meshing. WidebandBeamSteerableReflectarrayWithPRUC.zip
I assumed it would place snapping lines in the gap between simulation boundary and the arrows. Instead it gives:
And when I use many more iterations:
Is this expected?
yeah, currently it ignores boundary conditions. I should add that. In this example, it's periodic I assume? I think need to add for PEC and PMC boundary conditions as well |
yea periodic |
Actually, just realized, that even with proper boundary treatment there won't be any additional grid lines in this example. Because the edges across periodic sides are already separated by a grid line (=simulation domain edge) |
@weiliangjin2021 Damian's case is a good example of that: note those sharp corners that cross the same grid segment before crossing anything else, this is what I call a small re-entry feature. ![]() When we look for intersections between PEC polygons and grid lines, we go around the polygon's perimeter one segment after another. So, when such a small feature intersects the same edge twice, the array that stores indices of intersected cells will have two consecutive elements with the same value. Such elements are removed from array of intesections. Btw, in Damian's comment above these small features were still resolved after two iterations 😅, but I already found a bag, and now grid stay the same after the first iteration |
a825fd5
to
48bf882
Compare
Great I think its ready, thanks for handling BCs! |
e98ae2e
to
86b3f0d
Compare
f3062bb
to
752f544
Compare
752f544
to
3a9d515
Compare
Integrated gap meshing in an iterative way. Now
LayerRefinementSpec
has two additional parameters:gap_meshing_iters: NonNegativeInt = 1
to set the number of iteration to perform for attempting resolving all gapsdl_min_from_gap_width: bool = True
whether or not to reducedl_min
reduce to the minimal detected gap width.A few of points to discuss:
examples of meshing thin strips and gaps:

