2set duplicate block elements on
6create vertex -0.5 -2.5 5 color
7create curve vertex 9 vertex 3
9create vertex 0.5 -2.5 5 color
10create curve vertex 11 vertex 2
12merge vertex 3 with vertex 10
13merge vertex 2 with vertex 12
16# Material properties, units: N, mm
20block 1 name 'MAT_ELASTIC'
21block 1 attribute count 2
22block 1 attribute index 1 {young_modulus}
23block 1 attribute index 2 {poisson_ratio}
25# Density for mass matrix calculation
28block 2 name 'BODY_FORCES'
29block 2 attribute count 4
30block 2 attribute index 1 {density} #material density
31block 2 attribute index 2 0 #constant acceleration in x-direction
32block 2 attribute index 3 0 #constant acceleration in y-direction
33block 2 attribute index 4 0 #constant acceleration in z-direction
35# Material properties for ROD, units: N, mm
37{young_modulus_rod = 1} # 100 makes cables too stiff to be able to stretch
38{cross_section_area = 5} # hand calculated from the geometry
39{pre_stress=0.1} # unit of stress, N/mm2
40block 3 curve {bar_id} 14
42block 3 attribute count 3
43block 3 attribute index 1 {young_modulus_rod}
44block 3 attribute index 2 {cross_section_area}
45block 3 attribute index 3 {pre_stress}
49curve {bar_id} 14 interval 1
50curve {bar_id} 14 scheme bias factor 1 start vertex {fixed_vertex_id}
54volume 1 scheme tetmesh
55volume 1 size auto factor 7
61create displacement on surface 3 dof 1 dof 2 dof 3 fix 0
63create displacement on vertex 9 dof 1 dof 2 dof 3 fix 0
64create displacement on vertex 11 dof 1 dof 2 dof 3 fix 0
69# Pressures need to be created seperately to avoid Cubit bug
71#create force on vertex {force_vertex_id} force value 7 direction curve 1
73create pressure on surface 1 magnitude 0.5
76#rotate volume 1 angle 65 about z include_merged
77#rotate volume 1 angle 65 about x include_merged
80save as "/Users/hoangnguyen/mofem_install/mofem-cephas/mofem/users_modules/basic_finite_elements/elasticity/simple_rod_beam.cub" overwrite