# stack the 2D cylinder surfaces into a 3D tet mesh # read the 2D Delaunay triangulation # and use as top and bottom of stacked mesh define INPUT_FILE cyl_2D_delaunay.inp define Z_BOTTOM 0.0 define Z_TOP 15.0 define NLAYERS 15 read / avs / INPUT_FILE / mo_tri # Write the top and bottom surfaces for stack command cmo / setatt / mo_tri / zic / Z_BOTTOM dump / avs / tmp_bottom.inp / mo_tri cmo / setatt / mo_tri / zic / Z_TOP dump / avs / tmp_top.inp / mo_tri ############# STACK LAYERS ####################### # assume itetclr and imt are set with materials # all triangle faces are upward normal cmo / create / mo_stack stack / layers / avs / & tmp_bottom.inp tmp_top.inp / 1 NLAYERS dump gmv tmp_layers_stack.gmv mo_stack dump avs tmp_layers_stack.inp mo_stack cmo printatt mo_stack -xyz- minmax # fill layers with prism elements # this can be used with hextotet if connect does # not preserve the central cylinder smoothly stack / fill / mo_prism / mo_stack cmo select mo_prism filter / 1,0,0 rmpoint / compress resetpts itp define WELL_ID 1 define MAT_ID 2 define CMO mo_prism infile color_well.mlgi dump / gmv / prism_stack.gmv / mo_prism dump / avs / prism_stack.inp / mo_prism cmo status mo_prism cmo printatt mo_prism -all- minmax cmo printatt mo_prism itetclr minmax ############# STACK LAYERS ####################### # Connect points into 3D Delaunay mesh cmo create cmotet///tet copypts cmotet mo_prism cmo select cmotet cmo printatt cmotet -xyz- minmax cmo/setatt/cmotet/imt 1 filter 1,0,0 rmpoint compress dump gmv points_for_tet.gmv cmotet dump avs2 points_for_tet.inp cmotet connect noadd rmpoint compress quality resetpts itp cmo addatt cmotet vor_volume vorvol cmo select cmotet cmo printatt cmotet ccoef minmax define WELL_ID 1 define MAT_ID 2 define CMO cmotet infile color_well.mlgi dump / fehm / cyl_tet / cmotet / ascii dump / zone_outside / cyl_tet / cmotet / keepatt dump gmv cyl_tet_delaunay.gmv cmotet dump avs cyl_tet_delaunay.inp cmotet finish