UG_IO SimSys VGRID 3D Grid File Type

A VGRID file contains a tria face boundary surface grid and (optionally) a tetrahedral element volume grid. Multiple output files are written named case_name.mapbc, case_name.bc, and case_name.cogsg. Additional information on VGRID file formats may be available at The Geometry Laboratory at NASA Langley Research Center.

The UG_IO implementation of the VGRID file type assumes three separate file types with fixed file formats.

  1)  case_name.mapbc: patch/flow-boundary-condition file, ASCII formatted
  2)  case_name.bc: patch/surface-triangle file, ASCII formatted
  3)  case_name.cogsg: x,y,z coordinates of the grid nodes and tetrahedral node
      connectivity, FORTRAN unformatted real*8 file format with big endian
      ordering

The following file descriptions were taken from a FUN3D sample case description.

  1)  case_name.mapbc:  Patch/flow-boundary-condition file

                   ----------------------------

       parameter(mpatch=***)
c
       integer bcpch(mpatch)
       character*1 text(80)
c
       open(13,file='case1_u.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 = dummy variables
     idum2 = dummy variables
     idum3 = dummy variables


  2)  case_name.bc: patch/surface-triangle file

                   ----------------------------
c
       parameter(mbf=***)
c
       integer fapch(mbf),fnode(mbf,3)
       character*1 text(80)
c
       open(unit=12,file='case1_u.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)  case_name.cogsg: x,y,z coordinates of the grid nodes and tetrahedral
                       node connectivity

                   ----------------------------
c
       parameter(mp=***, mc=***)
c
       real*8  crd(mp,3),t
       integer cnode(mc,4)
c
       open(10,file='case1_u.cogsg',form='unformatted',iostat=ios,
     &      err=555,status='old')
c
       read(10)inew,nc,npo,nbn,npv,nev,t,
     &         ((cnode(ic,in),ic=1,nc),in=1,4)
       read(10)(crd(ip,1),ip=1,npo),
     &         (crd(ip,2),ip=1,npo),
     &         (crd(ip,3),ip=1,npo)
       read(10)izero
c
 555  continue
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)
     cnode(ic,in) = node "in" of the tetrahedral cell "ic"
     crd = x, y, and z coordinates
     izero = 0, indicating the end of the file

  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.)

Up One Level

UG_IO SimSys Files Home