AFLR2 Option Details
-------------------------------------------------------------------------------- AFLR : ADVANCING-FRONT/LOCAL-RECONNECTION UNSTRUCTURED GRID GENERATOR -------------------------------------------------------------------------------- AFLR2 is a stand-alone unstructured tria/quad element grid generation code. It uses the Advancing-Front/Local-Reconnection (AFLR) procedure to generate a tria/quad planar grid from an existing boundary edge discretization. Primary input to the code is a boundary edge grid discretization. Input files, output files, and option flags are described in the following Sections. -------------------------------------------------------------------------------- aflr2 [-options] case Option Flags ------------ -build or --build List program version build number. -version or --version List program version number information. -ver or --ver List program version number. -h List summary of input parameters. -help List documentation of input parameters. -melem value Set maximum number of elements to "value". The default value is 500000. -min_out Turn off most all standard output except final total of points and elements. -ibedge Read in a type BEDGE grid file. The default input grid file type is BEDGE. A BEDGE grid file contains a boundary surface definition created by bsurf2.exe or equivalent. Note that the BEDGE grid file is identical to the older named BSURF file. AFLR2 will read files named either *.bedge or *.bsurf. -ifgrid Read in a type FGRID grid file. The default input grid file type is BEDGE. An input grid file contains a triangulated grid with boundary points and possibly field points. -iugrid Read in a type UGRID grid file. The default input grid file type is BEDGE. An input grid file contains a triangulated grid with boundary points and possibly field points. No quad elements are allowed in the input grid. -igrid Read in a type GRID grid file. The default input grid file type is BEDGE. An input grid file contains a triangulated grid with boundary points and possibly field points. -fgrid Write out a type FGRID grid file. The default grid file type is UGRID. -ugrid Write out a type UGRID grid file. If the output grid contains quad elements then the output grid file type is automatically set to type UGRID. The default grid file type is UGRID. -grid Write out a type GRID grid file. The default grid file type is UGRID. -axisym value1 value2 Write out a 3D grid file for an axisymmetric geometry. The number of grid planes is specified by "value1". The default number of grid planes is 2. The angle between grid planes is specified by "value2". The default angle is 10. If this option is selected then output grid file type will be automatically set to either a type FGRID or UGRID grid file. The default is to write a 2D grid. -3d value1 value2 Write out a 3D grid file. The number of grid planes is specified by "value1". The default number of grid planes is 2. The distance between grid planes is specified by "value2". If the distance between grid planes is set to 0 then aflr2 will set the distance to the minimum boundary edge grid spacing. The default distance is 0. If this option is selected then the output grid file type will be automatically set to either a type FGRID or UGRID grid file. The default is to write a 2D grid. -ocase case Set case name for all output files to "ocase". The default is to set ocase to the input file case name "case". -fixed_points Read in a set of fixed field points and add them to the initial triangulation. With this option an input case.fpoin file is required. This file contains the coordinates and desired spacing for each fixed field point. The default is not read in a set of fixed field points. -fixed_surfaces Read in a set of fixed field surfaces and add them to the initial triangulation. With this option an input case.fsurf file is required. This file contains endpoint connectivity and grid boundary condition flag for each fixed field surface. It also contains coordinates and desired normal spacing for each point on the fixed field surface. The normal spacing is used only if -bl is selected and grid boundary condition flag for the particular fixed field surface is 1. The default is not read in a set of fixed field surfaces. -keep_fixed_surfaces Keep fixed field surfaces within the grid and treat them as any other boundary surface. This option has no effect unless the -fixed_surfaces option is selected. The default is to remove fixed field surfaces. -rm_fixed_surfaces Remove fixed field surfaces and merge the grid across each fixed field surface. The fixed field surface points are not modified only the connectivity is changed. This option has no effect unless the -fixed_surfaces option is selected. The default is to remove fixed field surfaces. -adapt Read in a set of point sources and use them to refine the final grid. With this option an input case.psrc file is required. This file contains the coordinates and desired spacing for each point source. The default is not read in a set of point sources. -cdfrs value Set the growth rate from adaptation sources to "value". The default value is 1.1. This option has no effect unless -adapt is selected. -cdfs0s value Set the no growth region around adaptation sources to "value". The default value is 2. This option has no effect unless -adapt is selected. -quad Combine tria elements to form as many quad elements as possible within the quad element quality constrains. The default is to not form quad elements. Advancing-point point placement for right-angle isotropic elements is automatically used with the -quad option. If the -href option is used then the h-refined grid will contain only quads. -quadbl Combine tria elements in the boundary-layer only to form as many quad elements as possible within the quad element quality constrains. The default is to not form quad elements. This option has no effect if the -bl option is not selected. If the -href option is used then the h-refined grid will contain refined quads and trias. -bl Generate a boundary-layer grid. A boundary-layer grid will be generated from all surfaces with a grid boundary condition of 1. The grid boundary condition is set in the bedge file with the ibcibs array. The default is to not generate a boundary-layer grid. -blr value Set the boundary-layer normal growth ratio to "value". The default value is 1.4. This option has no effect unless -bl is selected. -blds value Set the initial boundary-layer normal spacing to "value". The default is to use the initial boundary-layer spacing specified in the input grid file. This option has no effect unless -bl is selected. -blf value Set the fraction of laminar boundary-layer thickness to "value". This is used along with the Reynolds number to determine the initial boundary-layer spacing. The default value is 0.01. The default is to use the initial boundary-layer spacing specified in the input grid file. This option has no effect unless -bl is selected. -y+ value Set y+ for a turbulent boundary-layer to "value". This is used along with the Reynolds number to determine the initial boundary-layer spacing. The default value is 2. The default is to use the initial boundary-layer spacing specified in the input grid file. This option has no effect unless -bl is selected. -Re value Set the reference Reynolds number per unit grid dimension to "value". This is used to determine the initial boundary-layer normal spacing when -y+ or -blf are selected. The default value is 1e+06. The default is to use the initial boundary-layer spacing specified in the input grid file. This option has no effect unless -bl and either -blf or -y+ are selected. -grow Use specified growth from surfaces to determine isotropic spacing in the field. The default is to use linear interpolation. This option uses the boundary condition flag. The grid boundary condition is set in the bedge file with the ibcibs array. If the boundary condition flag is 0 and -grow option is selected then the spacing grows at a rate equal to cdfrb0. The spacing does not grow for a distance cdfs0b0 times the local spacing. If the boundary condition flag is 1 and the -grow option is selected then the spacing grows at a rate equal to cdfrb1. The spacing does not grow for a distance cdfs0b1 times the local spacing. -cdfrb0 value Set the growth rate from surfaces with a boundary condition flag of 0 to "value". The default value is 1. This option has no effect unless -grow is selected. -cdfrb1 value Set the growth rate from surfaces with a boundary condition flag of 1 to "value". The default value is 1.1. This option has no effect unless -grow is selected. -cdfs0b0 value Set the no growth region for surfaces with a boundary condition flag of 0 to "value". The default value is 3. This option has no effect unless -grow is selected. -cdfs0b1 value Set the no growth region for surfaces with a boundary condition flag of 1 to "value". The default value is 3. This option has no effect unless -grow is selected. -bref value Refine the boundary up to "value" times if adjacent boundaries are too close to each other. A value of zero will eliminate boundary refinement. The default value is 7. -href value H-refine the grid "value" times. The default is 0. -no_qm Do not generate grid quality output. The default is to generate grid quality output of element angle distributions. -extra_qm Generate grid quality output which includes distributions of the element angles, element skewness, and maximum element edge length ratio. The default is to generate grid quality output which includes only element angle distributions. -convert Convert file type and/or format of a previously generated grid file. With this option the grid will not be modified. Only the input grid options (-ibedge, -ifgrid, -iugrid) and the output grid options (-fgrid, -ugrid -axisym, -3d) will have any effect. All other options will be ignored. The default igrid file type is BEDGE. The default grid file type is UGRID. -post Post process a previously generated field grid. With this option no new field points will be generated. Only the final grid quality smoothing, local-reconnection, quad formation, h-refinement (if any), and grid quality output generation will be performed. This option also automatically turns on the igrid file option (see -ifgrid -igrid -iplt -iquad -ispectrum) if it is not already selected. The default grid file type is UGRID. Note that the igrid file(s) will be written over by the output grid file(s). -blrec Turn on all local-reconnection in BL region. The default is to limit local-reconnection in the BL region. -advf Turn on advancing-front point placement The default is to use advancing-front point placement. -advp Turn on advancing-point point placement The default is to use advancing-front point placement. -circumcenter Turn on circumcenter point placement The default is to use advancing-front point placement. -centroid Turn on centroid point placement The default is to use advancing-front point placement. -edge Turn on advancement from satisfied edges. The default is to advance from satisfied elements. -delaunay Turn on Delaunay local-reconnection. The default is to use min-max-angle. -skewness Turn on min-skewness local-reconnection. The default is to use min-max-angle. -------------------------------------------------------------------------------- Additional option flags (generally not needed) -------------------------------------------------------------------------------- -madv (default=1) -madvff (default=1) -madvpf (default=0) -mchkg (default=1) -melem00 (default=1) -mrecm (default=2) -mrecmi (default=2) -mscb (default=2) -nbfr (default=100) -nblsmth (default=20) -nbrmadd (default=3) -nbsmth (default=20) -ngen (default=10000) -ngenbl (default=10000) -ngenbs (default=10000) -ngens (default=10000) -ninsmax (default=100) -nqual (default=1) -nqualq (default=4) -nsbmadd (default=3) -nsmth (default=3) -angbl1 (default=40) -angbl2 (default=30) -angbl3 (default=78) -angbl4 (default=120) -angq1 (default=120) -angq2 (default=130) -angq1i (default=130) -angq2i (default=170) -angscbd (default=35) -cbrm (default=1.75) -cbsmth (default=0.5) -cdfarbl (default=2) -cdfbls (default=0.25) -cdfbrm (default=2) -cdff (default=1.5) -cdffbl (default=1.75) -cdffp (default=2) -cdfm (default=0) -cdfn (default=0.7) -cdfr (default=1.3) -cdsd (default=3) -cdsmmax (default=10) -cskwmx (default=0.5) -csmin (default=0.5) -csmin0 (default=0.875) -csmth (default=0.5) -ctol (default=0.94) -darbl (default=0.3) -dssmth (default=2) -relem0 (default=0.1) -sbmin (default=0.001) -vsmthb (default=0.5) -------------------------------------------------------------------------------- Input Files ----------- case.bedge : formatted ascii type BEDGE input grid file case.bedge : optional formatted ascii type BEDGE grid file case.fgrid : optional formatted ascii type FGRID grid file case.ugrid : optional formatted ascii type UGRID grid file case.grid : optional formatted ascii type GRID grid file case.fpoin : optional formatted ascii fixed field point file case.fsurf : optional formatted ascii fixed field surface file case.psrc : optional formatted ascii point source file Output Files ------------ case.fgrid : optional formatted ascii type FGRID grid file case.ugrid : optional formatted ascii type UGRID grid file case.grid : optional formatted ascii type GRID grid file case.gqual.out : text file with distributions of element angles case.gqual.data : data file with distributions of element angles case.gqual.out : optional text file with distributions of element angles, element skewness, and maximum element edge length ratio (with -qm 3 option) case.gqual.angle.data : optional data file with distributions of element angles (with -qm 3 option) case.gqual.skew.data : optional data file with distributions of element skewness (with -qm 3 option) case.gqual.lratio.data : optional data file with distributions of maximum element edge length ratio (with -qm 3 option) -------------------------------------------------------------------------------- File format for type BEDGE input grid file case.bedge [See also g2r00.f] -------------------------------------------------------------------------------- nbsurf : number of boundary surfaces nbg : number of boundary groups or objects npoin : number of points ibcibs : boundary condition flag for each boundary surface nbspbg : number of boundary surfaces or segments for each boundary group ds : desired initial boundary-layer normal spacing for each boundary point x : x and y coordinates for each point format : format is free format or * for formatted ascii files read (io,format) nbg read (io,format) (nbspbg(ibg),ibg=1,nbg) read (io,format) (nbppbs(ibsurf),ibsurf=1,nbsurf) read (io,format) (ibcibs(ibsurf),ibsurf=1,nbsurf read (io,format) ((x(igeomd,ipoin),igeomd=1,2),ipoin=1,npoin) read (io,format) (ds(ipoin),ipoin=1,npoin) <-- OPTIONAL (OR SET BY AFLR2) -------------------------------------------------------------------------------- File format for input/output type 2D FGRID grid file case.fgrid [See also doc/ug_io/UG_IO_2D_GRID_FILE_*.*] [See also g2r01.f and g2w010.f] -------------------------------------------------------------------------------- nbface : number of boundary faces nelem : number of triangular elements npoin : number of points ibcibf : boundary condition flag for each boundary face ipibf : boundary face connectivity containing two point numbers for each boundary face and a boundary surface number in the fourth location ipiel : element connectivity containing three point numbers for each triangular element ds : desired initial boundary-layer normal spacing for each boundary point x : x and y coordinates for each point format : format is free format or * for formatted ascii files idummy=0 xdummy=0.0 read/write (io,format) npoin,nelem,idummy read/write (io,format) ((x(igeomd,ipoin),ipoin=1,npoin),igeomd=1,2), (xdummy,ipoin=1,npoin), ((ipiel(ieln,ielem),ieln=1,3),ielem=1,nelem), (idummy,ielem=1,nelem) read/write (io,format) nbface read/write (io,format) ((ipibf(ibfn,ibface),ibfn=1,2),ibface=1,nbface), (ipibf(4,ibface),ibface=1,nbface) read/write (io,format) (ibcibf(ibface),ibface=1,nbface read/write (io,format) (ds(ipoin),ipoin=1,npoin) <-- OPTIONAL (OR SET BY AFLR2) -------------------------------------------------------------------------------- File format for input/output type 2D UGRID grid file case.fgrid [See also doc/ug_io/UG_IO_2D_GRID_FILE_*.*] [See also g2r02.f and g2w020.f] -------------------------------------------------------------------------------- nbface : number of boundary faces nelem : number of triangular elements nquad : number of quadrilateral elements npoin : number of points ipibf : boundary face connectivity containing two point numbers for each boundary face and a boundary surface number in the fourth location ipiel : element connectivity containing three point numbers for each triangular element ipiq : element connectivity containing four point numbers for each quadrilateral element x : x and y coordinates for each point format : format is free format or * for formatted ascii files idummy=0 xdummy=0.0 read/write (io,format) npoin,nelem,nquad,idummy,idummy,idummy,idummy read/write (io,format) (x(1,ipoin),x(2,ipoin),xdummy,ipoin=1,npoin), ((ipiel(ieln,ielem),ieln=1,3),ielem=1,nelem), ((ipiq(ieln,iquad),ieln=1,4),iquad=1,nquad), (idummy,ielem=1,nelem+ntria) read/write (io,format) nbface read/write (io,format) ((ipibf(ibfn,ibface),ibfn=1,2),ibface=1,nbface), (ipibf(4,ibface),ibface=1,nbface) -------------------------------------------------------------------------------- File format for input/output type 2D GRID grid file case.grid [See also doc/ug_io/UG_IO_2D_GRID_FILE_*.*] [See also g2r03.f and g2w03.f] -------------------------------------------------------------------------------- nbface : number of boundary faces nelem : number of triangular elements npoin : number of points ipibf : boundary face connectivity containing two point numbers for each boundary face and a boundary surface number in the fourth location ipiel : element connectivity containing three point numbers for each triangular element x : x and y coordinates for each point format : format is free format or * for formatted ascii files read/write (io,format) nelem,npoin,nbface read/write (io,format) ((ipiel(ieln,ielem),ielem=1,nelem),ieln=1,3) read/write (io,format) ((x(igeomd,ipoin),ipoin=1,npoin),igeomd=1,2) read/write (io,format) ((ipibf(ibfn,ibface),ibface=1,nbface),ibfn=1,2), (ipibf(4,ibface),ibface=1,nbface) -------------------------------------------------------------------------------- File format for input/output type 3D FGRID grid file case.fgrid [See doc/ug_io/UG_IO_3D_GRID_FILE_*.*] [See also g2w011.f and g2w012.f] -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- File format for input/output type 3D UGRID grid file case.ugrid [See doc/ug_io/UG_IO_3D_GRID_FILE_*.*] [See also g2w021.f and g2w022.f] -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- File format for type FPOIN input point source file case.fpoin [See also g2rfp.f and g2xread.f] -------------------------------------------------------------------------------- nfpoin : number of fixed field points nfpoind : maximum number of fixed field points dff : desired point spacing for each fixed field point xf : x and y coordinates for each fixed field point do ifpoin=1,nfpoind read(io,*,end=1)x1,x2,df0 dff(ifpoin)=df0 xf(1,ifpoin)=x1 xf(2,ifpoin)=x2 enddo 1 continue nfpoin=ifpoin-1 -------------------------------------------------------------------------------- File format for type FSURF input point source file case.fsurf [See also g2rfs.f] -------------------------------------------------------------------------------- nbsurf : number of boundary surfaces nfspoin : number of fixed field points nfsg : number of fixed field surfaces nfsgd : maximum number of fixed field surfaces ibcibs : boundary condition flag for each boundary surface additional boundary surfaces are created for each fixed field surface two are created for each side of the fixed field surface and an additional two are created at each end point for the connecting surface if the end point connects to an existing point ipifsg : fixed field surface information in the first location is the index of the existing boundary point which connects with the first point of the fixed field surface if the index is zero then the first end point does not connect to any other point in the second location is the index of the existing boundary point which connects with the last point of the fixed field surface if the index is zero then the last end point does not connect to any other point if the index is negative one then the last end point connects to the first end point (note: this overides the index in the first location) in the third location is the grid boundary condition for the fixed field surface nppfsg : number of points in each fixed field surface dsfs : desired initial boundary-layer normal spacing for each fixed field surface point (REQUIRED BUT VALUE IS IGNORED IF RESET BY AFLR2) xfs : x and y coordinates for each fixed field surface point ibsurf=nbsurf ifspoin2=0 do ifsg=1,nfsgd ibsurf=ibsurf+1 ipifsg(3,ifsg)=ibsurf read(iofsurf,*,end=1)nppfsg(ifsg),ipifsg(1,ifsg),ipifsg(2,ifsg),ibc ifspoin1=ifspoin2+1 ifspoin2=ifspoin2+nppfsg(ifsg) jbsurf=ibsurf+1 if(ipifsg(1,ifsg).gt.0)jbsurf=jbsurf+2 if(ipifsg(2,ifsg).gt.0)jbsurf=jbsurf+2 do kbsurf=ibsurf,jbsurf ibcibs(kbsurf)=ibc enddo ibsurf=jbsurf do ifspoin=ifspoin1,ifspoin2 read(iofsurf,*)xfs(1,ifspoin),xfs(2,ifspoin),dsfs(ifspoin) enddo enddo 1 continue nfsg=ifsg-1 -------------------------------------------------------------------------------- File format for type PSRC input point source file case.psrc [See also g2rfp.f and g2xread.f] -------------------------------------------------------------------------------- npsrc : number of point sources npsrcd : maximum number of point sources dfps : desired point spacing for each point source xps : x and y coordinates for each point source do ipsrc=1,npsrcd read(io,*,end=1)x1,x2,df0 dfps(ipsrc)=df0 xps(1,ipsrc)=x1 xps(2,ipsrc)=x2 enddo 1 continue npsrc=ipsrc-1 --------------------------------------------------------------------------------