2 set duplicate block elements on
6 create vertex -0.5 -2.5 5 color
7 create curve vertex 9 vertex 3
9 create vertex 0.5 -2.5 5 color
10 create curve vertex 11 vertex 2
12 merge vertex 3 with vertex 10
13 merge vertex 2 with vertex 12
16 # Material properties, units: N, mm
20 block 1 name 'MAT_ELASTIC'
21 block 1 attribute count 2
22 block 1 attribute index 1 {young_modulus}
23 block 1 attribute index 2 {poisson_ratio}
25 # Density for mass matrix calculation
28 block 2 name 'BODY_FORCES'
29 block 2 attribute count 4
30 block 2 attribute index 1 {density} #material density
31 block 2 attribute index 2 0 #constant acceleration in x-direction
32 block 2 attribute index 3 0 #constant acceleration in y-direction
33 block 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
40 block 3 curve {bar_id} 14
42 block 3 attribute count 3
43 block 3 attribute index 1 {young_modulus_rod}
44 block 3 attribute index 2 {cross_section_area}
45 block 3 attribute index 3 {pre_stress}
49 curve {bar_id} 14 interval 1
50 curve {bar_id} 14 scheme bias factor 1 start vertex {fixed_vertex_id}
51 mesh curve {bar_id} 14
54 volume 1 scheme tetmesh
55 volume 1 size auto factor 7
61 create displacement on surface 3 dof 1 dof 2 dof 3 fix 0
63 create displacement on vertex 9 dof 1 dof 2 dof 3 fix 0
64 create 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
73 create 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
80 save as "/Users/hoangnguyen/mofem_install/mofem-cephas/mofem/users_modules/basic_finite_elements/elasticity/simple_rod_beam.cub" overwrite