# start with the polygon surface with elevations or flat # create surface layers and stack into 3D prism mesh # The INPUT_FILE is generated by the script get_poly_surf.lgi #define INPUT_FILE poly40_topo.gmv define INPUT_FILE poly_cut_topo.gmv # read the filled polygon and write file for stack command # set materials, stack will have fits if they are 0 read / gmv / INPUT_FILE / mo_topo cmo / setatt / mo_topo / imt / 1 cmo / setatt / mo_topo / itetclr / 1 cmo / printatt / mo_topo / itetclr / minmax dump / avs / tmp_top.inp / mo_topo # DEFINE parameters for stack command # This is depth to bottom of mesh, plus extra past wedge depth # This are not used for a flat bottom mesh define / DEPTH / 28.0 define / EXTRA / 1.0 # Create layers between top and bottom of stack # Value to translate each layer (interface or internal layer) # Version 3 adds a material between 2 and 3 # this is all material 1 define / L1 / 0.02 # this is all material 2 define / L2 / 0.20 define / L2 / 0.18 # this is all material 3 define / L3 / 0.20 define / L3 / 0.18 # this is all material 4 define / L4 / 0.08 define / L4 / 0.12 # this is all material 5 define / L5 / 0.5 # this is all material 1 Use flat elevation instead of DEPTH define / Z_BOTTOM / -1. # do the math to create surfaces # create temp cmo for calculations cmo copy mo_tmp mo_topo #################################### # CHECK L0 (top elevations) cmo printatt mo_topo zic minmax math / sub / mo_tmp / zic / 1,0,0 / mo_topo / zic / L1 # CHECK elevations translated to L1 cmo printatt mo_tmp zic minmax dump / avs / tmp_lay1.inp / mo_tmp math / sub / mo_tmp / zic / 1,0,0 / mo_tmp / zic / L2 # CHECK elevations translated to L2 cmo printatt mo_tmp zic minmax dump / avs / tmp_lay2.inp / mo_tmp math / sub / mo_tmp / zic / 1,0,0 / mo_tmp / zic / L3 # CHECK elevations translated to L3 cmo printatt mo_tmp zic minmax dump / avs / tmp_lay3.inp / mo_tmp math / sub / mo_tmp / zic / 1,0,0 / mo_tmp / zic / L4 # CHECK elevations translated to L4 cmo printatt mo_tmp zic minmax dump / avs / tmp_lay4.inp / mo_tmp math / sub / mo_tmp / zic / 1,0,0 / mo_tmp / zic / L5 # CHECK elevations translated to L5 cmo printatt mo_tmp zic minmax dump / avs / tmp_lay5.inp / mo_tmp # Create bottom with translate or set to flat elevation cmo / select / mo_tmp cmo / setatt / mo_tmp / zic / Z_BOTTOM # CHECK bottom elevations cmo printatt mo_tmp zic minmax dump / avs / tmp_lay_bot.inp / mo_tmp # STACK the surfaces we just created # Be careful about material numbers # Be careful about refinement number (proportional divisions) # # The top 4 layers should add up to .5 (where ice starts). # # Layer file material, divisions # TOP--------------------- tmp_top.inp 1,1 # mat 1 = .02 thick # L1 --------------------- tmp_lay1.inp 1,8 # mat 2 = .18 thick # L2 --------------------- tmp_lay2.inp 2,8 # mat 3 = .18 thick # L3 --------------------- tmp_lay3.inp 3,5 # mat 4 = .12 thick # L4 --------------------- tmp_lay4.inp 4,19 # mat 4 = .5 thick # L5 --------------------- tmp_lay4.inp 5,49 # mat 6 = variable # BOT--------------------- tmp_lay_bot.inp 6 # cmo / create / mo_stack stack / layers / avs / & tmp_lay_bot.inp 6 & tmp_lay5.inp 5,49 & tmp_lay4.inp 4,19 & tmp_lay3.inp 3,5 & tmp_lay2.inp 2,8 & tmp_lay1.inp 1,8 & tmp_top.inp 1,1 / flip * make prisms stack / fill / mo_prism / mo_stack filter / 1,0,0 rmpoint / compress dump / gmv / full_mesh.gmv / mo_prism ############# CHECK FINAL MESH ####################### cmo printatt mo_prism -xyz- minmax cmo printatt mo_prism itetclr minmax # DONE # File full_mesh.gmv are stacked prism mesh with NO ice finish