CFD Online Discussion Forums

CFD Online Discussion Forums (
-   ANSYS Meshing & Geometry (
-   -   [ICEM] Create part in region ... defined in cylindrical coordinates (

zboud February 24, 2010 09:20

Create part in region ... defined in cylindrical coordinates
Hi all,

I'd like to create a part in a region defined in cylindrical coordinates, let's say:
Min R = 0
Min theta = 0
Min z = 0
Max R = 360
Max theta = 2*pi
Max z = 200

Is it possible to define such a part in ICEM, and if so, how can I do it?


rikio February 24, 2010 09:34

You can create a cylindrical geometry as you defined. But do you mean to generate a cylinder?

zboud February 24, 2010 09:49

Sorry I was not precise enough.

My mesh is already defined, my geometry is created. What I want is to define a region of the mesh(using cylindrical coordinates), put all the elements from that region in a part, so I can use it to define boundary conditions in CFX.

I might have found something though: a loop in my script scanning the concerned cylindrical region and adding the elements to a subset which could be used to create a part. But that's quite heavy for such an easy concept!

rikio February 24, 2010 10:05

Have you tried to create a cylindrical coordinate in CFX, and set the BC?
Maybe I misunderstood your idea: meshes on cylindrical surface would be in the surface part, no need to select manually, or by loop script.

zboud February 24, 2010 10:15

I need a mesh region to define the BC in CFX...

The thing is I have many surfaces, so I can't just select the surface meshes.

And the other thing is that everything has to be automatic in a script, because many similar geometries will be tested.

But the selection script should be quite simple once the bounding boxes are defined.

EDIT: here's the script I wrote in case anyone is interested.

for {set i 0} {$i<$nblayers} {incr i} {\
mess "Ajout de la zone $i...";\
set alpha [expr {$layerangle*2.0*$pi/360.0}];\
set xmin [expr {-($R*(1.0-cos(($i+1.0)*$alpha)))-0.5*$firstR*cos($i*$alpha)}];\
set ymin [expr {$R*sin($i*$alpha)-0.5*$firstR*sin(($i+1.0)*$alpha)}];\
set xmax [expr {-($R*(1.0-cos($i*$alpha)))+0.5*$firstR*cos($i*$alpha)}];\
set ymax [expr {$R*sin(($i+1.0)*$alpha)+0.5*$firstR*sin(($i+1.0)* $alpha)}];\
set zmax [expr {$L*1.5}];\
mess "xmin: $xmin\n";\
mess "xmax: $xmax\n";\
mess "ymin: $ymin\n";\
mess "ymax: $ymax\n";\
mess "zmax: $zmax\n";\
ic_uns_subset_add_region uns_sel_0 "\
$xmin \
$ymin \
-10000" "\
$xmax \
$ymax \
" 0 {1 2 3};\
mess "Zone $i ok!\n";\

All times are GMT -4. The time now is 19:54.