VGRID Files The following is description of grid files generated with VGRID. For most solvers, only mapbc, bc, and cogsg files are needed. ------------------------------------------------------------ 1) project.mapbc: Patch/flow-boundary-condition file (ASCII) ----------format------------ c parameter(mpatch=***) c integer bcpch(mpatch) character*1 text(80) c open(13,file='project.mapbc',form='formatted') c read(13,900)text read(13,900)text read(13,900)text read(13,900)text do ipatch=1,npatch read(13,*)jpatch,bcpch(ipatch),idum1,idum2,idum3 enddo c 900 format(80a1) c ---------------------------- where text = text line npatch = number of surface patches defining the geometry jpatch = surface patch index bcpch = flow boundary condition assigned to surface patch "jpatch" idum1,idum2,idum3 = dummy variables ********************************************************************** 2) project.bc: patch/surface-triangle file (ASCII) ----------format------------- c parameter(mbf=***) c integer fapch(mbf),fnode(mbf,3) character*1 text(80) c open(unit=12,file='project.bc',form='formatted') c read(12,*)nbf,nbc,npatch,igrid read(12,900)text do if=1,nbf read(12,*)jf,fapch(if),fnode(if,in),in=1,3) enddo 900 format(80a1) c ---------------------------- where nbf = number of boundary triangular faces nbc = number of surface grid nodes along patch boundaries (curves) npatch = number of surface patches igrid = 1 for inviscid grids; 2 for viscous grids text = text line jf = triangle index fapch(if) = surface patch index containing surface triangle "if" fnode(if,in) = node "in" of triangle "if" Note: triangle connectivities are according to the right-hand rule with the outward normals pointing into the computational domain. *********************************************************************** 3) project.cogsg: x,y,z coordinates of the grid nodes and tetrahedral node connectivity ----------format------------ c parameter(mp=***, mc=***) !maximum number of grid nodes and cells real(8) crd(mp,3),t integer int(mc,4) c open(9,file='project.cogrd',form='unformatted',iostat=ios, & err=555,status='old') c npoic=0 npois=1 nelec=0 neles=1 read(9)inew,nc,npo,nbn,npv,nev,t, & ((int(ie,in),ie=neles,nelee),in=1,4) read(9)((crd(ip,id),ip=npois,npoie),id=1,3) nelec=nelee npoic=npoie c 100 continue neles=neles+nelec read(9,end=400)nelec if(nelec .eq. 0) goto 400 nelee=neles+nelec-1 read(9)((int(ie,in),ie=neles,nelee),in=1,4) npois=npois+npoic read(9)npoic npoie=npois+npoic-1 read(9)((crd(ip,id),ip=npois,npoie),id=1,3) c goto 100 400 continue npo=npoie nc=nelee c ---------------------------- where inew = a dummy variable (integer) nc = number of tetrahedral cells npo = total number of grid nodes (including nbn) nbn = number of grid nodes on the boundaries (including nbc) npv = number of grid points in the viscous layers (=0 for Euler grids) ncv = number of cells in the viscous layers (=0 for Euler grids) t = a dummy variable (real - double) int(ie,in) = tetradhedral cell connectivity (node "in" of cell "ie") crd(ip,id) = x, y, and z coordinates of node "ip" Note 1: the first "nbn" coordinates listed in this file are those of the boundary nodes. Note 2: tetrahedral cell connectivities are given according to the right-hand rule (3 nodes of the base in the counter-clockwise direction followed by the 4th node.) ************************************************************************ 4) project.poin1: field nodes in the B.L. linked to the surface mesh nodes (ASCII) ---------format---------- parameter(mp=***) c integer lpoin(mp) c open(14,file='project.poin1',form='formatted') c read(14,*)nbn,npv do ip=1,npv read(14,*)jp,lpoin(ip) enddo --------------------- where nbn = number of grid nodes on the boundaries npv = number of grid nodes inside the boundary layer (including nbn) jp = node index lpoin(ip) = surface node linked to the field node "ip" Note 1: "viscous" field nodes are generated along rays emanating from the surface mesh nodes. lpoin gives the corresponding surface node index for each viscous field node along the ray. Note 2: lpoin(ip) = ip, for ip=1,nbn (surface mesh nodes). ************************************************************************