| 1 |
#!python |
| 2 |
cubit.cmd('brick x 2 y 1 z 2') |
| 3 |
cubit.cmd('#{Domain = Id("volume")}') |
| 4 |
cubit.cmd('#{dx = 1/8}') |
| 5 |
cubit.cmd('#{meshSize = dx}') |
| 6 |
cubit.cmd('move vol {Domain} x 1 y 0.5 z 1') |
| 7 |
cubit.cmd('create vertex 0 0 {1-dx} on curve 9') |
| 8 |
cubit.cmd('#{v00 = Id("vertex")}') |
| 9 |
cubit.cmd('create vertex 0 0 {1+dx} on curve 9') |
| 10 |
cubit.cmd('#{v01 = Id("vertex")}') |
| 11 |
cubit.cmd('create vertex {2*dx} 0 {1-dx} on surface 3') |
| 12 |
cubit.cmd('#{v02 = Id("vertex")}') |
| 13 |
cubit.cmd('create vertex {2*dx} 0 {1+dx} on surface 3') |
| 14 |
cubit.cmd('#{v03 = Id("vertex")}') |
| 15 |
cubit.cmd('create curve vertex {v00} vertex {v02} on surface 3') |
| 16 |
cubit.cmd('#{c00 = Id("curve")}') |
| 17 |
cubit.cmd('create curve vertex {v02} vertex {v03} on surface 3') |
| 18 |
cubit.cmd('#{c01 = Id("curve")}') |
| 19 |
cubit.cmd('create curve vertex {v03} vertex {v01} on surface 3 ') |
| 20 |
cubit.cmd('#{c02 = Id("curve")}') |
| 21 |
cubit.cmd('imprint curve {c00} {c01} {c02} with surface 3') |
| 22 |
cubit.cmd('#{patchLC = Id("surface")}') |
| 23 |
cubit.cmd('surface {patchLC} copy move x {1-dx} y 0 z 0') |
| 24 |
cubit.cmd('surface {patchLC} copy move x {1-dx} y 0 z {1-dx}') |
| 25 |
cubit.cmd('surface {patchLC} copy move x {1-dx} y 0 z {-1+dx}') |
| 26 |
cubit.cmd('surface {patchLC} copy move x {2-2*dx} y 0 z 0') |
| 27 |
cubit.cmd('imprint body all') |
| 28 |
cubit.cmd('delete body 2 3 4 5') |
| 29 |
cubit.cmd('## Unimportant sides and top.') |
| 30 |
cubit.cmd('sideset 1 add surface 1') |
| 31 |
cubit.cmd('sideset 2 add surface 2') |
| 32 |
cubit.cmd('sideset 3 add surface 4') |
| 33 |
cubit.cmd('sideset 4 add surface 6') |
| 34 |
cubit.cmd('sideset 5 add surface 5') |
| 35 |
cubit.cmd('## Bottom with 5 patches cut out.') |
| 36 |
cubit.cmd('sideset 6 add surface 13') |
| 37 |
cubit.cmd('## left center, right center, center front, center back, center center') |
| 38 |
cubit.cmd('sideset 7 add surface 8') |
| 39 |
cubit.cmd('sideset 8 add surface 14') |
| 40 |
cubit.cmd('sideset 9 add surface 15') |
| 41 |
cubit.cmd('sideset 10 add surface 16') |
| 42 |
cubit.cmd('sideset 11 add surface 17') |
| 43 |
cubit.cmd('volume all size {meshSize}') |
| 44 |
cubit.cmd('mesh volume all') |
| 45 |
cubit.cmd('set exodus netcdf4 off') |
| 46 |
cubit.cmd('set large exodus on') |
| 47 |
cubit.cmd('export mesh "/scratch/dpkouri/ROL-Trilinos/packages/rol/example/PDE-OPT/topo-opt/elasticity/wheel0.e" overwrite') |