reset # variables #{tw = 0.002} # glass thickness (wall) #{tb = 0.005} # glass thickness (bottom) #{rx = 0.025} # radius (x-direction of elliptical cross section) at upper edge #{ry = rx} #{R = 0.035} # radius at top edge #{h = 0.07} # height create frustum height {h} major radius {rx} minor radius {ry} top {R} create frustum height {h} major radius {rx-tw} minor radius {ry-tw} top {R-tw} move Volume 2 z {0} #subtract body 2 from body 1 webcut volume 1 with sheet extended from surface 4 delete volume 2 webcut volume all with plane zplane offset {-h/2+tb} # imprint & merge for conforming mesh imprint volume all merge volume all # mesh #{he = 0.005} # element size (used vor height division only) volume all size {he} curve all interval 40 # Number of elements around the circumference curve all scheme equal mesh curve all surface 9 13 scheme hole rad_intervals 1 # wall thickness division surface 11 12 19 scheme circle # the horizontal surfaces # select regions block 1 add volume 3 block 1 name "V_water" block 2 add volume 1 4 5 block 2 name "V_glass" # element type and mesh block all element type hex20 mesh volume all nodeset 1 add surface 12 nodeset 1 name "S_surface" nodeset 2 add surface 14 nodeset 2 name "S_glass-water-wall" nodeset 3 add surface 19 nodeset 3 name "S_glass-water-bottom" nodeset 4 add surface 8 11 nodeset 4 name "S_glass-bottom" export ansys cdb "GlassOfWater.cdb" geometry overwrite