Skip to content

Instantly share code, notes, and snippets.

@philippslang
Created January 12, 2016 10:54
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philippslang/c5aa776b9ad9998c869f to your computer and use it in GitHub Desktop.
Save philippslang/c5aa776b9ad9998c869f to your computer and use it in GitHub Desktop.
ANSYS Icem mesh script
ic_load_tetin ./out.tin
set srfcs [ic_geo_get_objects surface]
ic_curve intersect STANDARD crv.00 $srfcs
set crvs [ic_geo_get_objects curve]
ic_geo_create_curve_ends $crvs
ic_save_tetin flow.tin
ic_geo_scale_meshing_params all 0.9
ic_set_meshing_params global 0 gref 0.9 gmax 9.0 gfast 1 gedgec 0.2 gnat 0 gcgap 1 gnatref 10
ic_set_meshing_params surface_global 0 mesh_type 0 mesh_method 2 simple_offset 0 bunch_respect 0 protect_line 0 bound_smooth 0 block_mapping 0.2 adjust_nodes_max 0.0 proj_surf 1 surf_sizes 0 ign_size 0.09 try_harder 1 impr_level 1 mesh_dormant 0 smooth_dormant 0 max_area 0.0 max_length 0.0 min_angle 0.0 max_nodes 0 max_elements 0 merge_surfs 1 mapped_method 1 free_bunch 0 shrinkwrap_nsmooth 5 shrinkwrap_projfactor 0.1 snorm 1 quadratic 0
ic_set_meshing_params variable 0 tetra_smooth 0
ic_set_meshing_params global 0 gfast 1 gedgec 0.01
set fracture_parts [ic_geo_list_parts FRACTURE*S]
puts $fracture_parts
foreach f $fracture_parts { ic_geo_set_family_params $f internal_wall 1}
set inwall_parts [ic_geo_list_parts *_INT]
puts $inwall_parts
foreach i $inwall_parts { ic_geo_set_family_params $i internal_wall 1}
ic_run_tetra ./flow.tin ./flow.uns run_cutter 1 delete_auto 1 run_smoother 0 fix_holes 1 n_processors 1 in_process 1 auto_vol 1 log ./flow.log
ic_smooth_elements map all upto 0.4 iterations 5 fix_families {} n_processors 1 smooth TRI_3 float TETRA_4 laplace 1
ic_smooth_elements map all upto 0.4 iterations 5 prism_warp_weight 0.5 fix_families {} n_processors 1 smooth TETRA_4 float PENTA_6 freeze TRI_3
ic_smooth_elements map all upto 0.4 iterations 5 prism_warp_weight 0.5 fix_families {} metric Quality n_processors 1 smooth TETRA_4 smooth TRI_3 float PENTA_6
ic_uns_new_family MATRIX
set matrix_parts [ic_geo_list_parts CREATED_MATERIAL*]
foreach m $matrix_parts { ic_uns_move_family_elements $m MATRIX}
puts $matrix_parts
ic_uns_delete_family $matrix_parts
ic_save_unstruct ./flow.uns 1 {} {} {}
ic_boco_solver CSP
ic_solver_mesh_info CSP
ic_boco_save nastran.fbc
ic_boco_save_atr nastran.atr
ic_exec {C:/Program Files/ANSYS Inc/v130/icemcfd/win64_amd/icemcfd/output-interfaces/csp} -dom ./flow.uns -b ./nastran.fbc -project . ./flow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment