Refining interior hexes in a block
3 posts
• Page 1 of 1
Refining interior hexes in a block
I have a code with 2 blocks defined, and would like to refine all hexes in one block, but not have the refinements carry over to the other block. Is there a way to refine all hexes that are interior to a block, such that after refinement, only one block is modified?
Thanks!
Thanks!
- jlchan
- Posts: 2
- Joined: Thu Sep 19, 2013 12:18 pm
Re: Refining interior hexes in a block
It's kind of tricky to get at all the interior hexes, but it can be done. Try the following:
reset
create cylinder radius 1 z 1
create cylinder radius 0.5 z 1
subtract 2 from 1
create cylinder radius 0.5 z 1
merge all
mesh volume all
group 'hexes_in_volume_3' add hex in volume 3
group 'outer_hexes' add hex in face in volume 3
group 'hexes_to_refine' subtract outer_hexes from hexes_in_volume_3 #creates the target group of hexes to refine
highlight hexes_to_refine
refine hex in hexes_to_refine
This approach only refines the interior hexes to volume 3, not perturbing the interface between the two volumes.
reset
create cylinder radius 1 z 1
create cylinder radius 0.5 z 1
subtract 2 from 1
create cylinder radius 0.5 z 1
merge all
mesh volume all
group 'hexes_in_volume_3' add hex in volume 3
group 'outer_hexes' add hex in face in volume 3
group 'hexes_to_refine' subtract outer_hexes from hexes_in_volume_3 #creates the target group of hexes to refine
highlight hexes_to_refine
refine hex in hexes_to_refine
This approach only refines the interior hexes to volume 3, not perturbing the interface between the two volumes.
csimsoft
- csimsoft Moderator
- Posts: 289
- Joined: Tue Feb 14, 2012 5:59 pm
- Location: American Fork, UT
Re: Refining interior hexes in a block
Great, thanks!
- jlchan
- Posts: 2
- Joined: Thu Sep 19, 2013 12:18 pm
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest