CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens > STAR-CD

Creating an O Grid in Proam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 20, 2012, 08:56
Default Creating an O Grid in Proam
  #1
New Member
 
Nicholas
Join Date: Jul 2009
Posts: 13
Rep Power: 17
en51nm is on a distinguished road
Hi,

I'm trying to automate the creation of what should be a fairly simple mesh. A cylindrical O mesh, wrapped around a Cartesian "square mesh". I believe that ICEM cfd and other meshing programmes have commands for creating these types of meshes, but I can't find one for Star.

Any ideas?
Thanks
en51nm is offline   Reply With Quote

Old   January 20, 2012, 12:45
Default
  #2
Senior Member
 
Pauli
Join Date: Mar 2009
Posts: 189
Rep Power: 17
Pauli is on a distinguished road
Their is no single dedicated command. You need to use several commands. Its been a long time but I think it went like this:

1) Use vc3d to create the square.
2) Use vgen with the cgen option to extrude the nodes along one edge "radially outward".
3) use vmod to set/adjust the outer radius of the newly created cells.
4) use vsmooth to smooth the center "field" of the new cells.
5) use cgen with the vgen option to copy the new cells to the other faces.
6) vmerge it all together.

Simple once you get the hang of Prostar grid manipulation.

Depending if you are creating a cylinder or a sphere. you'll need to perform the operation in a cylindrical or spherical csys.
Pauli is offline   Reply With Quote

Old   January 20, 2012, 13:04
Default
  #3
New Member
 
Nicholas
Join Date: Jul 2009
Posts: 13
Rep Power: 17
en51nm is on a distinguished road
Thanks for the help Pauli,
I've created the mesh in a similar way to how you have described, but this is (as far as I can tell) a very manual process that cannot be automated for batch meshing (I'm going to be creating a lot of meshes of arbitrary sizes). I seem to fall over when it comes to modifying the position of the new radial cells, the numbering system seems to make it impossible to redistribute.
I'm thinking of try to go down the block meshing route.
Thanks again for the help.
en51nm is offline   Reply With Quote

Old   January 20, 2012, 14:38
Default
  #4
Senior Member
 
Pauli
Join Date: Mar 2009
Posts: 189
Rep Power: 17
Pauli is on a distinguished road
Any command you can enter at the Prostar command line can be used in batch mode. I'm sure this is a batch capable process.

Its a structured mesh, so the numbering is possible. You just need to work out the "pattern". Sometimes its simpler (or required) to leave large holes in your numbering system. Sometimes you want to compress your node numbers, sometimes you don't. It just takes a bit of foresight & planning. The specific technique is very problem dependant.

Prostar has commands to query maximum node number, etc. (see the *get command). You can also create variables (see *set & *sset) & use them in your batch script..
Pauli is offline   Reply With Quote

Old   January 20, 2012, 15:25
Default
  #5
Senior Member
 
Joern Beilke
Join Date: Mar 2009
Location: Dresden
Posts: 539
Rep Power: 20
JBeilke is on a distinguished road
One way:

Code:
!Creates a single butterfly pipe

!Set radius :
*set r1 1.5
!Set number of cells in radial direction :
!(This number should be even)
*set nr1 12
!Set length :
*set l 10
!Set no of z planes :
*set nz 25
*set nv1 1
*set nv2 nr1 + nv1
*set nr12 nr1 / 2

v nv1 0
v nv2 r1

vfil nv1 nv2
vset,,
vgen nv2 nv2 vset,,,0 r1 / nr1
ctab 2 shell 8
c nv1 nv1 + 1 nv1 + 1 + nv2 nv1 + nv2
cgen nr1 1 1
cset,,
cgen nr1 / 2 nv2 cset
*set nc1 nr1 / 2 - 1 * nr1 + 1
*set nc2 nr1 / 2 + nc1 - 1
cgen nr1 / 2 + 1 nv2 nc1 nc2
*set nvf2 nr1 / 2 * nv2 + nv2
csys 2
v nvf2 r1 45
vfil nv2 nvf2 nr1 / 2 - 1
vfil nr1 / 2 + 1 nv2 nr1 / 2 - 1,,,nr1 / 2 + 1 nv2
*set nvf3 nv2 * nr1 + nr12 + 1
vequ nvf2 nvf3
vfil nvf3 - nr12 nvf3
vfil nr12 * nv2 + 1 nvf3 - nr12 nr12 - 1,,,nr12 + 1 1
vset all
vgen 4 nv2 * nv2 vset,,,0 90
cgen 4 nv2 * nv2 all
cset all
vset news cset
vmer vset,,.001
cont
vset news edge
!vsmoo 1 50
vell 50
cset,,
vset news cset
vset inve
vdele vset
vcom all
y
*set dz l / nz
ctyp 1
csys 2
vcex nz mxv - 1 cset,,,loca 0.03 0 dz
cset news flui
view 1 1 1
plty ehid
cplo
Next way:

Code:
vsty 4 4
csys 1
cdel all
vdel all
ccom all
y

v 1
v 9 1
vfill 1 9
vgen 5 10 1 9 1 0 1 / 8
vset all
numb vert on
vsty 4 4
vplo
vgen 5 10 41 45 1 0 1 / 8
vset all
vplo
ctab 1 shell 2
c 1 2 12 11
cset,all
cdisp,on,vert $vstyle,4,4,1
cplot
cset all
cgen 8 1 cset
cset,all
cplot
cgen 4 10 cset
cset,all
numb cell on
cplot
cgen 5 10 25 28 1
cset,all
cplot
numb cell off
zoom,off $replot
pldi,off,all $pldi,on,box $wind,0,0,13.3,10 $replot
csys 2                                             
v 49 1 45                                          
repl                                               
vfill 45 49                                        
repl                                               
vfill 6 46 3                                       
rp4 1 1 0
repl
v 85 1 45
vfill 45 85 3
repl
vfill 51 55
rp4 10 10
repl
edge on
repl
vset all
vmer vset
cplot
edge off
numb all off
repl
vset all
cset all
*get maxv mxve
vgen 4 maxv vset ,,, 0 90
cgen 4 maxv cset
cset,all
cplot
zoom,off $replot
numb all off
edge on
repl
vset all
vmer vset
n
edge on
cplot
edge off
cdis off vert
replot
vset news edge
repl
vell 50
repl

ccom all
y
vcom all
y

csys 2
v 301 1 0 0
vgen 32 1 301 301 1 0 90 / 8
vset news vran 301 400
numb vert on
vplo

cset all
vset add edge
vmer vset ,,,,,,,,, high dele
vset news edge
vplo
cdis on vert
cplo
Third way:

Code:
!!!!!!!!!!!!! EINGABEGROESSEN !!!!!!!!!!!!!

! Anzahl Zellen auf Umfang, immer durch 4 teilbar
! Am besten, so dass nc / 4 eine gerade Zahl ergibt
*set nc 72

! Anzahl Zellen in Randschicht (enthaelt auch die Uebergangsschicht)
*set nr 6

! Randschichtdicke, Geom.
*set dr 10

! Aussendurchmesser
*set d1 50

! Biasing Faktor
*set bias 1.0

! Cell type Nummer (Shell) fuer das o-grid
*set ct1 5

! lokales kart. Koordinatensystem fuer Erzeugung
*set cs1 5

! lokales zyl.  Koordinatensystem fuer Erzeugung
*set cs2 6


! Definition der Koordinatensysteme
!csys 2
!clocal 5 cyli,100,0,0,90,0,0
!csys 5
!cloc 7 cyli 0 0 0 -45 0 0
!csys 7
!cloc 5 cyli 0 0 0 0 0 0
!csys 5
!clocal 6 cart,0,0,0,-45,0,0
!csys 5


!!!!!!!!!!!!!!!! BERECHNUNGEN !!!!!!!!!!!!!!!!!

! Vorbereitung
*set ddr dr / nr
*set ddr -1 * ddr
*set ro d1 / 2
*set ru ro - dr
*get vmax mxvert
*set vmax vmax 

ctab ct1 shell
csys cs2

! Randvertex Berechnungen
*set vi vmax
*set dphi 360 / nc
*set phi -dphi
*defi noex
*set vi vi + 1
!*set phi phi + dphi
v vi ro phi 0
*set phi phi + dphi
*end
*loop 1 nc
vset news vran vmax + 1,vmax + nc,1
vgen,nr + 1,nc,vset,,,ddr,,,bias

! Cell - Erzeugung, Randschicht
*get cmax mxcell
*set offs nr * nc
!*set co cmax + offs
*set v1 vmax + 1
*defi noex
c,v1,v1 + 1,v1 + 1 + nc,v1 + nc
*set v1 v1 + 1
*end
*loop 1 nc - 1
c,vmax + 1,vmax + nc + 1,vmax + nc + nc,vmax + nc
cgen,nr,nc,cmax + 1,cmax + nc,1,

! Cell - Modifikation Randschicht, zur Kernerzeugung
csys 1
*set offs nc * nr
*set ofs2 nc / 4
*set v1 vmax + 1 + offs 
*defi noex
vfill,v1,v1 + ofs2,
*set v1 v1 + ofs2
*end
*loop 1 3
vfill,v1, vmax + 1 + offs,ofs2 - 1,v1 + 1,1

! Kernerzeugung
*set v1 vmax + 1 + offs
*set v2 v1 + ofs2
*set v3 v2 + ofs2
*set v4 v3 + ofs2
patch v1 v2 v3 v4 ofs2 ofs2
cset news type ct1
vset news cset
vmer vset

! Glaetten
!*get smax mxspl
!*set sp1 smax + 1
!spl,sp1,vran,vmax + 1,vmax + nc,1
!splm,sp1,insert,vmax + nc,vmax + 1
!splgen,nr ,1,sp1,sp1,1,nc 
!vset news vlis v1 v2 v3 v4
!spls all
!vset add spls
!vsmo 6,20,
!vell 1
JBeilke is offline   Reply With Quote

Old   January 21, 2012, 05:30
Default
  #6
New Member
 
Nicholas
Join Date: Jul 2009
Posts: 13
Rep Power: 17
en51nm is on a distinguished road
Thanks for the scripts, I'll give those a go.
en51nm is offline   Reply With Quote

Reply

Tags
mesh, o mesh, proam, star cd


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ICEM CFD creating the grid of a Wind Turbine blade Dan CFX 11 June 1, 2012 15:11
creating r-z-theta grid swati FLUENT 0 March 1, 2005 03:17
GRID TO GRID INTERPOLATION in FLUENT calogero FLUENT 3 June 4, 2003 09:32
Combustion Convergence problems Art Stretton Phoenics 5 April 2, 2002 06:59
Troubles modelling flow through a grid Hans Klaufus CFX 1 June 28, 2000 17:43


All times are GMT -4. The time now is 16:53.