How to use mesh_cut and split_sideset tools for fracture in MoFEM?

46 views
Skip to first unread message

Karol Lewandowski

unread,
Jan 18, 2018, 2:49:19 PM1/18/18
to mofem Group
Lukasz, could you provide a brief instruction on how to use the mentioned tools? I would like to do some testing with bones and the fracture module.

Cheers,

Karol

Lukasz Kaczmraczyk

unread,
Jan 23, 2018, 11:25:28 AM1/23/18
to mofem Group
Hello Karol,

Here you have example mesh
reset

create sphere radius 1 
create sphere radius 0.75

subtract volume 2 from volume 1

brick x 2 y 2 z 2
move Volume 4  x 1 y 1 z 1 include_merged 

intersect volume 4 3

create Displacement  on surface 11  dof 3 fix 0 
create Displacement  on surface 10  dof 1 fix 0 
create Displacement  on surface 12  dof 2 fix 0
create pressure  on surface 13  magnitude 1 
create force  on vertex 14  vector 0.001 0 0 0 0 0 

# All edges
block 2 curve all  
# All vertices
block 3 vertex all  

# make material block
block 1 volume all  
block 1 name 'MAT_ELASTIC' 
block 1 attribute count 2 
# Young modulus
block 1 attribute index 1 100.0 
# Poisson's ratio
block 1 attribute index 2 0.25  

create surface circle radius 0.15 xplane 
rotate Surface 15  angle -45  about Z include_merged 
move Surface 15  x 0.70711 y 0.70711 z 0 include_merged 
Sideset 400 surface 15

volume 3  size auto factor 6
volume 3 scheme Tetmesh
mesh volume 3

surface 15  size auto factor 7
mesh surface 15 

You can generate it in cubit. Alternatively you can use any other code. You can see that blokset 1 has volume meshe. Blokset 2 keeps all the coorner edges and block set 3 keeps all corner nodes. In additon cutting surface is in sideset 400. We will use sideset 400 to cut mesh. Cutting surface can have arbitrary shape, if needed can be non-planar.

Cutting mesh

Tools for cutting, splitting and partitioning mesh are in tools directory in usrers modules. We first cut the mesh, assuming that mesh is in file mesh.cub (attached in the link). This mesh keeps information about boundary conditions and loading if you like to do calculations with it.

Mesh cut too create internal surface in the body:
./mesh_cut -my_file mesh.cub -edges_block_set 2 -vertex_block_set 3 -surface_side_set 400 -vol_block_set 1 -fraction_level 4 -create_side_set 200  -shift 0,0,0
where options are
-fraction_level 4 # That defines how coersens of the mesh, higher number less long edges are merged and mesh is coarser
-surface_side_set 400 # Sideset of surface which you like to use to cut
-create_side_set 200 # Is a created sideset with new surface embedded in the mesh
-vol_block_set 1 # Is a blockset in which you like to make a cut
-edges_block_set 2 -vertex_block_set 3 # Are edges and vertices defining geometry


As result file "out.h5m" is created. In addition you can have "out.vtk" file with resultant mesh.

Splitting mesh

Using mesh_cut you can create surface, but if you like to introduce crack, you have to split nodes. To do that you have to use split_sideset tool, as follows,
./split_sideset -my_file out.h5m -side_sets 200

Again output is "out.h5m" file and "out.vtk". "out.h5m" keep information about boundary conditions and materials.


Kind regards,
Lukasz



mesh.cub
Reply all
Reply to author
Forward
0 new messages