Skip to content
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

XYDG Meshing Around a Single Disjointed Mesh #3578

Open
olinwc opened this issue Jun 12, 2023 · 5 comments
Open

XYDG Meshing Around a Single Disjointed Mesh #3578

olinwc opened this issue Jun 12, 2023 · 5 comments

Comments

@olinwc
Copy link

olinwc commented Jun 12, 2023

FEATURE REQUEST

Issue

Currently, XYDelaunayGenerator (XYDG) cannot mesh the area around a single mesh with disjointed pieces. The use case for this is designing an assembly using HexIDPatternedMeshGenerator and then deleting the background of the created assembly, preserving only the pins, and then drawing a hexagon and maybe some circles inside the assembly for wires or control drums. XYDG works if each pin is defined as it own mesh, but if all the pins come from an assembly mesh with its background deleted, this does not work.

Feature

Ability to pass a single mesh consisting of disconnected parts and XYDG will mesh around those disconnected parts.

Work Around

Currently I can workaround this for single control rods by creating my hexagonal pin cell mesh, and then ONLY deleting pin cells where I want to put my control drum, thereby creating a hole in the hexagonal assembly, and then putting the control drum in this hole and meshing around that.

The problem with this approach is that the control drum CANNOT intersect with the pin cells (pin + background in cell). This could be a problem as physically there is no reason a control drum or control rod channel could not intersect with the pin background of a cell. This cannot be meshed currently unless doing the aforementioned explicitly meshing individual pins.

Tag @roystgnr @eshemon

@eshemon
Copy link

eshemon commented Jun 12, 2023

Tagging @miaoyinb for his comments here on what could potentially be addressed by the upcoming FlexiblePatternGenerator

@roystgnr
Copy link
Member

I ran across #1902 again today, and I'm wondering if I can kill two birds with one stone here. A flood algorithm that fills an unordered_set (or maybe an id-indexed set; don't want to get burned in parallel again...) of elements would be useful for both identifying disconnected meshes and making copies of connected components for use in MeshedHole.

But now here's something that scares me a bit: are we likely to come up with cases where a mesh itself is connected but its interior is not? E.g. two quads like:

o---o
|   |
|   |
o---o---o
    |   |
    |   |
    o---o

No flood-fill based on neighbor (and for adapted meshes, parent) links will find a connection that only goes through one vertex. We've got other code in libMesh (at least in distributed-memory-mesh repartitioning code paths, possibly elsewhere) that already does not handle this case well, IIRC.

@miaoyinb
Copy link
Contributor

I am working on this new FlexiblePatternGenerator that will be able to do what you mentioned here. The new MG allows users to pattern unit meshes based on hexagona/rectuangular/circular and free-style patterns and adopted any closed-loop mesh as the boundary. It then uses XYD to generate the matrix. It should be ready for a PR soon.

@miaoyinb
Copy link
Contributor

miaoyinb commented Jun 12, 2023

mixed_pattern

Sample example syntax

[Mesh]
  [accg]
    type = AdvancedConcentricCircleGenerator
    num_sectors = 9
    ring_radii = '1 2'
    ring_intervals = '2 2'
    ring_block_ids = '10 15 20'
    ring_block_names = 'inner_tri inner outer'
    external_boundary_id = 100
    external_boundary_name = 'ext'
    create_outward_interface_boundaries = false
  []
  [reduced_accg]
    type = TransformGenerator
    input = 'accg'
    transform = SCALE
    vector_value = '0.4 0.4 0.4'
  []
  [fpg]
    type = FlexiblePatternGenerator
    inputs = 'accg reduced_accg'
    boundary_type = HEXAGON
    boundary_pitch = ${fparse 12.0*sqrt(3.0)}
    boundary_sectors = 10
    hex_patterns = '0 0;
                   0 2 0;
                    0 0'
    hex_pitches = 7
    rect_pitches_x = 3
    rect_pitches_y = 5
    rect_patterns = '1 1;
                     1 1'
    extra_positions = '0.0 10.0 0.0 
                       0.0 -10.0 0.0'
    extra_positions_mg_indices = '1 1'
    desired_area = 1.0
    verify_holes = false
  []
[]  

@miaoyinb
Copy link
Contributor

AdvancedConcentricCircleGenerator is another new MG being developed for pin generation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants