ICEM - .tcl-script For Column With Nozzle

27
2022/02/15 05:32 1/2 ICEM - .tcl-script For Column With Nozzle LSS Wiki - https://wikis.ovgu.de/lss/ Table of Contents ICEM - .tcl-script For Column With Nozzle 1 ....................................................................................

Transcript of ICEM - .tcl-script For Column With Nozzle

Page 1: ICEM - .tcl-script For Column With Nozzle

2022/02/15 05:32 1/2 ICEM - .tcl-script For Column With Nozzle

LSS Wiki - https://wikis.ovgu.de/lss/

Table of ContentsICEM - .tcl-script For Column With Nozzle 1 ....................................................................................

Page 2: ICEM - .tcl-script For Column With Nozzle

Lastupdate:2020/02/1618:50

guide:icem_.tcl-script_for_column_with_nozzle https://wikis.ovgu.de/lss/doku.php?id=guide:icem_.tcl-script_for_column_with_nozzle

https://wikis.ovgu.de/lss/ Printed on 2022/02/15 05:32

Page 3: ICEM - .tcl-script For Column With Nozzle

2022/02/15 05:32 1/25 ICEM - .tcl-script For Column With Nozzle

LSS Wiki - https://wikis.ovgu.de/lss/

ICEM - .tcl-script For Column With Nozzle

Here you can find a -tcl-script that generates a column crystallizer with a nozzle using ICEM.

ICEM, tcl, Scripting

crystallizer.tcl

## Tcl-Script for ANSYS ICEM CFD## Part of Work: Parametric Model for crystallizer with nozzle#### written by Sebastian Engel## last edit: 02/2017####

# ----------------------------------------------- # Start empty ICEM Session # ----------------------------------------------- ic_unload_tetin ic_hex_unload_blocking ic_unload_mesh ic_empty_tetin ic_boco_clear_icons ic_csystem_display all 0 ic_csystem_set_current global ic_set_global geo_cad 0.000001 toler ic_set_meshing_params global 0 gttol 0.000001 gtrel 1 ic_geo_set_units mm################################################################################## General settings################################################################################

# Debug settings (Switch for mesh smoothing, and file export) set debug 1

# Output file name set outputfile "crystallizer"

################################################################################## Input Parameter settings ( Don't Forget the dot, it's the differencebetween integer and float)################################################################################

Page 4: ICEM - .tcl-script For Column With Nozzle

Lastupdate:2020/02/1618:50

guide:icem_.tcl-script_for_column_with_nozzle https://wikis.ovgu.de/lss/doku.php?id=guide:icem_.tcl-script_for_column_with_nozzle

https://wikis.ovgu.de/lss/ Printed on 2022/02/15 05:32

#source parameter.tcl

# oberer Radius [mm]set rmoben 50.# unterer Radius [mm]set rmunten 25.

# Laenge Zylinder [mm]set cyllength 200.# Laenge Konus [mm]set conuslength 90.

# Stutzen Position [mmm]set stutzenpos 20.# Stutzen Durchmesser [mm]set stutzenrm 5.

#Stutzen Winkel [deg] Not supported yet#set stutzangle 5.

# relative Inlet Length to Radiusset inlrel 20.

################################################################################## Mesh Parameter settings################################################################################## Global Mesh scale paramterset nglob 1.0

# Size of Layer three of Stutzen [%]set stutzSurroundTh 2.0

# relative Boundary Layer Thickness (from Radius), Lower sectionset blth 0.4# relative Boundary Layer Thickness (from Radius), Cylinder sectionset blthOut 0.4# relative Boundary Layer Thickness (from Radius), im Stutzenset blthStutz 0.3

## Mesh parameter

Page 5: ICEM - .tcl-script For Column With Nozzle

2022/02/15 05:32 3/25 ICEM - .tcl-script For Column With Nozzle

LSS Wiki - https://wikis.ovgu.de/lss/

# Boundary Layer Nodes in main volume set nblmain 15 # Boundary layer in main volume, height of first cell [%] set nblmainheight 0.05 # Inlet section [n/mm] set ninllgh 0.1 # Lower conussection [n/mm] set nconlow 0.3 # Outlet section [n/mm] set ncyllength 0.1 # Tangential mesh Nodes per quarter set ntangential 21 # Boundary Layer Nodes in stutzen set nblstutz 8 # Boundary Layer height of first cell in stutzen [%] set nblstutzheight 0.05 # Boundary Layer Nodes around stutzen set nblstutzaround 8

## Stutzen length [n/mm] set nstutzlgh 0.2 ## Stutzen tangential set nstutztang 10

################################################################################## ICEM initialisation and parameter Checks################################################################################

# Getting ICEM environment (installation dir) global env set icemenv $env(ICEM_ACN)

# change into working directory - directory of this script set wdir [pwd] set staticdir $wdir ic_chdir $wdir

################################################################################## Helpers for running this script################################################################################ # Get coordinates from point(set xyz to x, to get x coordinate) proc pcrd {point xyz} { return [lindex [ic_vset -vec - $point] $xyz]

Page 6: ICEM - .tcl-script For Column With Nozzle

Lastupdate:2020/02/1618:50

guide:icem_.tcl-script_for_column_with_nozzle https://wikis.ovgu.de/lss/doku.php?id=guide:icem_.tcl-script_for_column_with_nozzle

https://wikis.ovgu.de/lss/ Printed on 2022/02/15 05:32

} proc pcrds {point} { return [ic_vset -vec - $point] } # Print output to log, with system time option proc log [list str [list time 1]] { set systemTime [clock seconds] if {$time} { ic_mess "[clock format $systemTime -format %H:%M:%S]:$str\n" } else { ic_mess "$str\n" } } # Some Itertors for retational symmetry # curve loop array set clp {1 2 2 3 3 4 4 1} # list loop array set llp {0 1 1 2 2 3 3 0} # Some constants set pi [expr acos(-1)] set degtorad [expr $pi/180.]

# Helper to set Vertices at right radial distance proc r {ybase yz index} { array set siny {1 1. 2 0. 3 -1. 4 0.} array set cosz {1 0. 2 1. 3 0. 4 -1.} if {$yz eq "y"} { return [expr $ybase*$siny($index)] } if {$yz eq "z"} { return [expr $ybase*$cosz($index)] } } ################################################################################log "Start Building of Geometry"################################################################################

# Center axis ic_point {} CNSTR p.axis.b "0,0,0" ic_point {} CNSTR p.axis.t "0,0,100"

Page 7: ICEM - .tcl-script For Column With Nozzle

2022/02/15 05:32 5/25 ICEM - .tcl-script For Column With Nozzle

LSS Wiki - https://wikis.ovgu.de/lss/

ic_curve point CNSTR c.axis "p.axis.b p.axis.t"

# Konus ic_point {} WALL p.conus.unten "$rmunten,0,0" ic_point {} WALL p.conus.oben "$rmoben,0,$conuslength" ic_point {} CNSTR p.conus.unten.bl "[expr $rmunten*(1.-$blth)],0,0" ic_point {} CNSTR p.conus.oben.bl "[expr $rmoben*(1.-$blthOut)],0,$conuslength" ic_curve point WALL c.conus "p.conus.unten p.conus.oben" ic_curve point CNSTR c.conus.bl "p.conus.unten.blp.conus.oben.bl" # Inlet set inllgh [expr $rmunten * $inlrel] ic_point {} INLET p.inlet "$rmunten,0,-$inllgh" ic_point {} CNSTR p.inlet.bl "[expr $rmunten*(1.-$blth)],0,-$inllgh" ic_point {} INLET p.inlet.axis "0,0,-$inllgh" ic_curve point INLET c.inlet "p.inlet p.inlet.axis" ic_curve point WALL c.inlet.wall "p.inlet p.conus.unten" ic_curve point CNSTR c.inlet.wall.bl "p.inlet.bl p.conus.unten.bl" # Zylinder ic_point {} WALL p.outlet "$rmoben,0,[expr$cyllength+$conuslength]" ic_point {} CNSTR p.outlet.bl "[expr $rmoben*(1.-$blthOut)],0,[expr$cyllength+$conuslength]" ic_point {} WALL p.outlet.axis "0,0,[expr $cyllength+$conuslength]" ic_curve point OUTLET c.outlet "p.outlet p.outlet.axis" ic_curve point WALL c.cyl "p.outlet p.conus.oben" ic_curve point CNSTR c.cyl.bl "p.outlet.bl p.conus.oben.bl" # ----------------------------------------------- log "Revole Geometry" # -----------------------------------------------

# Catch all entities set pointlist [ic_geo_get_objects point] set crvlist [ic_geo_get_objects curve] # Prerotate entities for 45 degree foreach pnt $pointlist {

Page 8: ICEM - .tcl-script For Column With Nozzle

Lastupdate:2020/02/1618:50

guide:icem_.tcl-script_for_column_with_nozzle https://wikis.ovgu.de/lss/doku.php?id=guide:icem_.tcl-script_for_column_with_nozzle

https://wikis.ovgu.de/lss/ Printed on 2022/02/15 05:32

ic_move_geometry point names $pnt rotate 45 rotate_axis {0 0 1}cent {0 0 0} } foreach crv $crvlist { ic_move_geometry curve names $crv rotate 45 rotate_axis {0 0 1}cent {0 0 0} } # Define Points which don't need to be revolved set ptsToRemove "" foreach pnt $pointlist { if {[pcrd $pnt 0] == 0} { lappend ptsToRemove $pnt } }

# Removing $ptsToRemove from $pointlist foreach pt $ptsToRemove { set id [lsearch $pointlist $pt] set pointlist [lreplace $pointlist $id $id] }

# Revolving Points and creating Arcs, every 90° foreach pnt $pointlist { for {set x 1} {$x <= 4} {incr x} { ic_geo_duplicate_set_fam_and_data point $pnt $pnt.$clp($x){} ic_move_geometry point names $pnt.$clp($x) rotate [expr$x*90] rotate_axis {0 0 1} cent {0 0 0} } for {set x 1} {$x <= 4} {incr x} { ic_curve arc_ctr_rad [ic_geo_get_part point $pnt] c.$pnt.$x"\{0 0 [pcrd $pnt 2] \} $pnt.$x $pnt.$clp($x) {} {} {} 0" } ic_delete_geometry point $pnt }

# Revolving Curves without "build topology", > faster and entitynames won't change foreach crv $crvlist { if {$crv != "c.axis"} { for {set x 1} {$x <= 4} {incr x} { ic_geo_duplicate_set_fam_and_data curve $crv$crv.$clp($x) {} ic_move_geometry curve names $crv.$clp($x) rotate [expr$x*90] rotate_axis {0 0 1} cent {0 0 0} _0 ic_geo_cre_srf_rev [ic_geo_get_part curve $crv]s.$crv.$x $crv {0 0 0} {0 0 -1} [expr ($x-1)*90] [expr $x*90] c 0

Page 9: ICEM - .tcl-script For Column With Nozzle

2022/02/15 05:32 7/25 ICEM - .tcl-script For Column With Nozzle

LSS Wiki - https://wikis.ovgu.de/lss/

} ic_delete_geometry curve $crv } } # ----------------------------------------------- log "Creating Stutzen" # -----------------------------------------------

# Setting Stutzen axis ic_point {} CNSTR p.help.stutz.axis "0,0,$stutzenpos" ic_point {} STUTZOUTLET p.stutz.outlet.center "[expr$rmoben+$stutzenrm*20.],0,$stutzenpos" # Stutzen wall ic_surface cyl STUTZWALL s.stutz.wall "p.help.stutz.axisp.stutz.outlet.center $stutzenrm $stutzenrm 0 1" # Rearranging entities ic_delete_geometry curve names {s.stutz.walle61 s.stutz.wall.C0} 00 ic_geo_set_name curve s.stutz.wall.C1 c.stutz.outlet 1 0 ic_geo_set_name surface s.stutz.wall.S2 s.stutz.outlet 1 0 ic_geo_set_part surface s.stutz.outlet STUTZOUTLET 0

# # Cutting unwanted parts away ic_curve intersect WALL c.wall.stutz {STUTZWALL WALL} ic_geo_duplicate_set_fam_and_data curve c.wall.stutzc.wall.stutz.help ic_geo_trim_surface s.stutz.wall c.wall.stutz.help 0 if {[expr $stutzenpos-$stutzenrm] > $conuslength} { ic_delete_geometry surface names {s.stutz.wall} 0 0 ic_geo_set_name surface s.stutz.wall.cut.0 s.stutz.wall 1 0 } else { ic_delete_geometry surface names {s.stutz.wall.cut.0} 0 0 }

# Removing Stutzen cross section from conus sections if {[expr $stutzenpos-$stutzenrm] > $conuslength} { set levellst "cyl" } if {[expr $stutzenpos+$stutzenrm] < $conuslength} { set levellst "conus" } if {([expr $stutzenpos+$stutzenrm] > $conuslength ) && ([expr

Page 10: ICEM - .tcl-script For Column With Nozzle

Lastupdate:2020/02/1618:50

guide:icem_.tcl-script_for_column_with_nozzle https://wikis.ovgu.de/lss/doku.php?id=guide:icem_.tcl-script_for_column_with_nozzle

https://wikis.ovgu.de/lss/ Printed on 2022/02/15 05:32

$stutzenpos-$stutzenrm] < $conuslength)} { set levellst "conus cyl" }

# Rearranging surface normals, to simplify Trim loop for {set i 1} {$i < 5} {incr i} { ic_modify reverse surface s.c.conus.$i # ic_modify reverse surface s.c.cyl.$i } # Trim loop, cut Stutzen crossection from WALL foreach level $levellst { ic_geo_duplicate_set_fam_and_data curve c.wall.stutzc.wall.stutz.$level.1 ic_geo_trim_surface s.c.$level.4 c.wall.stutz.$level.1 0 ic_delete_geometry surface names "s.c.$level.4.cut.0" 0 0 } #Helper Points for Blocking in Pipe for {set i 1} {$i < 5} {incr i} { ic_point {} CNSTR p.stutz.outlet.$ip.stutz.outlet.center+vector(0,[r $stutzenrm y $i],[r $stutzenrm z $i]) ic_point {} CNSTR p.stutz.outlet.bl.$ip.stutz.outlet.center+vector(0,[r [expr $stutzenrm*(1.-$blthStutz)] y$i],[r [expr $stutzenrm*(1-$blthStutz)] z $i]) ic_move_geometry point names "p.stutz.outlet.$ip.stutz.outlet.bl.$i" rotate 45 rotate_axis {1 0 0} centp.stutz.outlet.center } #Helper Points Layer Three of Pipe for {set i 1} {$i < 5} {incr i} { ic_geo_duplicate_set_fam_and_data point p.stutz.outlet.$ip.stutz.outlet.L3.$i {} _0 ic_geo_set_part point p.stutz.outlet.L3.$i CNSTR 0 ic_move_geometry point names "p.stutz.outlet.L3.$i" scale "1$stutzSurroundTh $stutzSurroundTh" cent p.stutz.outlet.center } # Project CNSTR help to WALL log "Some usual warnings on creating intersections coming in...ignore these" for {set i 1} {$i < 5} {incr i} { ## Prepare moving points, all Three layers at Stutzen outlet ic_geo_duplicate_set_fam_and_data point p.stutz.outlet.$ip.stutz.outlet.help.$i {} _0 ic_geo_duplicate_set_fam_and_data point p.stutz.outlet.bl.$i

Page 11: ICEM - .tcl-script For Column With Nozzle

2022/02/15 05:32 9/25 ICEM - .tcl-script For Column With Nozzle

LSS Wiki - https://wikis.ovgu.de/lss/

p.stutz.outlet.bl.help.$i {} _0 ic_geo_duplicate_set_fam_and_data point p.stutz.outlet.L3.$ip.stutz.outlet.L3.help.$i {} _0 ## Copy points to other side ic_move_geometry point names p.stutz.outlet.help.$i mirror {1 00} cent {0 0 0} ic_move_geometry point names p.stutz.outlet.bl.help.$i mirror{1 0 0} cent {0 0 0} ic_move_geometry point names p.stutz.outlet.L3.help.$i mirror{1 0 0} cent {0 0 0} ## Move new points to right Constructor part ic_geo_set_part point p.stutz.outlet.help.$i CNSTR 0 ic_geo_set_part point p.stutz.outlet.bl.help.$i CNSTR 0 ic_geo_set_part point p.stutz.outlet.L3.help.$i CNSTR 0 ## Connect points to curve, needed for surface/curveintersection ic_curve point CNSTR c.p.stutz.outlet.help.$i"p.stutz.outlet.$i p.stutz.outlet.help.$i" ic_curve point CNSTR c.p.stutz.outlet.bl.help.$i"p.stutz.outlet.bl.$i p.stutz.outlet.bl.help.$i" ic_curve point CNSTR c.p.stutz.outlet.L3.help.$i"p.stutz.outlet.L3.$i p.stutz.outlet.L3.help.$i" ## Intersect helper curves with surfaces foreach level $levellst { ic_point intersect CNSTR p.wall.stutz.mirror.$i"c.p.stutz.outlet.help.$i s.c.$level.2 how" ic_point intersect CNSTR p.wall.stutz.mirror.WBL.$i"c.p.stutz.outlet.help.$i s.c.$level.bl.2 how" ic_point intersect CNSTR p.wall.stutz.bl.mirror.$i"c.p.stutz.outlet.bl.help.$i s.c.$level.2 how" ic_point intersect CNSTR p.wall.stutz.bl.mirror.WBL.$i"c.p.stutz.outlet.bl.help.$i s.c.$level.bl.2 how" ic_point intersect CNSTR p.wall.stutz.L3.mirror.$i"c.p.stutz.outlet.L3.help.$i s.c.$level.2 how" ic_point intersect CNSTR p.wall.stutz.L3.mirror.WBL.$i"c.p.stutz.outlet.L3.help.$i s.c.$level.bl.2 how" } ## Move new points back to Stutzen ic_geo_duplicate_set_fam_and_data point p.wall.stutz.mirror.$ip.wall.stutz.$i {} _0 ic_geo_duplicate_set_fam_and_data pointp.wall.stutz.mirror.WBL.$i p.wall.stutz.WBL.$i {} _0 ic_geo_duplicate_set_fam_and_data pointp.wall.stutz.bl.mirror.$i p.wall.stutz.bl.$i {} _0 ic_geo_duplicate_set_fam_and_data pointp.wall.stutz.bl.mirror.WBL.$i p.wall.stutz.bl.WBL.$i {} _0 ic_geo_duplicate_set_fam_and_data pointp.wall.stutz.L3.mirror.$i p.wall.stutz.L3.$i {} _0

Page 12: ICEM - .tcl-script For Column With Nozzle

Lastupdate:2020/02/1618:50

guide:icem_.tcl-script_for_column_with_nozzle https://wikis.ovgu.de/lss/doku.php?id=guide:icem_.tcl-script_for_column_with_nozzle

https://wikis.ovgu.de/lss/ Printed on 2022/02/15 05:32

ic_geo_duplicate_set_fam_and_data pointp.wall.stutz.L3.mirror.WBL.$i p.wall.stutz.L3.WBL.$i {} _0 ic_move_geometry point names "p.wall.stutz.$i" mirror {1 0 0}cent {0 0 0} ic_move_geometry point names "p.wall.stutz.WBL.$i" mirror {1 00} cent {0 0 0} ic_move_geometry point names "p.wall.stutz.bl.$i" mirror {1 00} cent {0 0 0} ic_move_geometry point names "p.wall.stutz.bl.WBL.$i" mirror {10 0} cent {0 0 0} ic_move_geometry point names "p.wall.stutz.L3.$i" mirror {1 00} cent {0 0 0} ic_move_geometry point names "p.wall.stutz.L3.WBL.$i" mirror {10 0} cent {0 0 0} } # ----------------------------------------------- log "Sectioning Geometry" # ----------------------------------------------- # Get local coordinates of points on WALL surfaces set uvUpperListCyl [ic_geo_find_nearest_srf_pnt s.c.cyl.4p.wall.stutz.L3.1] set uvLowerListCyl [ic_geo_find_nearest_srf_pnt s.c.cyl.4p.wall.stutz.L3.4] set uvUpperListConus [ic_geo_find_nearest_srf_pnt s.c.conus.4p.wall.stutz.L3.1] set uvLowerListConus [ic_geo_find_nearest_srf_pnt s.c.conus.4p.wall.stutz.L3.4] # log "$uvUpperListCyl" # log "$uvLowerListCyl" # log "$uvUpperListConus" # log "$uvLowerListConus" set onCylSurfaceUpperBool 1 set onCylSurfaceLowerBool 1 set onConusSurfaceUpperBool 1 set onConusSurfaceLowerBool 1 # Testing whether the local coordinate is on an edge foreach val $uvUpperListCyl { if {$val == 1} {set onCylSurfaceUpperBool 0} } foreach val $uvLowerListCyl { if {$val == 1} {set onCylSurfaceLowerBool 0} } foreach val $uvUpperListConus { if {$val == 1} {set onConusSurfaceUpperBool 0}

Page 13: ICEM - .tcl-script For Column With Nozzle

2022/02/15 05:32 11/25 ICEM - .tcl-script For Column With Nozzle

LSS Wiki - https://wikis.ovgu.de/lss/

} foreach val $uvLowerListConus { if {$val == 1} {set onConusSurfaceLowerBool 0} } # log "onCylSurfaceUpperBool: $onCylSurfaceUpperBool" # log "onCylSurfaceLowerBool: $onCylSurfaceLowerBool" # log "onConusSurfaceUpperBool: $onConusSurfaceUpperBool" # log "onConusSurfaceLowerBool: $onConusSurfaceLowerBool" # if {$onCylSurfaceUpperBool} { for {set i 1} {$i < 5} {incr i} { ic_geo_cre_crv_iso_crv CNSTR c.L3.upper.$i s.c.cyl.$i[lindex $uvUpperListCyl 0] 0 0 1 ic_geo_cre_crv_iso_crv CNSTR c.L3.upper.bl.$i s.c.cyl.bl.$i[lindex $uvUpperListCyl 0] 0 0 1 } } if {$onCylSurfaceLowerBool} { for {set i 1} {$i < 5} {incr i} { ic_geo_cre_crv_iso_crv CNSTR c.L3.lower.$i s.c.cyl.$i[lindex $uvLowerListCyl 0] 0 0 1 ic_geo_cre_crv_iso_crv CNSTR c.L3.lower.bl.$i s.c.cyl.bl.$i[lindex $uvLowerListCyl 0] 0 0 1 } } # if {$onConusSurfaceUpperBool} { for {set i 1} {$i < 5} {incr i} { ic_geo_cre_crv_iso_crv CNSTR c.L3.upper.$i s.c.conus.$i[lindex $uvUpperListConus 1] 1 0 1 ic_geo_cre_crv_iso_crv CNSTR c.L3.upper.bl.$is.c.conus.bl.$i [lindex $uvUpperListConus 1] 0 0 1 } } # if {$onConusSurfaceLowerBool} { for {set i 1} {$i < 5} {incr i} { ic_geo_cre_crv_iso_crv CNSTR c.L3.lower.$i s.c.conus.$i[lindex $uvLowerListConus 1] 1 0 1 ic_geo_cre_crv_iso_crv CNSTR c.L3.lower.bl.$is.c.conus.bl.$i [lindex $uvLowerListConus 1] 0 0 1 } } ## Catch unusual excemptions, when one edge is in the bend if {!$onConusSurfaceUpperBool && !$onConusSurfaceLowerBool &&!$onCylSurfaceLowerBool} { for {set i 1} {$i < 5} {incr i} { ic_geo_duplicate_set_fam_and_data curve c.L3.lower.$ic.p.conus.oben.$i {} _0 ic_geo_duplicate_set_fam_and_data curve c.L3.lower.bl.$i

Page 14: ICEM - .tcl-script For Column With Nozzle

Lastupdate:2020/02/1618:50

guide:icem_.tcl-script_for_column_with_nozzle https://wikis.ovgu.de/lss/doku.php?id=guide:icem_.tcl-script_for_column_with_nozzle

https://wikis.ovgu.de/lss/ Printed on 2022/02/15 05:32

c.p.conus.oben.bl.$i {} _0 ic_geo_set_part curve c.L3.lower.$i CNSTR 0 ic_geo_set_part curve c.L3.lower.bl.$i CNSTR 0 } } if {!$onConusSurfaceUpperBool && !$onCylSurfaceUpperBool &&!$onCylSurfaceLowerBool} { for {set i 1} {$i < 5} {incr i} { ic_geo_duplicate_set_fam_and_data curve c.L3.upper.$ic.p.conus.oben.$i {} _0 ic_geo_duplicate_set_fam_and_data curve c.L3.upper.bl.$ic.p.conus.oben.bl.$i {} _0 ic_geo_set_part curve c.L3.upper.$i CNSTR 0 ic_geo_set_part curve c.L3.upper.bl.$i CNSTR 0 } } if {!$onCylSurfaceLowerBool && !$onCylSurfaceUpperBool &&!$onCylSurfaceLowerBool} { for {set i 1} {$i < 5} {incr i} { ic_geo_duplicate_set_fam_and_data curve c.L3.lower.$ic.p.conus.unten.$i {} _0 ic_geo_duplicate_set_fam_and_data curve c.L3.lower.bl.$ic.p.conus.unten.bl.$i {} _0 ic_geo_set_part curve c.L3.lower.$i CNSTR 0 ic_geo_set_part curve c.L3.lower.bl.$i CNSTR 0 } } # Project points to new helper curves for {set i 1} {$i < 5} {incr i} { ic_point projcurv CNSTR p.L3.upper.$i "p.conus.oben.$ic.L3.upper.$i" ic_point projcurv CNSTR p.L3.lower.$i "p.conus.oben.$ic.L3.lower.$i" ic_point projcurv CNSTR p.L3.upper.bl.$i "p.conus.oben.bl.$ic.L3.upper.bl.$i" ic_point projcurv CNSTR p.L3.lower.bl.$i "p.conus.oben.bl.$ic.L3.lower.bl.$i" } # ----------------------------------------------- log "Creating minor Help Geometry" # ----------------------------------------------- foreach nm {1 2} { ic_point projcurv CNSTR p.outlet.L3proj.bl.WBL.$nm

Page 15: ICEM - .tcl-script For Column With Nozzle

2022/02/15 05:32 13/25 ICEM - .tcl-script For Column With Nozzle

LSS Wiki - https://wikis.ovgu.de/lss/

"p.wall.stutz.L3.WBL.$nm c.p.outlet.bl.4" ic_point projcurv CNSTR p.outlet.L3proj.$nm "p.wall.stutz.L3.$nmc.p.outlet.4" ic_point projcurv CNSTR p.outlet.L3proj.mirror.WBL.$nm"p.wall.stutz.L3.mirror.WBL.$nm c.p.outlet.bl.2" ic_point projcurv CNSTR p.outlet.L3proj.mirror.$nm"p.wall.stutz.L3.mirror.$nm c.p.outlet.2" } foreach nm {3 4} { ic_point projcurv CNSTR p.inlet.L3proj.bl.WBL.$nm"p.wall.stutz.L3.WBL.$nm c.p.inlet.bl.4" ic_point projcurv CNSTR p.inlet.L3proj.$nm "p.wall.stutz.L3.$nmc.p.inlet.4" ic_point projcurv CNSTR p.inlet.L3proj.mirror.WBL.$nm"p.wall.stutz.L3.mirror.WBL.$nm c.p.inlet.bl.2" ic_point projcurv CNSTR p.inlet.L3proj.mirror.$nm"p.wall.stutz.L3.mirror.$nm c.p.inlet.2" } foreach nm {3 4} { ic_point projcurv CNSTR p.conus.unten.L3proj.bl.WBL.$nm"p.wall.stutz.L3.WBL.$nm c.p.conus.unten.bl.4" ic_point projcurv CNSTR p.conus.unten.L3proj.$nm"p.wall.stutz.L3.$nm c.p.conus.unten.4" ic_point projcurv CNSTR p.conus.unten.L3proj.mirror.WBL.$nm"p.wall.stutz.L3.mirror.WBL.$nm c.p.conus.unten.bl.2" ic_point projcurv CNSTR p.conus.unten.L3proj.mirror.$nm"p.wall.stutz.L3.mirror.$nm c.p.conus.unten.2" } # ----------------------------------------------- log "Geometry creation completed" # -----------------------------------------------

