CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CD-adapco (http://www.cfd-online.com/Forums/cd-adapco/)
-   -   Cell numbering convention (http://www.cfd-online.com/Forums/cd-adapco/52428-cell-numbering-convention.html)

Hassaneen August 6, 2000 05:47

Cell numbering convention
 
Does any one know how to let STAR-CD number cells in X-direction instead of Y-direction (1,2,3,4...in X-D) Thanks

Tara August 6, 2000 15:47

Re: Cell numbering convention
 
Hi Hassaneen,

You can you the CDIR command to change the numbering scheme in terms of a local mesh direction. (page 3-18 of the User Guide). Once this is defined, you can use the RESTRUCTURE command to reorder the vertices of a given cell set.

Hassaneen August 7, 2000 04:23

Re: Cell numbering convention
 
Please be more clear because that manual is not. How could I excute that command CDIR. Thanks =Ahmed=

Stephan Meyer August 7, 2000 07:49

Re: Cell numbering convention
 
Hello, Ahmed,

try HELP CDIR in the prostar command prompt.

Stephan

Hassaneen August 7, 2000 11:50

Re: Cell numbering convention
 
Stephan, this code will drive me crazy. I couldn't do it even with HELP CDIR. Do you have any suggestion. Thanks =Ahmed=

Hassaneen August 7, 2000 12:36

Re: Cell numbering convention
 
Stephan, just now I changed the numbering of the Vertices but the Cells don't change accordingly.??

Stephan Meyer August 9, 2000 02:45

Re: Cell numbering convention
 
Hello, Ahmed,

You're right. I didn't manage to change the cell numbering, too. This is what I tried:

vc3d,0,10,10,0,10,10,0,1,1

cset,all

numb,vert,on

numb,cell,on

view,0,0,1

cplo

creo,all,,,1,x,y

creo,done

y

cplo

This actually renumbers the cells, but not exactly like I wanted to. It looks a bit like rubik's cube. The first ten cells are in the lowest (seen in y-direction) row, but not numbered in x-direction. The commands

cdir,1,122,133,123

rest,1,repl,defa,renu,101

only renumber the vertices.

What You can do is write the cells and vertices to ascii-files and sort them with another program (e.g. write one Yourself in fortran or any other programming language). You need to do the following steps for this:

1.) write the vertices to a file:

vwrite,star.vrt,0,all,,code

see HELP VWRITE for the format of the file

2.) write the cells to a file:

cwrite,star.cel,0,all,,all,code

again see HELP CWRITE for the format of the file

3.) get the centroid coordinates of each cell from the two files You have written out

4.) sort them

5.) change the cell number in the cell file (e.g. in star.cel)

6.) read the cells back into prostar:

cread,star.cel,0,all,,add,code,0,0

since You haven't changed the vertices, it's not necessary to do anything with them.

I hope this helps. Maybe anyone else on this forum has a better idea???

Stephan

Hassaneen August 9, 2000 04:13

Re: Cell numbering convention
 
Stephan, my friend: Some how I have got the cells numbered in the way I want. That was achieved by using the tut.cel and tut.vrt from their tutorial (tut13.1). They are using the same tech. you are explaining. Have you got any experience with moving grids in Piston engine simulation Stephan?? if yes, I have a question for you. Thanks =Ahmed=

Stephan Meyer August 10, 2000 12:26

Re: Cell numbering convention
 
Hi, Ahmed

I've done some simulations with moving grids, but not especially for pistons engines. Anyway, just ask Your question, I'll try to help, if I can.

Stephan

Hassaneen August 11, 2000 02:40

Re: Cell numbering convention
 
Dear Stephan, Thanks a lot for your help in changing the numbering order for the vertices. For the moving grid, I got my problem working now after a huge effort. Thank you again, I appreciate. Regards =Ahmed=

Hassaneen August 14, 2000 03:36

Re: Cell numbering convention
 
Dear Stephan, By chance I've got the cells numbered the way we need it. That happen when I was trying to create a 2-D shell and then create a 3-D mesh from it. The code already numbered the cells in the X-direction. =Ahmed=


All times are GMT -4. The time now is 07:42.