Mesh a brick with hexahedron with given xyz

I am trying to create a simple case

  1. I only want a layer of hexahedron with the given xyz to mesh this brick, I think if I can set the z of the element equal to the brick’s z
  2. I need to be able to give nodeset to the element of +x and -x at the y=0 surface, and number of elements for +x, and -x must be equal. For example, elements 123 and 456.

Here is my code now, I don’t know if webcut works, because I only need virtually group them, but physically they need to be connected, also need help in meshing etc

reset
graphics axis type origin on

create brick width 10 depth 21 height 1
move volume 1 location 0 10.5 0.5

webcut volume all with plane xplane

#this is too uncertain
#surface 3 size 3
#surface 1 size 0.05

#This makes sure the cells are connected right?
imprint vol all
merge vol all

mesh volume 1
mesh volume 2

here is my result,
image

@Norbert_Hofbauer Thank you so much

Hi @miraboreasu,

as long as you don’t need to assign different materials you probably won’t need a webcut here.

When i stick to your sketch and want to control the number of elements here, i think it is the best to use the curves in the axis directions. After meshing you can create the nodesets with the use of the extended selection.

reset
create brick width 10 depth 21 height 1
move volume 1 location 0 10.5 0.5

# x
curve 4  interval 6
curve 4  scheme equal
# y
curve 3  interval 10
curve 3  scheme equal
# z
curve 9  interval 1
curve 9  scheme equal

mesh vol 1

nodeset 1 add node all with x_coord <= 0 and y_coord = 0
nodeset 2 add node all with x_coord >= 0 and y_coord = 0 

And yes, the imprint and merge commands are used to connect the entities proberly so that there will be no coincident nodes when everything is meshed.

1 Like

A follow-up question, while z interval = 1, if I want the grids at both sides for x=0 (yoz) doing the refinement, bigger and bigger along with -x and +x, what should do, and also avoid the poor quality shape face
I am using this, but nothing changes

curve 4  scheme Bias

Thank you @Norbert_Hofbauer

You can make use of the dualbias scheme for this.

reset
create brick width 10 depth 21 height 1
move volume 1 location 0 10.5 0.5

# x
curve 2 4 6 8 scheme dualbias fine size 1 coarse size 0.2 
# y
curve 3  interval 10
curve 3  scheme equal
# z
curve 9  interval 1
curve 9  scheme equal

mesh vol 1

nodeset 1 add node all with x_coord <= 0 and y_coord = 0
nodeset 2 add node all with x_coord >= 0 and y_coord = 0