################################################################################log "Start Blocking"################################################################################

# Inits (not all needed, some untested) ic_geo_new_family FLUID ic_hex_initialize_blocking {} FLUID 0 101 ic_hex_switch_blocking root ic_hex_unblank_blocks ic_hex_multi_grid_level 0 ic_hex_projection_limit 0 ic_hex_default_bunching_law default 1.2

Page 16: ICEM - .tcl-script For Column With Nozzle

Lastupdate:2020/02/1618:50

guide:icem_.tcl-script_for_column_with_nozzle https://wikis.ovgu.de/lss/doku.php?id=guide:icem_.tcl-script_for_column_with_nozzle

https://wikis.ovgu.de/lss/ Printed on 2022/02/15 05:32

ic_hex_floating_grid off ic_hex_transfinite_degree 1 ic_hex_set_mesh_params CNSTR WALL INLET OUTLET STUTZOUTLETSTUTZWALL FLUID -version 110 ic_hex_error_messages off_minor ic_hex_switch_blocking root # Basic Ogrid ic_hex_mark_blocks unmark ic_hex_mark_blocks face_neighbors corners { 22 38 26 42 } { 21 3725 41 } ic_hex_ogrid 1 m CNSTR WALL INLET OUTLET STUTZOUTLET STUTZWALLFLUID -version 50 ic_hex_mark_blocks unmark

# Level cuts #ic_hex_split_grid 69 70 0.745332 m CNSTR WALL INLET OUTLETSTUTZOUTLET STUTZWALL FLUID #ic_hex_split_grid 69 92 0.808214 m CNSTR WALL INLET OUTLETSTUTZOUTLET STUTZWALL FLUID ## Collecting vertex numbers in lists, levelwise, in loops ## ## _______ Outlet ## | | ## |_____| ## \ / ## \_/ Conus ## | | ## |_| Inlet set vrtInletWall {37 21 25 41} set vrtInletBL {73 65 69 77} set vrtOutletWall {38 22 26 42} set vrtOutletBL {74 66 70 78} ## Associating basic Vertices and edges set vrtWL $vrtInletWall set vrtBL $vrtInletBL for {set i 0} {$i < 4} {incr i} { ic_hex_move_node [lindex $vrtWL $i] p.inlet.[expr $i+1] ic_hex_set_edge_projection [lindex $vrtWL $i] [lindex $vrtWL

Page 17: ICEM - .tcl-script For Column With Nozzle

2022/02/15 05:32 15/25 ICEM - .tcl-script For Column With Nozzle

LSS Wiki - https://wikis.ovgu.de/lss/

$llp($i)] 0 1 c.p.inlet.[expr $i+1] ic_hex_move_node [lindex $vrtBL $i] p.inlet.bl.[expr $i+1] } set vrtWL $vrtOutletWall set vrtBL $vrtOutletBL for {set i 0} {$i < 4} {incr i} { ic_hex_move_node [lindex $vrtWL $i] p.outlet.[expr $i+1] ic_hex_set_edge_projection [lindex $vrtWL $i] [lindex $vrtWL$llp($i)] 0 1 c.p.outlet.[expr $i+1] ic_hex_move_node [lindex $vrtBL $i] p.outlet.bl.[expr $i+1] } for {set i 1} {$i < 5} {incr i} { ic_hex_create_composite "c.cyl.$i c.conus.$i c.inlet.wall.$i" ic_hex_set_edge_projection [lindex $vrtInletWall [expr $i-1]][lindex $vrtOutletWall [expr $i-1]] 0 1 c.cyl.$i ic_hex_create_composite "c.cyl.bl.$i c.conus.bl.$ic.inlet.wall.bl.$i" ic_hex_set_edge_projection [lindex $vrtInletBL [expr $i-1]][lindex $vrtOutletBL [expr $i-1]] 0 1 c.cyl.bl.$i } ## Early on face to WALL associations ## Saves effort later ic_hex_project_face node_numbers { 21 22 37 38 } { 37 41 38 42 } {25 26 41 42 } { 21 25 22 26 } WALL

# ----------------------------------------------- log "Preparing Stutzen-Blocking" # -----------------------------------------------

# Cutting out Levels for Stutzen ic_hex_split_grid 25 26 0.75 m CNSTR WALL INLET OUTLET STUTZOUTLETSTUTZWALL FLUID ic_hex_split_grid 25 91 0.95 m CNSTR WALL INLET OUTLET STUTZOUTLETSTUTZWALL FLUID ## Pre Associating new cuts set vrt {87 85 91 93} for {set i 0} {$i < 4} {incr i} { ic_hex_move_node [lindex $vrt $i] p.L3.upper.[expr $i+1] ic_hex_set_edge_projection [lindex $vrt $i] [lindex $vrt$llp($i)] 0 1 c.L3.upper.[expr $i+1] }

Page 18: ICEM - .tcl-script For Column With Nozzle

Lastupdate:2020/02/1618:50

guide:icem_.tcl-script_for_column_with_nozzle https://wikis.ovgu.de/lss/doku.php?id=guide:icem_.tcl-script_for_column_with_nozzle

https://wikis.ovgu.de/lss/ Printed on 2022/02/15 05:32

set vrt {107 105 111 113} for {set i 0} {$i < 4} {incr i} { ic_hex_move_node [lindex $vrt $i] p.L3.lower.[expr $i+1] ic_hex_set_edge_projection [lindex $vrt $i] [lindex $vrt$llp($i)] 0 1 c.L3.lower.[expr $i+1] } # Cutting out Section for Stutzen ic_hex_split_grid 85 91 0.6 m CNSTR WALL INLET OUTLET STUTZOUTLETSTUTZWALL FLUID ic_hex_split_grid 87 141 0.6 m CNSTR WALL INLET OUTLET STUTZOUTLETSTUTZWALL FLUID # Extruding Stutzen ic_hex_extrude_faces 1 { 135 141 171 177 } FLUID 135.681 -nsub 1 -type original FLUID INLET WALL OUTLET CNSTR STUTZWALL STUTZOUTLET -version 50

# Ogrid around Stutzen ic_hex_mark_blocks unmark ic_hex_mark_blocks face_neighbors corners { 192 193 194 195 } { 133139 169 175 } ic_hex_mark_blocks superblock 61 ic_hex_mark_blocks superblock 62 ic_hex_mark_blocks superblock 63 ic_hex_ogrid 1 m CNSTR WALL INLET OUTLET STUTZOUTLET STUTZWALLFLUID -version 50 # Ogrid inside Stutzen ic_hex_mark_blocks unmark ic_hex_mark_blocks face_neighbors corners { 266 270 274 278 } { 252255 258 261 } ic_hex_mark_blocks superblock 61 ic_hex_mark_blocks superblock 62 ic_hex_mark_blocks superblock 63 ic_hex_ogrid 1 m CNSTR WALL INLET OUTLET STUTZOUTLET STUTZWALLFLUID -version 50 ic_hex_mark_blocks unmark

# Removing Shell Layer, which is outside the volume ic_hex_delete_blocks numbers 143 145 146 144 # ----------------------------------------------- log "Moving Vertices to their place" # -----------------------------------------------

Page 19: ICEM - .tcl-script For Column With Nozzle

2022/02/15 05:32 17/25 ICEM - .tcl-script For Column With Nozzle

LSS Wiki - https://wikis.ovgu.de/lss/

## Collecting vertex numbers in lists, levelwise, in loops ## _____________ ## | | | | 1 StutzOutlet ## | | | | 2 StutzIntersect ## \=\=====/=/ ========| 3 StutzIntersectWBL ## 5\4\___/3/ 2 1 4 StutzMirrorWBL ## | | | | 5 StutzMirror ## |_|___|_| ## Ogrid layers (3) (Star marks starting point of counting,righthandrule around +X axis) ## _______3________* ## |\ /| ## | \_____2______/ | ## | |\____1_____/| | ## | || || | ## ## set vrtStutzOutlet_1 {298 306 302 294} set vrtStutzOutlet_2 {270 278 274 266} set vrtStutzIntersect_1 {296 304 300 292} set vrtStutzIntersect_2 {268 276 272 264} set vrtStutzIntersect_3 {177 141 135 171} set vrtStutzIntersectWBL_1 {297 305 301 293} set vrtStutzIntersectWBL_2 {269 277 273 265} set vrtStutzIntersectWBL_3 {178 142 136 172} set vrtStutzMirrorWBL_1 {284 290 287 281} set vrtStutzMirrorWBL_2 {256 262 259 253} set vrtStutzMirrorWBL_3 {176 140 134 170} set vrtStutzMirror_1 {283 289 286 280} set vrtStutzMirror_2 {255 261 258 252} set vrtStutzMirror_3 {175 139 133 169} # Associating to Stutzenoutlet set vrtWL $vrtStutzOutlet_2 set vrtBL $vrtStutzOutlet_1 for {set i 0} {$i < 4} {incr i} { ic_hex_move_node [lindex $vrtWL $i] p.stutz.outlet.[expr $i+1] ic_hex_set_edge_projection [lindex $vrtWL $i] [lindex $vrtWL$llp($i)] 0 1 c.stutz.outlet ic_hex_move_node [lindex $vrtBL $i] p.stutz.outlet.bl.[expr$i+1]

Page 20: ICEM - .tcl-script For Column With Nozzle

Lastupdate:2020/02/1618:50

guide:icem_.tcl-script_for_column_with_nozzle https://wikis.ovgu.de/lss/doku.php?id=guide:icem_.tcl-script_for_column_with_nozzle

https://wikis.ovgu.de/lss/ Printed on 2022/02/15 05:32

} set vrtSL $vrtStutzIntersect_3 set vrtWL $vrtStutzIntersect_2 set vrtBL $vrtStutzIntersect_1 for {set i 0} {$i < 4} {incr i} { ic_hex_move_node [lindex $vrtWL $i] p.wall.stutz.[expr $i+1] ic_hex_move_node [lindex $vrtBL $i] p.wall.stutz.bl.[expr $i+1] ic_hex_move_node [lindex $vrtSL $i] p.wall.stutz.L3.[expr $i+1] } set vrtSL $vrtStutzIntersectWBL_3 set vrtWL $vrtStutzIntersectWBL_2 set vrtBL $vrtStutzIntersectWBL_1 for {set i 0} {$i < 4} {incr i} { ic_hex_move_node [lindex $vrtWL $i] p.wall.stutz.WBL.[expr$i+1] ic_hex_move_node [lindex $vrtBL $i] p.wall.stutz.bl.WBL.[expr$i+1] ic_hex_move_node [lindex $vrtSL $i] p.wall.stutz.L3.WBL.[expr$i+1] } set vrtSL $vrtStutzMirrorWBL_3 set vrtWL $vrtStutzMirrorWBL_2 set vrtBL $vrtStutzMirrorWBL_1 for {set i 0} {$i < 4} {incr i} { ic_hex_move_node [lindex $vrtWL $i]p.wall.stutz.mirror.WBL.[expr $i+1] ic_hex_move_node [lindex $vrtBL $i]p.wall.stutz.bl.mirror.WBL.[expr $i+1] ic_hex_move_node [lindex $vrtSL $i]p.wall.stutz.L3.mirror.WBL.[expr $i+1] } set vrtSL $vrtStutzMirror_3 set vrtWL $vrtStutzMirror_2 set vrtBL $vrtStutzMirror_1 for {set i 0} {$i < 4} {incr i} { ic_hex_move_node [lindex $vrtWL $i] p.wall.stutz.mirror.[expr$i+1] ic_hex_move_node [lindex $vrtBL $i]p.wall.stutz.bl.mirror.[expr $i+1] ic_hex_move_node [lindex $vrtSL $i]p.wall.stutz.L3.mirror.[expr $i+1] } set vrtWL $vrtStutzIntersect_2 set vrtBL $vrtStutzIntersect_1

Page 21: ICEM - .tcl-script For Column With Nozzle

2022/02/15 05:32 19/25 ICEM - .tcl-script For Column With Nozzle

LSS Wiki - https://wikis.ovgu.de/lss/

for {set i 0} {$i < 4} {incr i} { ic_hex_set_edge_projection [lindex $vrtBL $i] [lindex $vrtBL$llp($i)] 0 3 0 ic_hex_set_edge_projection [lindex $vrtWL $i] [lindex $vrtBL$i] 0 3 0 ic_hex_set_edge_projection [lindex $vrtWL $i] [lindex $vrtWL$llp($i)] 0 1 c.wall.stutz } ## WBL ogrid setting on Layer 3 Cuts set vrt {88 86 92 94} for {set i 0} {$i < 4} {incr i} { ic_hex_move_node [lindex $vrt $i] p.L3.upper.bl.[expr $i+1] } set vrt {108 106 112 114} for {set i 0} {$i < 4} {incr i} { ic_hex_move_node [lindex $vrt $i] p.L3.lower.bl.[expr $i+1] } ## Inlet associations ic_hex_move_node 165 p.inlet.L3proj.4 ic_hex_move_node 129 p.inlet.L3proj.3 ic_hex_move_node 127 p.inlet.L3proj.mirror.3 ic_hex_move_node 163 p.inlet.L3proj.mirror.4 ic_hex_move_node 166 p.inlet.L3proj.bl.WBL.4 ic_hex_move_node 130 p.inlet.L3proj.bl.WBL.3 ic_hex_move_node 128 p.inlet.L3proj.mirror.WBL.3 ic_hex_move_node 164 p.inlet.L3proj.mirror.WBL.4 ## Outlet associations ic_hex_move_node 183 p.outlet.L3proj.1 ic_hex_move_node 147 p.outlet.L3proj.2 ic_hex_move_node 145 p.outlet.L3proj.mirror.2 ic_hex_move_node 181 p.outlet.L3proj.mirror.1 ic_hex_move_node 184 p.outlet.L3proj.bl.WBL.1 ic_hex_move_node 148 p.outlet.L3proj.bl.WBL.2 ic_hex_move_node 146 p.outlet.L3proj.mirror.WBL.2 ic_hex_move_node 182 p.outlet.L3proj.mirror.WBL.1 # ----------------------------------------------- log "Creating some left over associations and fixes" # ----------------------------------------------- ## Correcting Stutzen intersection edges ic_hex_link_shape 264 272 ic_hex_link_shape 268 276 ## Some failed associations in Stutzen layer ic_hex_project_face node_numbers { 85 87 105 107 } { 91 93 111 113} WALL

Page 22: ICEM - .tcl-script For Column With Nozzle

Lastupdate:2020/02/1618:50

guide:icem_.tcl-script_for_column_with_nozzle https://wikis.ovgu.de/lss/doku.php?id=guide:icem_.tcl-script_for_column_with_nozzle

https://wikis.ovgu.de/lss/ Printed on 2022/02/15 05:32

## Fix for stutz.mirror side faces on WALL ic_hex_project_face node_numbers { 252 255 280 283 } { 252 280 258286 } { 258 261 286 289 } { 255 283 261 289 } { 280 283 286 289 } { 139261 175 255 } { 169 175 252 255 } { 133 258 169 252 } { 133 139 258 261} WALL

## Fix Stutzen intersection layer ic_hex_unproject_face node_numbers { 268 296 276 304 } ic_hex_unproject_face node_numbers { 272 276 300 304 } ic_hex_unproject_face node_numbers { 292 296 300 304 } ic_hex_unproject_face node_numbers { 264 268 292 296 } ic_hex_unproject_face node_numbers { 264 292 272 300 } ## Fixing Stutzen outlet faces ic_hex_project_face node_numbers { 294 298 302 306 } { 266 270 294298 } { 270 298 278 306 } { 274 278 302 306 } { 266 294 274 302 }STUTZOUTLET # Tangential Stutzen Wall Intersection, set back to "proj to surf" ic_hex_set_edge_projection 177 141 0 2 0 ic_hex_set_edge_projection 171 135 0 2 0 # ----------------------------------------------- log "Creating cut in inlet/cone bend, if possible." # ----------------------------------------------- # Checking distance between Stutzen(L3) and bend set heightdiff [expr [pcrd p.L3.lower.1 2] - [pcrd p.conus.unten.12]] # log "$heightdiff" if {$heightdiff > 5.} { ## bendcut holds boolean information whether cut was done ornot set bendCutBool 1 ic_hex_split_grid 37 107 p.conus.unten.1 m CNSTR WALL INLETOUTLET STUTZOUTLET STUTZWALL FLUID # associate outer bend edges set complist "" for {set i 1} {$i < 5} {incr i} { lappend complist "c.p.conus.unten.$i" } ic_hex_create_composite $complist set vrt {379 376 382 388 394 397 391 385} set vrtlength [llength $vrt] lappend vrt [lindex $vrt 0] for {set i 0} {$i < $vrtlength} {incr i} {

Page 23: ICEM - .tcl-script For Column With Nozzle

2022/02/15 05:32 21/25 ICEM - .tcl-script For Column With Nozzle

LSS Wiki - https://wikis.ovgu.de/lss/

ic_hex_set_edge_projection [lindex $vrt $i] [lindex $vrt[expr $i+1]] 0 1 c.p.conus.unten.1 } ## Moving vertices in bend to corresponding points ic_hex_move_node 385 p.conus.unten.L3proj.4 ic_hex_move_node 391 p.conus.unten.L3proj.3 ic_hex_move_node 388 p.conus.unten.L3proj.mirror.3 ic_hex_move_node 382 p.conus.unten.L3proj.mirror.4 ic_hex_move_node 386 p.conus.unten.L3proj.bl.WBL.4 ic_hex_move_node 392 p.conus.unten.L3proj.bl.WBL.3 ic_hex_move_node 389 p.conus.unten.L3proj.mirror.WBL.3 ic_hex_move_node 383 p.conus.unten.L3proj.mirror.WBL.4 set vrtWL {379 376 394 397} set vrtBL {380 377 395 398} for {set i 0} {$i < 4} {incr i} { ic_hex_move_node [lindex $vrtWL $i] p.conus.unten.[expr$i+1] ic_hex_move_node [lindex $vrtBL $i] p.conus.unten.bl.[expr$i+1] } } else { set bendCutBool 0 log "Warning, Stutzen might be too close to bend" } # ----------------------------------------------- log "Blocking completed" # ----------------------------------------------- ################################################################################log "Mesh settings"################################################################################

## Automatic mesh settings ic_hex_compute_mesh_size WALL INLET OUTLET STUTZOUTLET STUTZWALLFLUID ## Inlet length and conus left below stutzen if {$bendCutBool} { # inlet ic_hex_set_mesh 37 379 n [ceil [expr $inllgh*$ninllgh]] h1rel0.0 h2rel linked 379 107 r1 1.2 r2 1.2 lmax 0 default copy_to_parallelunlocked #conus ic_hex_set_mesh 379 107 n [ceil [expr $heightdiff*$nconlow]]h1rel 0.0 h2rel linked 107 87 r1 1.2 r2 1.2 lmax 0 defaultcopy_to_parallel unlocked

Page 24: ICEM - .tcl-script For Column With Nozzle

Lastupdate:2020/02/1618:50

guide:icem_.tcl-script_for_column_with_nozzle https://wikis.ovgu.de/lss/doku.php?id=guide:icem_.tcl-script_for_column_with_nozzle

https://wikis.ovgu.de/lss/ Printed on 2022/02/15 05:32

} else { # just inlet ic_hex_set_mesh 37 107 n [ceil [expr$inllgh*($ninllgh+$nconlow)/2.0]] h1rel 0.0 h2rel linked 107 87 r1 1.2r2 1.2 lmax 0 default copy_to_parallel unlocked } ## Cylinder length ic_hex_set_mesh 87 38 n [ceil [expr $cyllength*$ncyllength]] h1rellinked 87 107 h2rel 0.0 r1 1.2 r2 1.2 lmax 0 default copy_to_parallelunlocked ## tangential mesh without obstructions of stutzen ic_hex_set_mesh 38 22 n $ntangential h1rel 0.0 h2rel 0.0 r1 1.2 r21.2 lmax 0 default copy_to_parallel unlocked ## tangential mesh at side of stutzen blocks ic_hex_set_mesh 87 177 n [ceil [expr $ntangential / 3.0]] h1rel 0.0h2rel 0.0 r1 1.2 r2 1.2 lmax 0 default copy_to_parallel unlocked ic_hex_set_mesh 93 141 n [ceil [expr $ntangential / 3.0]] h1rel 0.0h2rel 0.0 r1 1.2 r2 1.2 lmax 0 default copy_to_parallel unlocked # boundary layer in main volume ic_hex_set_mesh 38 74 n $nblmain h1rel $nblmainheight h2rel 0.0 r11.2 r2 1.2 lmax 0 default copy_to_parallel unlocked

# ----------------------------------------------- # boundary layer in Stutzen foreach vrtWL $vrtStutzOutlet_2 vrtBL $vrtStutzOutlet_1 { # ic_hex_set_mesh $vrtWL $vrtBL n $nblstutz h1rel$nblstutzheight h2rel 0.0 r1 1.2 r2 1.2 lmax 0 default unlocked } foreach vrtWL $vrtStutzIntersect_2 vrtBL $vrtStutzIntersect_1 { # ic_hex_set_mesh $vrtWL $vrtBL n $nblstutz h1rel$nblstutzheight h2rel 0.0 r1 1.2 r2 1.2 lmax 0 default unlocked } ic_hex_set_mesh 268 296 n $nblstutz h1rel $nblstutzheight h2rel 0.0r1 1.2 r2 1.2 lmax 0 default copy_to_parallel unlocked # boundary layer around Stutzen foreach vrtWL $vrtStutzIntersect_3 vrtBL $vrtStutzIntersect_2 { # ic_hex_set_mesh $vrtWL $vrtBL n $nblstutzaround h1rel 0.0h2rel linked 268 296 r1 1.2 r2 1.2 lmax 0 default unlocked } ic_hex_set_mesh 177 268 n $nblstutzaround h1rel 0.0 h2rel linked268 296 r1 1.2 r2 1.2 lmax 0 default copy_to_parallel unlocked

Page 25: ICEM - .tcl-script For Column With Nozzle

2022/02/15 05:32 23/25 ICEM - .tcl-script For Column With Nozzle

LSS Wiki - https://wikis.ovgu.de/lss/

# Stutzen length ic_hex_set_mesh 268 270 n [ceil [expr $stutzenrm*20.*$nstutzlgh]]h1rel linked 268 269 h2rel 0.0 r1 1.2 r2 1.2 lmax 0 defaultcopy_to_parallel unlocked

# Stutzen tangential ic_hex_set_mesh 270 278 n $nstutztang h1rel 0.0 h2rel 0 r1 1.2 r21.2 lmax 0 default copy_to_parallel unlocked ic_hex_set_mesh 270 266 n $nstutztang h1rel 0.0 h2rel 0 r1 1.2 r21.2 lmax 0 default copy_to_parallel unlocked # -----------------------------------------------log "Final mesh scaling"# -----------------------------------------------ic_hex_scale_mesh_size $nglob# -----------------------------------------------log "Meshing complete"# -----------------------------------------------################################################################################## log "Try Mesh Smoothing"################################################################################### if {$debug == 0} {# set determinante [split [ic_hex_rh 20 FLUID proj 2 minval 0 -typedeterminant_27 maxval 1 new_format] " "]# set skewness [split [ic_hex_rh 20 FLUID proj 2 minval 0 -typeeriksson maxval 1 new_format] " "]# log "Worst Determinant: [lindex $determinante 0]"# log "Worst Skewness: [lindex $skewness 0]"## # Try Smoothing## ic_hex_smooth 5 WALL INLET OUTLET STUTZOUTLET STUTZWALL FLUIDelliptic iter_srf 15 iter_vol 5 exp_srf 0.0 exp_vol 0.0 niter_post 3limit_post 0.2 smooth_type 202 nfix_layers -1 rebunch_edges 0treat_unstruct 2 stabilize_srf 1.0 stabilize_vol 2.0 ortho_distance_srf1 ortho_distance_vol 0 surface_fitting 1 keep_per_geom 1## # Smoothing succeded?# set determinante [split [ic_hex_rh 20 FLUID proj 2 minval 0 -typedeterminant_27 maxval 1 new_format] " "]# set skewness [split [ic_hex_rh 20 FLUID proj 2 minval 0 -type

Page 26: ICEM - .tcl-script For Column With Nozzle

Lastupdate:2020/02/1618:50

guide:icem_.tcl-script_for_column_with_nozzle https://wikis.ovgu.de/lss/doku.php?id=guide:icem_.tcl-script_for_column_with_nozzle

https://wikis.ovgu.de/lss/ Printed on 2022/02/15 05:32

eriksson maxval 1 new_format] " "]# if {[lindex $determinante 0]<0.4} {# ic_hex_create_mesh WALL INLET OUTLET STUTZOUTLET STUTZWALLFLUID proj 2 dim_to_mesh 3 nproc 4# log "No smoothing applied. Determinante too low, [lindex$determinante 0]"# } else {# log "After Smoothing Worst Determinant: [lindex $determinante0]"# if {[lindex $skewness 0]<0.3} {# ic_hex_create_mesh WALL INLET OUTLET STUTZOUTLETSTUTZWALL FLUID proj 2 dim_to_mesh 3 nproc 4# log "No smoothing applied. Skewness not good enough,[lindex $skewness 0]"# } else {# log "After Smooting Worst Skewness: [lindex $skewness0]"# }# }# }# # debug encasing if {$debug == 0} {################################################################################log "Export Final Mesh"################################################################################ # Boundary Conditions ic_boco_solver Fluent_V6 ic_solution_set_solver Fluent_V6 1 ic_boco_solver {ANSYS Fluent} ic_solver_mesh_info {ANSYS Fluent} ic_boco_set WALL { { 1 {WALL} 0 } } ic_boco_set STUTZWALL { { 1 {WALL} 0 } } ic_boco_set INLET { { 1 {VELI} 0 } } ic_boco_set FLUID { { 1 {FLUID} 0 } } ic_boco_set OUTLET { { 1 {PRESO} 0 } } ic_boco_set STUTZOUTLET { { 1 {PRESO} 0 } } ic_boco_save $outputfile.fbc ic_boco_save_atr $outputfile.atr #Convert Final to Unstruct cmd_rm "hex.uns" ic_hex_write_file hex.uns WALL INLET OUTLET STUTZOUTLET STUTZWALLFLUID proj 2 dim_to_mesh 3 -family_boco $outputfile.fbc log "Export Command: $icemenv/icemcfd/output-interfaces/fluent6 -

Page 27: ICEM - .tcl-script For Column With Nozzle

2022/02/15 05:32 25/25 ICEM - .tcl-script For Column With Nozzle

LSS Wiki - https://wikis.ovgu.de/lss/

dom hex.uns -b $outputfile.fbc -scale 0.001,0.001,0.001 -per "typetrans base \{0 0 0\} axis \{0 0 1\} angle 0" $outputfile.msh" ic_exec "$icemenv/icemcfd/output-interfaces/fluent6" -dom hex.uns -b $outputfile.fbc -scale 0.001,0.001,0.001 -per "type trans base \{0 00\} axis \{0 0 1\} angle 0" $outputfile.msh log "Mesh exported to $outputfile.msh"# debug encasing}

From:https://wikis.ovgu.de/lss/ - LSS Wiki

Permanent link:https://wikis.ovgu.de/lss/doku.php?id=guide:icem_.tcl-script_for_column_with_nozzle

Last update: 2020/02/16 18:50