Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

A VERSATILE TWO-DIMENSIONAL MESH GENERATOR

WITH AUTOMATIC BANDWIDTH REDUCTION

LMRENCE L. ~~
Umversity of Bridgeport, Bridgeport. CT 06602, U.S.A.

ANDREWGASPER+
HamiltonStandard Division of UnnedTechnolows,WmdsorLDcks,CT06096.U.S A
(Received 4 April 1978, twewd for publrdon 12 June t978)

Abstract-A relatweiy-stra&tforwrd mesh pneratron program based on isoparametric mappmg concepts IS


presented Uscrdefincdisoparametric superelementsare subdivided, as speciiled by the user, mto 3-noded or
6-nodedmaaguiarelements or into 4-nodedor &noded isuparamemc quadrilaterals.Tcmperaturcs and thicknesses
(or any other charactenstics)at the superekment nodes are mapped so as to provide the appropriate nodal values
for the subekments. Material specificationcodes from parent superekments are also transferred as subekmcnt
character&ics An automatic node ~n~~nng scheme is mcluded to minimize the nodal con~~~~ of the
genera&d mesh.

renumberingalgorithm[ 161and by introducingadditional


Recently, while studying the characteristics of various program logic.
axisymmetric elements[I], the authors had need of a The programgenerates node numbers, coordinates and
versatile mesh generator that could generate the nodes element connectivity information for five commonly-
and connection arrays for a variety of common two- used two-dimensionalelements. Userdefined supcrele-
dimensionalelements. Althougha great deal of effort has ments are subdivided, as specified by the user, into
been devoted to the development of two- and thrce- 3-no&d triangles, 6-nodcd strzught-sidedtriangles, 6-
dmensional generatorsf2-141,the authors were unable to nodcd isoparamctric triangles, or 4-noded or ILnoded
locate a mesh generator that could handle arbitrary isopsrametric quadriiatcrals fsce Fig, I). While other
regions, could generate a variety of clement types, element types arc in use, in the authors’ opinion the
required only a modest mount of core storage, executed eve-rnen~~ ckmcnts arc the more popular types
in a reasonable amount of time, produced a mesh with a employed in planar and axisymmetric analyses. The
reasonable bandwidth,and was mcxpcnsivc or free. Ob authors hope that the coding presented herein will save
viously, a number of proprietary codes that meet these some users and researchers a substantialamount of time
requirements have been developed but such codes are when performing plane or axisymmetric elasticity, heat
generally not available to an cnginccr in a small or transfer and flow analysis and when solving plate prob-
medium size company or to a researcher. Undoubtedly, lems.
the unavailabilityof a simple,machineindcpcndent mesh While some checks are built into the program, checks
generator has caused, and will continue to cause, a great on element interior angles, element aspect ratios, etc. arc
deal of duplicationof effort. not included and remain to bc implementedby the user.
The coding contained in ths paper is a modest attempt Many mesh deficiencies can, of course, be detected by
to provide a relatively-s~~o~~d mesh generator simply reviewing the genera&d mesh on a graphics tube
that can meet & of the previously stated rcquiiements or examining a plot of the grid. If necessary, small
and can serve as a base for more s~~sti~t~ gcncra- ~jus~n~ to a few nodal ~~rdinates can then be
uon schemes developed by users. The isoparamctric made.
mapping concepts employed arc cssentiaIly those of
Zienkicwiczand PhiElips[4]The node generation coding
is a generalization of the coding given in the excellent Since Zicnkicwicz and Phillips[4] have described the
text by Segerlmd[lS]. However, input requirements tbcory and techniques employed m a mesh generator
have been greatly simplified while the output options based on isoparamctricmappingconcepts, only essentml
have been increased to include a variety of element points will be reiterated herein. A typical parabolic
types, temperature and thickness mapping and material supcrelement is shown in Fig. l(b); the X- and y-coor-
specificationcode transfer. In addition, Segerlind’scode dinatesof a typical point withinthe superelementISrelated
produces a very large bandwidth and duplicate node to the c&t pairs of nodal coordinates by the equations:
numbers for some problems; these defects have been
eliminated by employing a corrected version of Collins‘

*Assoctate Professor of Mechanical Engineering.


SAnaiytical Engineer
562 L. L. Duaocnxaand A. GASPER

the generated elements are to be quadrauc elements,


then a slightlydifferent nodal pattern and more rows and
columns of nodes have to be generated for a given
superelementsubdivision.If the superelementis straight-
sided then the intermediate nodal coordinates are not
ITYPE-I - - I TYPE-2 I TYPE-3 needed to deffne the region geometry and can be easily
calculated by the computer. However, the user may still
want, in some instances, to input the intermediate nodal

b D
coordinates in order to grade the mesh within the given
superelement[4]. The locations of the intermediatenodes
are not completely arbitrary: certain limits[ll] exist on
the offsets that are allowable from midside positons if
ITwE- (a) ITYPE-5
the resulting mesh is to have a reasonable form. Users
should also be aware of modellingerrors that occur when
isoparametric elements are used to model circular arcs.
Fortunately, such errors are not sign&ant unless the
angle subtended at the center of curvature exceeds
W[l9].
If the generator was limited to subdividing a single
parabolic superelement, it would be of little practical
_-+--f--_jSI#2
value since it would be limited to singly-connected
SCE 4t---,L
regions of a limited shape and having constant material
properties. Instead a mesh of superelementsis detined by
the user in the same way one would define a normal finite
element mesh, the number of superelements being
sufficient to define the object’s geometry and regions
(4 av)
(b) having different material properties. A typical superele-
Rg l(a). Elementgentrattonophons. l(b)Typicalsuperelement. ment mesh is shown in FQ. 2 (straight-lineplotting of the
parabolic superelements). After defining the superele-
ment nodal coordinates, thicknesses and temperatures,
where N&3,~1 is the so-called “shape function” asso- element connectivity and material codes, the user need
ciated with node “i”. The shape functions for parabolic only &line the number of subdivisions for each
quadrilateralsas well as other element types have been superelement and the type of element to be generated
given by Zienkiewicz[l7].Thus, if the nodal coordiis and the computer can generate all the desired data for
(x,,yr) are known, the Cartesian coordinates of any the refined mesh (see Fig. 2). The user must be careful to
specifiedpoint (B, 7) can be easily calculated from eqns define the subdivisions of each superelement so as to
(1) and (2). maintain nodal compatibility of the generated mesh. A
If a region is definedby eight sets of nodal coordinates check for this type of error could, of course, be in-
and eqns (1) and (2), then relatively-simpleprogramming corporated into the program. Since the program
logic can be used to generate a mesh of a given refine- generates all the nodal information associated with the
ment once the user has specified the number of element first superelement, then generates all the nodal in-
subdivisions m the B and q directions. A typical sub- formation associated with the second superelement,etc.
division that would be suitable for 3-noded triangles or the codii must avoid creating duplicate nodes and must
4noded quadrilateralsis shown in Fig. l(b). Obviously,if renumber the nodes to reduce the nodal connectivity. If

SUPERELEMENT MESH
(4

REFINED I;b;SH (ITYPE. 2)

FM 2(a) Superelementmesh: 2(b) Generatedmesh.


A versatile twodiinsional mesh generator with automatic bandwidth reducOon 563

a frontal solution procedure[20] is used m the finite tmoFPnocRAM-uMtTATtoNs


element program, then element numbering is important Iktaikd instructions on the required format for the
and a different subroutine would have to be used instead input data file are given in the Appendix. Most of the file
of the renumberingroutines (RENMBR,OPTNUM). requirements are self+xplanatory; however, a few
comments are necessary regarding the auxiliary polar
CpNllJuLPRoG~DB8cpDTwm coordinate systems and the definitions of side 1, side 2,
The FORTRANprogram consists of a very short main etc. of a given superelement.
program and a number of subroutines. This modular Since many two-dimensional geometries contain
form should allow users to easily substitute improved circular holes, fillets, rounds and/or are bounded by
routines or to omit routines that are unnecessary for circular arcs, a very important feature for the user is to
their application, for instance, the node renumbering be able to employ polar coordinates wherever con-
sequence. Brief descriptions of the various routines are venient. For instance, the coordinates of the nodes on
given below. the hole and radii boundaries in Fu. 2 arc more easily
specified using two dilkrent polar systems, one at the
Subroutine DATA center of each hole. Other nodal coordinates may be
This routine reads all the data necessary to define the more easily specified in Cartesian coordinates. The pro-
object’s geometry, materialproperties codes and the type gram allows the user to use Cartesian coordinates and/or
of mesh to be generated. polar coordi&es which may be referenced to one of
twenty different polar systems (see F@. 3). All polar
Subroutine REORDR systems are defined by giving their x- and y-offsets
REORDRrenumbers the superelementsin such a way relative to the global Cartesian axes and are identifiedas
that as the nodes are generated for each superelementno polar system 1, polar system 2, etc. If no polar systems
duplicate node numbers will be created. are to be used (IPOL = 0), Card Group 3 can be omitted
and the coo&ate system reference number (Card
Subroutine MESH Group 4, item I) will be zero on all nodal coordinate
This portion of the codii outputs all the input data cards.
and generates all node numbers, nodal coordiites, When specifying the number of subdivisions within
thicknesses and temperatures. each superelement (Card Group 7), the user must recog-
nize that side 1 (see Fw, 1) of a given superelement is
Subroutines LINEAR, QUAD defined by the sequence of nodes given in the region
LINEAR generates the element connectivity array and node numbers data (Card Group 7, item 5). The region
material specification codes for Enoded trianglesand node numbers (connectivity data) must be a sequence
four-noded quadrilaterals, QUAD establishes the same that starts at a corner node and progresses in a counter-
information for the quadratic elements, i.e. the 6-noded clockwisemanner. The starting node munbers define side
straight- and curved-sided triangles and the I-noded iso- 1; sides 2-4 are then obtained by numberingthe remain-
parametric quadrilateral. For triangular elements, ing sides in a counterclockwisefashion.
connectivity is established in such a way as to connect The reader will note that the required input data is
along the shorter diagonalof the quadrilateral. essentially the same as that required for a very crude
finite element analysis using 4 or I)-nodedisoparametric
Subroutines RENiUBR, OPTNUM quad&e&. Of course, by suitable additions, the user
These routines are associated with nodal renumbering can also transfer surface tractions, body forces, specified
and may be omitted if renumbering is not needed. displacements,etc. to the generated elements. Although
RENMBR determines how many nodes are directly no claim regardingcoding e5ciency is made, the authors
connected to a given node and the node numbers have found the program to be relatively fast. A typical
of the nodes that are connected to a given node. It is problem involving the generation of 4OOnodes, 175
assumed that any given node will not be connected quadratic elements, and the associated renumbering,
to more than MAXCON(MAXCON= 24) other nodes. takes approximately 3sec of CPU time on an IBM
OPTNUM trys “N” renumberingschemes where “N” is 370/168.
the number of nodes in the model. Further details on the
renumbermg algorithm can be found m Collins’
paper(l61; however, several coding nusprints do exist in
Collms’paper. Of course, the user can easily substitute
his own renumbering scheme or use another published
algontbm[21].

Subroutrne OUTPUT POLAR SYSlEM#l


OUTPUT gves the user the option of outputing the
onginal node numbering scheme or the renumbered
sequence having a smaller nodal connectivity. Output
information consists of total number of generated nodes,
total number of generated elements, number of nodes
associated with a grven element, nodal coordinates, ele-
ment connectivity and material code data, nodal
temperatures and thicknesses, and the maximum node
dfierence By suitable definition of the output devices,
one can get a Ming of the output and/or punch card, GUSAL CARTESlAN SYSTEM
magnetictape, etc. type of output. Rg 3 Polar coordmatesystems
564 L L. l&ROcam and A GASPER

Because of the dunenstons that are used for the 4 0 C. Ztenluewtcz and D. V Phtllrps. An automattc mesh
various arrays employed in the current codii, the size generatton scheme for plane and curved surfaces by tso-
of mesh that can be generated is definitely limited. The parametriccoordmates Int I Num Mefh Engng 3, 51%528
limits can easily be changed by increasing the ap- (1971).
propriate array sizes; the required sizes are indicated in s J R. Adamek, An automatic mesh generator usmg two and
three&nensionai Isoparamemc fmlte elements Masters
the comments portion of the- source Ming. If the Theas, Naval Postgraduate School, Monterey, Cahfornra
tensions of the arrays are imxeased and greater pre- (June 1973)
cision is needed, double p&son arithmeticcan easily be 6. W. R Bueli and B A Bush, Mesh generation-a survey f
incorporated. As currently structured, the program does Engng Industry 332-338 (Feb. 1973)
not make use of secondary stow devices; if necessary, 7 H. A. Karnel and M W McCabe, A two-dlmenslonal
disk storage could be employed to reduce storage package m fimte element analysis utdlzmg mteractlve muu-
requirements or the renumbet@ phase could be an computer graptucs Presented at Inf Conf Compur Appf
entirely separate program that operates on the output of Aufomatron Shtpyard Operatwn Ship Lkwgn Tokyo (Aug
1973).
the generator.
8 J C Cavendtsh, Automatic t~~~latlon of arbitrary planar
The current limitationsare: number of superelements domams for the fmrte element method. lnf I Num Mefh
less than or equal to 20, number of rows or columns of Engng 8,67%% (1974)
nodes in any given superelement less than or equal to 9 W A Cook, Body onented (natural) coordmates for
21, number or superelement nodes less than or equal to generatmg threedlmenslonal meshes Int I Num Meth
100,number of generated elements less than or equal to Engng 8,27-43 (1974).
200,number of generated nodes less than or equal to 441. IO R E Jones, A Self-Orgamzmg Mesh Generation Program
ASME Paper No. 74PVP-13 (1974)
11. H A. Kamel and P J Shanta, A Sohds Mesh Generator and
A simple hvodiiensional mesh generation package, Result Display Package. ASME Paper No 7dPVP-34 (1974)
12. G P Steven, Automatic Generanon of Rmte Elements
incorporating node renumbering, has been presented. Department of AeronautIcal Engmeermg Technology Note
The coding will hopefully be of use to a signticant 7405, Unnersdy of Sydney (Sept 1974)
number of engineers who do not have access to a versa- 13 A. Bykat, Automatic generatton of tnangular gnd I-sub-
tile generation routine. The input is very sin&r to the division of a general polvgon mto convex subregtons II-
input for a very crude finite ekment analysis and hence ~~~lat~n of convex polygons In? f Npm. Meth figng
is very simple to understand and use on a day-today 10, 1329-1342 (1976)
basis. The output consists of all of the data that is 14 L R Herrmann. Laplaaan-Isoparametnc gnd generanon
typically needed for any type of two-dimensional scheme. I Engng Mech. Diu. ASCE 102(EMS). 749-756
analysis.
(Ott 1976).
15 L J. Segerhnd, Apphed Finlte EIemenf Analysrs Wiley, New
Ac/mawledgemmrs-Tbc abors wuh tn aeknowkdge tltc mmaI York (1976)
codi effnrt made by Mr. Gene !#oades who is now emnloved 16. R J Colbns. B~dw~th _~
reduction bv autonlatlc renumber-
by St&t& Dywmks Research Corporation, Cincinnati; Ohio mg. int. J. Num. Meth. EngNg 6, 345-556 (1973)
I7 0. C Zienkiewsz. ThpFintte Element Method m Engrneenng
Science McGraw-H& New York (1971)
18 G Stemmueller,RestrIctIons m the apphcatlon of automatic
mesh generatIon schemes by lsoparametrlc coordmates
1 L L. Durocher, A Gasper and 0. Rboades. A numerical 1n1 J Num. Meth Engng 8.2.89-294 (1974)
compartson of ~~rne~c finite ekments. Int. I; Num. 19 R. D Henshell, DziTerences between lsop~ame~c assump-
M&r. Engng 12 (1978). tions and true cucles lnt 3 Num Meth Engng lo(S),
2. F A. Akyuz, Natural coordinate systems: an automatic mput 1193-1196 (1976)
data generatlon scheme for a fintte element method. Nucl 20 B M. Irons, A frontal solution programme for firute element
En& &sign 1l(2). 195-207( 1970) anaiysls. Int I Num Met/t. Engng 2, 5-32 (1970)
3 C 0 Fredertck, Y C Wong and F. W Edge, Twoduncn- 21 G. Akhras and G Dhatt, An automatic node relabelhng
slonal automatic mesh generation for structural analyrls Int schemefor muunuzmg a matnx or network bandwldth Int I
i Num Met/t. EngBg 2, 133-144(1970) Num hfeth. Engng 10.787-797 (1976)

AmENmx 1.

INPUT FILE REQLJIREMENTS FOR MESH GENERATION PROGRAM PROGRAM VARIABLES

CARD 1 TITLE TITLE

CARU 2 ( OPTIONS 1
l- NUNBER OF INPUT REGIONS (SUPERELEMENTS) INRG
2- NUHBER OF INPUT NODES INBP
3- NUtl6ER OF AUXILIARY POLAR COORDINATE SYSTEMS IPOL
4- TYPE OF OUTPUT ELEMENT ITYPE
IA) l------3 NODE TRIANGLE
t 8 I Z------4 NODE ~UADRSLATERAL
fCf 3------6 NODE TRIANGLE tI~PARA@ETR~C~
(0) 4------6 NODE TRIANGLE
f E ) 5------8 NODE QUAORILATERAL t ISOPARAHETRIC 1
5- TEMPERATURE DECISION ITHP
(A) O------DO NOT READ TEHP CARDS
(8) l------READ TEMP CARDS
A versatile twodtmenstonal mesh generator with automatic bandwldth
reduction 565

6- THICKNESS DECISION ITHK


(A) D------ DO NOT READ THICKNESS CARDS
(B) l------READ THICKNESS CARDS
?- RENUtlBER DECISION IRENUtl
(A) O------OUTPUT MESH IS NOT RENUMBERED
(B) 1 ------OUTPUT MESH IS RENUtlBERED

CARD GROUP 3 (AUXILIARY COORDINATE SYSTEM DFFSET),IPOL CARDS


l- POLAR COORDINATE SYSTEM REFERENCE NUMBER
Z- X DItlENSION TO ORIGIN
3- Y DIMENSION TO ORIGIN

CARD GROUP 4 (COORDINATE DEFINITION CARDS),INBP CARDS


l-COORDINATE SYSTEH USED FOR NODE LOCATION IPOLAR
(A) O------CARTESIAN WASTER SYSTEM
(B) l______ POLAR SYSTEM REFERENCE NUMBER 1
(C ) 2-___-_ POLAR SYSTEM REFERENCE NUMBER 2
(D) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
( E ) N..---se POLAR SYSTEM REFERENCE NUFIBER N
2- NODE NUMBER K
3- X-COORDINATE (RADIUS FOR POLAR SYSTEH) XP(K,ll
4- Y-COORDINATE (ANGLE IN DEGREES FOR POLAR SYSTEH) YP(K,l)

CARD GROUP 5 (USED WHEN TEt?P OPTION=l),INBP CARDS


l- NODE NUMBER K
2- NODAL TEMPERATURE XP(K,P)

CARD GROUP 6 (USED WHEN THICKNESS OPTION=ll,INBPCARDS


l- NODE NUMBER K
2- NODAL THICKNESS YP(K12)

CARD GROUP 7 (CONNECTIVITYFOR INPUT REGIDNS)rINRGCARDS


l- NUMBER OF INPUT REGION NRC
2- DIVISIONS ALONG SIDE 2 NROWl(NRG)
3- DIVISIONS ALONG SIDE 1 NCOLl(NRG)
4- BOUNDARY NODE INDICATOR INDl
(A) lamm---8 INPUT NODES FOR THIS REGION
(B) 2------4 INPUT NODES FOR THIS REGION
5- REGION NODE NU?BERS(CONSECUTIVEAND CCW) NOP(NRG,K),K=l,S,INDl
I 6- MATERIAL CODE NUKBER FOR THIS REGION NNATt NRG 1

MESH GENERATION PROGRAM

c RERUIRED SIZES OF ARPAYS 00300010


C XC(t~M,NM),YC~NH,NM),TEMP~NM,M1),THK~NH,N~~,NN(W,NM~, 00000020
C NCONlflEH,S),JNT(NJT),nEnJT(NJT*MAXCON),JHEH(NJT~,NEWJT(NJT), 00000030
C JOINT~NJT),~AT~MEM),N?@~l(NSE~,NCOLl(NSE~,INDll(NSE~,NHAT(NSE~, 00000040
C NOP~NSE,8),XP~NSBN,2),YP~NSBN,2~,XNODINJT,2~,YNOD(NJT,2),ICOMP(4,4~,O0000050
C NE(HN**2),NR(9),JT~HEM~8l,ICROSS(NSE~,NDU~Y(NSE,4~,TITLE(2O), 00000060
C THPRGN~8),THKRGN(8t,XRG(S),YRG(9),SF(B),NDN(8t,JTl~NSE,4~,NODE(4), 00000070
C NNRB~NSE,4,Ntl~,IUSED~NSEl,XOFSET(NOFSET),YOFSET(NOFSET) 00000080
C DEFINITION OF VARIABLES 00000090
C NSBN=MAX NUXBER OF SUPERELEMENT NODES 00000100
C NSE=tlAX t’UtlBER OF SUPERELEMENTS 00000110
C NJT=flAX NUt!BER OF GENERATED NODES 00000120
C MEtl=MAX NUMBER OF GENERATED ELEMENTS 00000130
C NOFSET=t;AX NUMBER OF AUXILIARY POLAR COORDINATE SYSTEMS oocoo14o
C NH=PlAX NUtlBEP OF GENEPATED ROWS OR COLUttNS IN A SUPERELEHENT 00000150
C tlPXCON=tlAX NUMBER OF NODES THAT ANY GIVEN NODE WILL BE CONNECTED TO 00000160
C NP=GB=NUtltI?=NUt;BER OF GENERATED NODES 00000170
C NE=NEL=NUtlEL=NUtlBER OF GENERATED ELEMENTS 00000180
C NNODE=NCN=NUtfBER OF NODES ASSOCIATED WITH ANY GENERATED ELEHENT 00000190
C NN?B CONTAINS GENERATED BOUNDARY NODE NUMBERS OF ALL SUPERELEMENTS 00000200
C 00000210
COnHON XCt21,21~,YCt21,21~,TEHP~21~21~,TnKt21,21~,NNt21,21~, 00000220
1NROWS,NCOL,IN,IO,IP,NCON~200,8),NUflEL,NB,NCN,IDIFF,IRENUH, 00000230
2IP1,JNT~441tr~EMJT~lO584~,J~EM~441),NM,NSE,HAXCON,~EH, 00000240
3NEWJT(441),JOINT(44l),NJT,tlAT(2OO),JRN, 00000250
4NR0W1~20),NCOL1(20~,INDll~2O),NMAT~2O),NOP(2O,8~, 00000260
5xP(100,2),YP(100,2),XN0D(441,2),YN0D(441,2), 00000270
eIt~RG,INBP,ITYPE,ITHP,ITHK 00000280
566 L. L. DUROCHER and A. GASPER

IN=1 00000290
10=2 00000300
IP=4 00000310
CALL DATA 00000320
CALL tlESH 00000330
IF (IRENUtl.EQ.0) GO TO 10 00000340
CALL RENilBR 00000350
10 CALL OUTPUT 00000360
STOP 00000370
END 00000380
SUBROUTINE DATA 00000390
COHMON XC~21,21~,YC~21,21~,TEMP(21,21~,THK~21,21~,NN~21,21~, 00000400
lt:ROWS,NCOL,IN,IO~IP,NCON~2O0,8~,~EL,N6,NCN,IDIFF,IREMIM, 00000410
2IP1,JNT~441~,HE~JT~lOS84~,JnEn~44l~,NM,NSE,HAXCON,MEH, 00000420
3NEWJT(4411,JOINT~44lt,NJl,tlAT~2OO~,JRN, 00000430
4NROW1~2O1,NCOL1~2O~,IND1l~20~,N~AT~2O~,NOP~20,8f, 00000440
5XP(100,2),YP(100,2),XN0~~441,2~,YN0D(441,2~, 00000450
6ItIRG,INBP,ITYPE,ITHP,ITttK 00000460
DItlENSION TITLE( 20 1 00000470
DIMENSION ICROSSt20),NDUMY~20,41,XOFSEf(20),YOFSEf(201 00000480
C INPUT AND OUTPUT OF TITLE, CONTROL CARD, GLOBAL COORDINATES AND 00000490
C CONNECTIVITY DATA 00000500
NOFSET=20 00000510
NSBN=lOO 00000520
Nfl=21 00000530
NSE=20 00000540
NJT=441 00000550
HEM=200 00000560
DO 10 I=l,NOFSET 00000570
XOFSET(I)=O.O 00000580
10 YOFSET(It=O.O 00000590
i:?ITE (10,201 00000600
20 FORHAT(lHl,l7X,‘+*rw*****rt~******+rrwrHw*r’/l8X, 00000610
l’* HESH GENERATION PPOGRAtl *‘/18X, 00000620
2’***************************‘///) 00000630
WRITE (10,30)NSE,NSBN,NOFSET,NJT,MEH 00000640
30 FORtlAT(lOX,‘CURRENT PROGRAM LIMITATIONS’/10X, 00000650
1’tlAX. NUMBER OF SUPERELEllENTS=‘,I3/1OX, 00000660
2’tlAX. NUMBER OF SUPERELEtlENT NODES=',14/lOX, 00000670
3’nAX. NUtlBER OF AUXILIARY POLAR COORDINATE SYSTEMS=‘,I4/10X, 00000680
4’HAX. NUtlBER OF GENERATED NODES=‘,I4/10X, 00000690
5’tlAX. NUMBER OF GENERATED ELEtlENTS=‘,I4///1 00000700
READ (IN,40 ITITLE 00000710
40 FORHAT( 20A4 1 00000720
READ (IN,*)INRG,INBP,IPOL,ITYPE,ITMP,ITHK,IRENUH 00000730
50 FORMAT( 615 1 00000740
IF (INRG.GT.NSE 1 WRITE (IO,60 1 00000750
60 FORHAT(//5X,‘NUtlBER OF INPUT REGIONS EXCEEDS ALLOWABLE’, 00000760
1 /SX,‘PROGRAM TERMINATED’1 00000770
IF (INRG.GT.NSE) STOP 00000780
IF (INBP.GT.NSBN) WRITE (10,703 00000790
70 FORMATf//SX,‘NUnBER OF SUPERELEMENT NODES EXCEEDS ALLOWABLE’, 00000800
1 /5X,‘PROGRAM TERtlINATEO’ 1 00000810
IF (INBP.GT.NSBN) STOP 00000820
IF (IPOL.GT.NOFSETl WRITE (10,801 00000830
80 FORllAT[//5X,‘NUtlBER OF AUXILIARY COORDINATE SYSTEMS EXCEEDS’t 00000840
1 /5X,‘ALLt%lABLE, PROGRAM TERMINATED’) 00000850
IF (IPOL.GT.NOFSETt STOP 00000860
IF(ITYPE.EQ.l.OR.ITYPE.EQ.2) MAXCON= 00000870
IF(ITYPE.EQ.3.0R.ITYPE.EQ.4.OR.ITYPE.EQ.5~ tlAXCON=24 00000880
WRITE (I0,90tINRG,INSP,IPOL,ITtlP,ITtlK,IRENUtl 00000890
90 FORMAT(/lOX,‘NUMBER OF INPUT REGIONS=‘,I5, 00000900
1 /lOX,‘NUtlBER OF INPUT NODES=‘,I4, 00000910
2 /lOX,‘NUi%ER OF AUXILIARY POLAR SYSTEHS"rI4, 00000920
3 /lOX,'TEHPERATURE OPTION=‘,I3, 00000930
4 /lOX,'THICKNESS OPTION=‘,I3, 00000940
5 /lOX,‘RENUt%ER OPTION=‘,I3) 00000950
IF (ITYPE.EQ.1) WRITE (10,100) 00000960
IF (ITYPE.EQ.2) WRITE (10,110) 00000970
IF (ITYPE.EQ.3) WRITE (10,120) 00000980
IF (ITYPE.EQ.4) WRITE (10,130) 00000990
IF (ITYPE.EQ.5) WRITE (10,140) 00001000
100 FORHAT(//lOX,'OUTPUT ELEHENT TYPE ---- 3-NODE TRIANGLE') 00001010
110 FORtlAT(//lOX,'OUTPUT ELEMENT TYPE ---- 4-NODE QUADRILATERAL') 00001020
A versatik two-dimensional mesh generator with automauc bandwidth reduction 561

120 FCRMAT~//10X,'CUTPUTELEMENT TYPE ---- 6-NODE TRIANGLE', 00001030


1' IISCPARAHETRIC)') 00001040
130 FCRMAT(//lOX,'OUTPUTELEMENT TYPE ---- 6-NODE TRIANGLE') 00001050
140 FCFMATL//lOX,'OUTPUTELEHENT TYPE ---- 8-NODE QUADRILATERAL', 00001060
1' (ISCPARWETRICI') 00001070
IF (IPCL.EQ.O)GO TO 185 00001080
WRITE (10,150) 00001090
150 FCRMAT(//10X,'AUXILIARYPOLAR COORDINATE SYSTEMS') 00001100
NRITE (10,160) 00001110
160 FCRMATL/' SYSTEM NUNBER X OFFSET Y OFFSET') 00001120
DC 170 I=l,IPCL 00001130
READ (IN,*)IPCLAR,XOFSET~IPCLARI,YCFSET(IPDLAR~ 00001140
170 NRITE ~IC,18O)IPCLAR,XCFSET[fPOLAR),YOFSET~IPCLARl 00001150
180 FCRMAT(//5X,I5,8X,F1O.5,5X,FlO.5) 00001160
185 DC 200 J=l,INBP 00001170
READ ~IN,*)IPCLAR,K,XPIK,l~,YP(K,1) 00001180
190 FCRMAT(I5,5X,2F10.5) 00001190
IF (IPOLAR.EG.O)GO TO 200 00001200
RAD=XP(K,l) 00001210
ANG=YP(K,1)*3.141592654/180. 00001220
XP(K,l)=RAD*CCS(ANG)*XOFSET~IPOLAR) 00001230
YP(K,l)=RAD*SIN(ANGI+YOFSET(IPCLAR) 00001240
200 CONTINUE 00001250
IF (ITMP.EP.0)GO TO 230 00001260
DC 210 J=l,INSP OOOOi270
210 READ (IN,*)K,XP(K,2) 00001280
220 FCRMAT(I5,5X,F10.5) 00001290
230 CONTINUE 00001300
IF (ITHK.EQ.O)GO TO 250 00001310
DC 240 J=l,INBP 00001320
240 READ (IN,*)K,YP(K,2) 00001330
250 CONTINUE 00001340
260 FCRMAT(515) 00001350
WRITE (10,270)TITLE 00001360
270 FtRtlAT(///lX,'PRCBLEM:',2OA4//) 00001370
WRITE (10,280) 00001380
280 FCRMAT(lX,'INPUTMESH COORDINATES'//lX, 00001390
1'NUf:BER X-COCRD Y-COORD TEMPERATURE THICKNESS') 00001400
DC 290 J=l,INBP 00001410
290 HRITE (10,300)JrXP(J,l),YP(J,I),XP(Jt2),YP~J,2~ 00001420
300 FCRMAT(2X,I3,4(5X,F7.2)) 00001430
310 FCRMAT(//lX,'INPUTMESH CONNECTIVITY DATA' 00001440
1 //lX,'REGICN SIDE 1 2 3 4'/1 00001450
320 FCRMAT(2X,I3,14X,4(12,5X)) 00001460
C LOOP ON THE REGIONS TO GENERATE THE ELEHENTS 00001470
DC 340 J=l,INRG 00001480
READ IIN,*~NRG,NRCW1~NRG~,NCCL1~NRG~,INOl,~NCP~MG,K~,K=lt8,IND1~,00001490
lNMAT(NRG) oooo15co
330 FCFMAT(1315) 00001510
340 INDll(NPG)=INDl 00001520
CALL RECRDR(NCP,IhRG,ICROSS) ocoo153o
C REORDER THE INPUT REGIONS 00001540
350 DC 360 J=l,INRG 00001550
L=ICRCSS(J) 00001560
NDlJflY(J,l)=NRCWl(L) 00001570
NDUHY(J,2)=NCCLlIL) 00001580
N3UMY(J,3)=IND1l(L1 00001590
360 NDUMY(J,4)=NilAT(L) 00001600
CC 370 J=l,INRG 00001610
NRCWl(J)=NCUMY(J,l) 00001620
KCCLl(J)=NDUMYIJ,2) 00001630
It:311(J)=NDUtlY(J,3) 00001040
N:lAT(J) =NDUtlY(J,4) 00001650
DC 370 K=1,8 00001660
370 b’CCtJ( J, K )=NCP( ICRCSStJ 1,K1 00001670
DC 380 J=l,IN'?G 00001680
DC 380 K=1,8 00001690
380 NCP(J,K)=NCCN(J,K) 00001700
RETURN 00001710
END 00001720
SUGPCUTINE LINEAR(hBW,NEL,NMATTY) 00001730
CCMMCN XC~21,21~,YC~21,21~,TEHP~21,21~,THK(21121~,NN~21,21~, 00001740
1~RC:~S,NCCL,IN,IC,IP,h'CON~200,8~,NU~lEL,N8,NCN,IDIFF,IRENUH,00001750
2IP1,JNT~541~,~E~JT~lO584~,J~E~~44l~,N~,NSE,HAXCCN,MEM, OOOOli60
568 L L. DUR~CHER and A GASPER

3SENJT(441),JOINT(44l)rNJT,tlAT~ZOO),JRN, 00001770
4NP01l1~20~,NCOL1~20~,IND11~20~,NMAT~20~,NOP~20,8~, 00001780
5XP(100,2),YP~100,2),X1~03(441,2),YN00(441,2), 00001790
6INRG,INSP,ITYPE,ITMP,ITHK 00001800
DIMENSION NE(441),NR(9) 00001810
EQUIVALENCE (MEMJT(l),NE~l)) 00001820
K=l 00001830
DO 10 I=l,NROWS 00001840
00 10 J=l,NCOL 00001850
NE(K)=NNII,JI 00001860
10 K=K+l 00001870
L=NROWS-1 00001880
DO 90 I=l,L 00001890
DO 90 J=2,NCOL 00001900
NP(l)=NCOL *IiJ-1 00001910
NR(2):NCOL *I+J 0000192C
NR(3)=NCOL *(I-l)+J 00001930
NR(4)=NCOL *(I-l)+J-1 00001940
IF (ITYPE.EQ.l)GO TO 20 00001950
NEL=NELtl 00001960
IF (NEL.GT.MEM)GO TO 70 00001970
GO TO 60 00001980
20 OIAG1=SQRT~~XC~I,J~-XC~I+l,J-l~~**2+~YC~I,J~-YC~I+l,J-l~~**2~ 00001990
DIAG2=SORT~~XC~I+1,JI-XC~I,J-l~~**2+~YC~I+l,J~-YC~I,J-l~~**2~ 00002000
DO 50 IJ=1,2 00002010
NEL=NEL+l 00002020
IF [NEL.GT.MEM)GO TO 70 00002030
IF ((DIAGl/DIAG2).GT.1.02)
GO TO 30 00002040
Jl=NR(l) 00002050
J2=NR( IJ+l) 00002060
J3=NR(IJ+2 1 00002070
GO TO 40 00002080
30 Jl=NRt IJ 1 00002090
J2=NR( IJ+l) 00002100
JS=hR(B) 00002110
40 CONTINUE 00002120
NCON(NEL,l)=NE( Jl) 00002130
NCON(NEL,2)=NE(J2) 00002140
NCCN(NEL,3)=NE(J3) 00002150
PlATtNEL )=NMATTY 00002160
50 CONTINUE 00002170
GO TO 90 00002180
60 Jl=NR(l) 00002190
JZ=NR(2) 00002200
J3=NQ(3) 00002210
J4=NR(4) 00002220
NCON(NEL,l)=NE(Jl) 00002230
NCON(NEL,2)=NEtJ2) 00002240
NCON(NEL,3)=NE(J3) 00002250
NCON(NEL,4)=NE(J4) 00002260
tlAT(NEL)=NHATTY 00002270
GO TO 90 00082280
70 k?ITE (10,801 00302290
80 FORMAT(lSX,'NUMBEROF GENERATED ELEMENTS EXCEEDS ALLOWABLE', 00002300
1 /lSX,'PROGRAH TERHINATED' 1 00002310
STOP 00002320
90 CONTINUE 00002330
RETURN 00002340
END 00002350
SlJaROUTINE
MESH 00002360
COMMON XC~21,21~,YCI21,21~,TEnPorTHK(21121~,NN~21,21~, 00002370
lt~ROWS,NCOL,IN,IO,IP,NCON~2OO,8~,NUHEL,N8,NCN,IDIFF,IRENU~, 000023G0
2IPl,JNT~441~,HEHJT~lO584~,J~Efl~44l~,NH,NSE,MAXCON,MEH, 00002390
3NEWJT(441),JOINT~44l~,NJl,llAT(200),JRN, 00002400
4NROW1~20~,NCOL1~20~,IND11~20~,NnAT~20l,NOPt20r8~, 00002410
5XP~100,2),YP(100,2),XNOD(441,2)rYNUD(441,2), 00002420
6INRG,INBP,ITYPE,ITMPIITHK 00002430
DIMENSION THPRGN(8),THKRGN(81 00002440
DIMENSION XRG(9),YRG(S),SF(8),NDN(B) 00002450
DIMENSION NNRB(20,4,21),JT1(20,4) 00002460
DIMENSION ICOflP(494) 00002470
DATA ICOMP/-l,l,l,-l,l,-l,-l,l,l,-l,-1,1,-1,1,1,-l/ 00002480
N6W=O 00002490
NB=O 00002500
A versatile twodnnenslonal mesh generator with automatic bandwldth reduction 569

NEL=O 00002510
DO 10 I=l,NSE 00002520
10 JTl(I,J)=O 00002530
DO 20 I=l,NH 0000254@
DO 20 J=l,NM 00002550
XC(I,J)=O.O 00002560
YC(I,J)=O.O 00002570
THK(I,J)=O.O 00002580
TEMPfI,J)=O.O 00002590
20 NN(IpJ)=O 00002600
DO 30 Il=l,INRG 00002610
DO 30 J1=1,4 00002620
Yll=(Jl-1)*2+1 00002630
Nl=N@P(Il,I111 00002640
IF(Xll.Eq.7) 111=-l 00002650
N3=NOP(I1,111+2) oooo26bo
DO 30 Kl=l,INRG 00002670
IF IKl.EQ.111 GO TO 30 0000~680
DO 30 Ll=lr4 00002690
L11=(L1-11*2+1 00002700
NCl=:~OP(Kl,Lll) 00002710
IF(Lll.EQ.7) Lll=-1 00002720
NC3=KOP(Kl,Lllt21 00002730
IF(Nl.EQ.NC3.AND.N3.E9.NC1) JTl(Il,Jll=KI 00002740
30 CONTINUE 00002750
WRITE (10,401 00002760
40 FOR!lATf//lX,'INPUTCONNECTIVXTYDATA'/ 00002770
llX,'REGION SIRE 1 2 3 4'/) 00002780
DO 50 I=l,INRG 00002790
50 WRITE (10,60)1,(J11(1,J),J=1,4) 00002800
60 FORMAT~ZX,I3,14X,4(12,5X)1 00002810
h'RITE(10,701 00002820
70 FORMAT(/‘ INPUT REGION IN~OR~ATI~'l 00002830
WRITE (10,801 00002840
80 FORtlATIr“ REGION RO'clSCOLUNNS flATERIAt'r7X,'BOUNDARY
NUDES'/1 00002850
DO 410 KK=l,INRG 00002860
NRG=KK 00002870
N!?OWS=NROWl(KK) 00002680
NCOL=NCOLl(KK) 00002890
t;~ATTY=~~AT(KK) 00002900
DO 90 11=1,8 00002910
90 NDN(Ilf=EtCPfKK,Ilf 00002920
IF(Ib!DllfKK).EQ.2)NSNCN=4 00002930
fF~INDll(KK).EQ.l)NSNCN=8 000029*0
IF (ITYPE.EQ.1.0R.ITYPE.EQ.Z) GO TO 100 00002950
GO TO 110 00002960
100 E,?OI~IS=t:RclWSt1 00002970
b'*OL=NCOLtl
" 00002980
GO TO 120 00002990
110 G'?OWS=Z*NRCWStl 00003000
NCOL=t*NCOL+l 00003010
120 CONTINUE 00003020
130 FORMAT~1X,I4,5X,13,4X,I3,4X,I5,5X,8I5) 00003030
IF (NSNCN.EQ.41GO TO 140 00003040
WRITE ~I0,130fNRGtNROWlfNRGf,NCOL1~MG~,NMATTYtINON~fl,1=1,8l 00003050
GO TO 150 00003060
140 CONTINUE 00003070
WRITE ~I0~130~NRG~NROWl~NRG~~NCOL1~'NRGl~NHATTY~~NDNfID~~ID~1~7r2~ 00003080
150 CONTINUE 00003090
IF (NROWS.GT.NM.OR.NCOL.GT.Nn) WRITE (10,160) 00003100
160 FORMAT(//5X,'NUt!BEP OF SUBDIVISIONS IN A SUPERELEIIENT EXCEEDS’, 00003110
1 5Xz’ALLOWABLE FROGRAtl TERttINATED’) 00003120
ZF ~NROWS.GT.N~.OR.WCOL.GT_~t~) STOP
-. _. 00003130
C GENERATION OF TXE ELEkiENTNODAL COORDINATES 00003140
DO 200 I=lr8 00003150
IF (NSNCN.NE.4)GO TO 190 00003160
IF (I.EQ.1.0R.I.EQ.3.0R.I.EQ.5.OR.I.EQ.7~ GO TO 190 00003170
IS=NON(I-1) 00003180
IF Il.EQ.81 GO TO 170 00003190
IE=NDN(I+ll 00003200
GO TO 180 00003210
170 IE=NDN(1) 00003220
180 CONTINUE 00003230
T~PRGN(I1=(XP(IS,21tXP(IE12)1/2. 00003240
570 L L DUROCHER and A GASPER

THKRGN(I)=(YP(IS,Z)+YP[IE,2))/2. 00003250
XRG(I)=(XP(IS,l)+XP(IE,1))/2. 00003260
YRG(I)=(YP(IS,1)+YP(IE,ll~/2. 00003270
GO TO 200 00003280
190 CONTINUE 00003290
II=NDH(I) 00003300
TtlPPGN( I )=XP( II, 2 1 00003310
THKRGN(II=YP(II,21 00003320
XRG( I i=XP( II, 1) 00003333
YRG( I )=YP( II ,l 1 00003340
200 CONTINUE 00003350
TR=NROWS-1 00003360
DETA=Z./TR 03003370
TR=NCOL-1 00003380
DSI=2./TR 03003300
C GENERATION OF THE REGION NODE NUMBERS oooo3~co
KNl=l 00003410
KSl=l oooo34;o
KN2=NROWS 00003430
KSZ=NCOL 00003440
DO 200 1=1,4 00003450
NRT=JTl(NRG,II 00003460
IF (NRT.EQ.NRG) WRITE (10,210) 00003470
210 FORMAT(lSX,‘IN?UT ERROR IN CONNECTIVITY, PROGRAM TERMINATED’) 00303*80
IF (NRT.EG.N’?G) STOP 00003r90
IF (NRT.EG.O.OR.biRT.GT.NRG) GO TO 280 00003500
DO 220 J=1,4 00003510
220 IF(JTl(NRT,J).EG.NRG) NRTS=J 00003520
K=NCOL 00003530
IF(I.EQ.2.OR.I.EG.4) K=NROWS 00003540
JL=l 00003550
JK=ICOMP( I ,NRTS 1 00003560
IF(JK.EQ.-1) JL=K 00003570
DO 270 J=l,K 00003590
GO TO (230,240,250,260),1 00003590
230 NN(NROWS,J)=NNRB(NRT,NRTS,JL) 00003600
KN2=NROWS-1 00003610
GO TO 270 00003620
240 NN( J,NCOLI=NNRB(NRT,NRTS,JL) COO03630
KS2=NCOL-1 00003640
GO TO 270 00003650
250 NN(l,J)=NNRBtNRT,NRTS,JL) 00003660
KN1=2 00003670
GO TO 270 00003680
260 NN(J,l)=NNRB(NRT,NRTS,JL) 00003690
KS1=2 00003700
270 JL=JL+JK 00003710
280 CONTINUE 00003720
IF (KNl.GT.KN2) GO TO 390 00003730
IF (KSl.GT.KS2) GO TO 390 00003740
DO 360 I=KNl,KNZ 00003750
TR=I-1 00003760
ETA=l.-TR*DETA 00003770
00 360 J=KSl,KSP 00003780
IF (ITYPE.NE.5) GO TO 290 00003790
Cl=MOD(I,2l 00003800
C2=flOD( J,2) 00003310
IF (Cl.EQ.O.O.AN’J.C2.EG.O.O~ GO TO 360 00003820
290 TR=J-1 00003830
SI=-l.+TR*DSI 00003840
SF(1)=-0.25*I1.-SIl*(1.-ETAI+(SI+ETA+l.) 00003350
SF(2)=0.50+(1.-SI**2)*(1.-ETA) 00003860
SF(3)=0.25*(l.+SI)*(l.-ETA)r[SI-ETA-l.1 00003870
SF(4)=0.50*(l.+SI)*(l-ETA**21 00003880
SF(5)=0.25*(l.+SI)*(l.+ETA)*(SI+ETA-1.) 00003G90
SF(6)=0.50*(1.-SI**E)w(l.+ETA) 00003900
SF(7)=0.25*(1.-SI)*(l.+ETA)w(ETA-SI-1.1 00003910
SF(8)=0.50*(1.-SI)*tl.-ETA**21 00003920
XC(I,J)=O.O 00003930
YC(I,J)=O.O 00003940
TEMP(I,J)=O.O 00003950
THK(I,J)=O.O 00003960
DO 300 K=1,8 00603970
XC(I,Jl=XC(I,J)+XRG(K)*SFtK) 00003980
A ~~rsatlle twodmnsmal mesh generator mth automatic bandwldth reduction 571

300 YC(I,J)=YC(I,J)+YRGIK)wSF(KI 00003990


IF (ITMP.EQ.01 GO TO 320 00004000
DO 310 K=1,8 00004010
310 TEMP(I,J~=TEflP(I,J)+THPRGN[K)wSF(KI 00004020
320 IF (ITHK.EQ.0)GO TO 340 00004030
DO 330 K=1,8 00004040
330 THK(I,J)=THK(I,J)+THKRGN(K)*SF(K) 00004050
340 CONTINUE 00004060
NS=NBtl 00004070
IF (NB.GT.NJT)WRITE (10,350) 00004080
350 FORHAT(15X,'NUflBER OF GENERATED NODES EXCEEDS ALLOWABLE’, 00004090
1 /lSX,‘PROGRAM TERMINATED’ 1 00004100
IF (NB.EQ.NJT) STOP 00004110
YNCD(NB,2)=THK(I,J) 00004120
XNOD(N8,2)=TEMP(I,J) 00004130
XNOD(NS,l)=XC(I,J) 00004140
YNOD(NB,l)=YC(I,J) 00004150
NN(I,J)=NB 00004100
360 CONTINUE 00004170
C STORAGE OF THE BOUNDARY NODE NUMBERS 00004180
DO 370 I=l,NCOL 00004190
NNRB(NRG,l,I)=NN(NROWS,I) 00004200
370 NNRB(NRG,3,I)=NNfl,I) 00004210
DO 380 I=l,NROWS 00004220
NNRB(NRG,2,I)=NN(I,NCOL) 00004230
380 tM?S(NRG,4,I)=NN(I,l) 00004240
390 IF(ITYPE.EQ.l.OR.ITYPE.EQ.2) CALL LINEAR(NBW,NEL,NHATTY) 00004250
IF~ITYPE.EQ.3.0R.ITYPE.EQ.4.OR.IlYPE.EQ.5~ CALL QUADfNBW, 00004260
lNEL,NtlATTY) 00004270
NUHEL=NEL 00004280
400 CONTINUE 00004290
410 CONTINUE 00004300
IF(ITYPE.EQ.l)NCN=3 00004310
IF(ITYPE.EQ.2)NCN=4 00004320
IF(ITYPE.EQ.3.0R.ITYPE.EQ.4) NCN=6 00004330
IF(ITYPE.EQ.5)NCN=8 00004340
IF (ITYPE.NE.4)GO TO 430 00004350
D3 420 J=l,NU;IEL 00004360
XNOD~NCON~J,4~,1~=fXNOD~NCON~J,l~,1~tXNODINCON~J,2~,1~~/2. 00004370
YNOD~NCON~J,4~,1~=~Yt;3D~NCON~J,1~,1~tYE;DD~NCON~J,2~,l~~/2. 00004380
XNOD~NCOt~lJ,5~,1~=~XNOD~NCON~J,2~,1~+XNOD~NCON~Jr3~,1~~/2. 00004390
YNOD~NCONIJ,5~,1~=~YNOD[NCON~J,2~,l~tYNDD~NCON~J~3~~l~~~2. 00004400
XN03~NCON~J,6l,l~=~XN3D~NCON~J,3~,1~tMCD~NCONfJ,1~,1~~/2. 00004410
420 YNOD~NCONLJ,6~,1~=~YNOD~NCON~J,3~,l~+YNOD~NCON~J,l~,l~~/2. 00004420
430 RETURN 00004430
END 00004440
SUBROUTINE OPTNUH 00004450
CO:lIlON XCL21,21~,YC~21,21~,TEflP~21,21~,THK~21,21~,~~21,21~, 00004460
1NROI~S,NCOL,IN,IO,IPrNCON~200,8~,NU~EL,NB,NCN,IDIFF,IRENUH, 00004470
2IPl,JNT~44l~,HE~JT~lO584~,JMEH~441~,N~,NSE,HAXCON,HEM, 00004480
3NEWJT(441),JOINT(44l~,NJl,tlAT(2OO),JRN, 00004490
4t~R0:!1~20~,NCOL1~20~,ISD11~20~,NHAT~20lrNOP~20,8~, 00004500
5XP(100,2),YP(100,2),XNOD1441,21,YNOD~441,2)r 00004510
61NRG,ItiBP,ITYPE,ITHP,ITHK 00004520
EGUIVALENCE ~NCON~1,1~,JT~1~~,~IW,IO~,IIR,IN~ 00004530
EQUIVALENCE (NPrN3,NUPlNP),(NE.NEL.NUttEL) 00004540
DItlENSION JT( 16001 00004550
JRN=l 00004560
NNCDE =NCN 00004570
MIN?lAX=IOIFF 00004580
DO 70 IK=l,NUnNP 00004590
DO 10 J=l,NUflNP 00004600
JOINT(J)=0 00004610
10 NEWJT(J)=O 00004620
MAX=0 00004630
1=1 00004640
NEWJT( 1 )=IK 00004650
JOINT( IK )=l 00004660
K=l 00004670
20 K4=JMEil( NEWJTf I) 1 00004680
IF (K4.EQ.O) GO TO 40 00004690
JSJB=(NEWJT( 11-l )*MAXCON 00004700
CO 30 JJ=l,K4 00004710
K5=PiitlJT( JSUStJJ) 00004720
572 L L DUROCHER and A GASPER

IF (JOINT(K51.GT.O) GO TO 30 00004730
K=K*l 00004740
NEWJT(Kt=KS 00004750
JOIttT(KS)=K 00004760
t!DIFF=IABS(I-Kt 00004770
IF (GDIFF.GE.tlINtiAX) GO TO 70 00004780
IF1NDIFF.GT.MAX) MAX=NDIFF 00004790
30 CONTINUE 00004800
IF (K.EP.NUtlNPt GO TO 50 00004810
40 1=1+1 00004820
GO TO 20 00004830
50 flINHAX=HAX 00004840
DO 60 J=l,NU?lNP 00004550
60 JNT(J)=JOINT(Jt 00004860
70 CONTINUE 00004870
IF ~MINMAX.LT.IOIFF)GO TO 90 00004880
JRN=O 00004890
WRITE (IW,80) 00004900
80 FORMAT(/SX,'ORIGINAL-NUMDERING SCHEME RETAINED'/ 00004910
lSX,'SEMI-BANDWITH REMAINS THE SAHE'/t 00004?20
GO TO 150 00004930
90 IDIFF=tlINtlAX 00004940
L!?ITE(IW,lOO)IDIFF 00004950
100 FORtlAT(/SX,'NODE DIFFERENCE AFTER RENUtiBERING=',I4//) 00004950
DO 110 I=l,NUtiNP 00004970
110 JMEtlIJNT(I))=I 000049E0
IF (IPl.EQ.0)GO TO 150 00004990
WRITE (IW,l20) 'j0005000
WRITE (IW,130) 00005010
WRITE (IW,140)(I,JNT(It,I=l,NUtlNPt 00005020
URITE (IW,l20) 00005030
120 FORMAT(lHOt 00005040
130 FORt:AT(SX,'t:ODAL RENUtlBERING'//S(' OLD NEW'rSXl) 00005050
140 FORPlAT(5(215,5X1t 00005060
150 CONTINUE 00005070
RETURN 00005080
END 00035090
SUBROUTINE OUTPUT 00005100
COMlON XC~21,21~,YC~21,211rTEMP~21,21~,THK~21,21~,NN~21,21~, 00005110
lN?OWS,NCOL,It~,IO,IP,NCON~200,8t,NUMEL,NB,NCN,IDIFF,IRENUM, 00005120
2IP1,JNT~441~,ME~JTIlO584t,JHE~~44l~,N~,NSE,MAXCON,HEM, 00005130
3NEWJT(441),JOIt~T(441t,NJT,tlAT(2OO),JRN, 00005140
4~ROW1~20~,NCOLl~20~,I~~ll~2O~,N~AT~2O~,NOP~2O,8~, 00005150
5XP~100,21,YP(100,21,XN00(441,2),YNCD(441,2t, 00005100
6INRG,INBP,ITYPE,ITHP,ITHX 00005170
WRITE (IP,lO)NB,NUtlEL,NCN,IDIFF 00005180
10 FCRt?AT(SX,415) 00005190
IF (IRENUM.EQ.l) GO TO 30 ooco5:oo
WRITE (10,201 00005210
20 FORMAT(lHl///lSX,'ORIGINAL NUtlBERINGSCHEME') 00005:20
GO TO 50 00005230
30 KRITE (10,401 00005240
40 FORMAT(1H1///15X,'OPTItlUH NUMBERING SCHEHE') 00005250
50 WRITE (10,601 00005260
60 FORMAT~3X,'t~ODE',11X,'X-COORD',8X,'Y-COORD',4X,'TEHPERATURE',00005270
14X,'THICKNESS',/t 00005:66
DO 70 J=l,NB 00005290
K=J 00005300
IF (IRENUM.EQ.l)K=JtlEtl(J) 00005310
WRITE ~IOr80~J,XtIOD~Krll,YNCD~K,1~,XNOD~Kr2~,YNOD~Kr2l 03005320
70 WRITE (IP,8O)J,XNOD(K,1),YNOD~K,l~,XNOD(K,2t,YNOD~K,2t 00005330
80 FOCtlAT(5X,I5,4(5X,F10.5)) 000053r0
KRITE (10,90) 00005350
90 FCRtl4T~///5X,'ELE~ENT',5X,'HATERIAL',lOX,'NODES'/~ 00005300
DO 120 J=l,t:UtlEL 00005370
K=J 00005380
IF (IRENUN.EP.0) GO TO 100 00505390
MITE (IO,11O)K,tlAT~Kl,(JNT(NCON(K,L)),L=l,NCNt 00005400
WRITE (IP,llOtK,MAT(Kt,~JNT(NtON(K,L)),L=l,NCNt 00005410
GO TO 120 00005420
100 WRITE ~IO,1lOtK,MAT(Kt,(NCONO,L=1,NCN) 00005430
WRITE (IP,1lO)K,tlAT(Ktr(NCONO,L=1,NCN) 00005440
110 FORttAT(5X,I5,5X,I5,lOX,915t 00005450
120 CONTINUE 00005460
A versatile two-dlmenslonal mesh generator with automatic bandwtdth reductmn 573

IF (IRENUM.EQ.0) GO TO 140 00005470


NRITE (10,130)IDIFF 00005480
130 FORtlAT(//15X,'HAXIMUfl NODE DIFFERENCE= ',I41 00005490
140 RETURN 00005500
END 00005510
SUBROUTINE QUAD(NGW,NEL,NMATTY) 00005520
COfitiON XC~21,21~,YC~21,21~,TEHP~21,21~,THK~21,21~,NN~21,21~, 00005530
lNROWS,NCOL,IN,IOrIP,NCON~200,8~,NU~EL,NB,NCN,IDIFF,IRENUM, 00005540
2IP1,JNT~441~,ME~JT~lO58~~,JflE~~44l~,NM,NSE,HAXCON,ME~, 00005550
3t~EWJT(441),JOINT(44l~,NJT,MAT~2OO),JRN, 00005560
4NROW1~20~,NCOL1~20~,INDll~2Ol,NMAT~2Ol,NOP~2O,8~, 00005570
5XP(100,2),YP(100,2),XN0D(441,2),YN00~441,2~, 00005580
6IN?G,IN3P,ITYPE,ITMP,ITHK 00005590
DIMENSION NE(441),NR(91 00005600
EQUIVALENCE (MEtlJT(l),NE(l)) 00005610
K=l 00005620
DO 10 I=l,NROWS 00005630
DO 10 J=l,NCOL 00005640
NE(K)=NN(I,J) 00005650
10 K=K+l 00005660
L=(NROWS-1)/2 00005670
LL=NCOL-1 00005680
00 90 I=l,L 00005690
DO 90 J=2,LL,2 00005700
NR(1)=2*NCOL*I+J-1 00005710
NR(2)=2*NCOL*I+J 00005720
NR(3)=2*NCOL*ItJtl 00005730
NR(4)=NCOL*( 2*1-lltJt1 00005740
NR(5)=t~COL*(2*I-1)-(NCOL-l)tJ 00005750
N9(6)=t:COL*(2*1-11-t NCOL-l)tJ-1 00005760
NR(7)=NCOL*~2*I-l)-(NCOL-l~tJ-2 00005770
NR(B)=NCOL*(2*1-l)tJ-1 00005780
NR(9l=NCOL*(2*1-1)tJ 00005790
IF (ITYPE.EQ.3.0R.ITYPE.EQ.4) GO TO 20 00005800
NEL=NELtl 00005810
IF (NEL.GT.MEtl) GO TO 70 00005820
GO TO 60 00005030
20 11=(2*1-l) 00005840
DIAG1=S~RT~~XC~II,Jtl~-XC~IIt2,J-l~~**2t~YC~II,Jtl~-YC~IIt2,J-l~~
00005850
1**21 00005850
DIAGZ=SPRT~~XC~IIt2,Jtl~-XC~II,J-l~~**2t~YC~IIt2,Jtl~-YC~II,J-l~~
00005870
1**21 00005880
IK=l 00005890
IL=1 00005900
DO 50 IJ=1,2 00005910
NEL=NELtl 00005920
IF (NEL.GT.HEtl) GO TO 70 03005930
IF ((OIAG1/DIAG2).GT.1.O2)
GO TO 30 00005940
Jl=NR(IL) 00005950
J?=t:R(ILt2) 00005960
J3=NR(IKt4) 00005970
J4=NR( IL*11 00005980
J5:NRL ILt3) 00005990
J6=NR(9) 00006000
GO TO 40 00006010
30 Jl=NR(IKt6) 00006020
J2=td')(IL) 00006030
J3=t:R( IL+21 00006040
Jr-NR(IKt7) 00006050
JS=t:R( ILtll 00006060
J6=NR(9) 00006070
40 CONTINUE 00006080
IL=ILt4 00006090
IK=IK-4 00006100
KCON(NEL,l)=NE(Jl) 00006110
NCON[NEL,2)=NE(J2) 00006120
NCON(NEL,3)=NE(J3) 00006130
NCGN(NEL,4)=NE(J4) 00006140
NCON(NEL,5)= NE(J5) 00006150
NCON(NEL,6)= NE(J61 00006160
MAT(NEL)=NHATTY 00006170
50 CGNTINUE 00006180
GO TO 90 00006190
60 Jl=NR(l) 00006200

CAS Vol 10 No 4-B


574 and A
L L DUROCHER GASPER

JZ=NR( 2) 00006210
J3=NR( 3) 00006220
J4=NR(4) 00006230
JS=NR( 5 1 00006240
J6=NR16) 00006250
J7=NR( 7) 00006260
JB=t:R(B) 00006270
NCON(NEL,l)=NE(Jl) 00006280
NCON(NEL,L)= NE(J2) 00006290
NCON(NEL,3)=NE(J3) 00006300
NCOtHNEL,4)= NE(J4) 00006310
NCON(NEL,5)=NE(J5) 00006320
NCON(NEL,6)=NEtJ6) 00006330
NCON(NEL,7)= NE( J71 00006340
NCON(NEL,B)=NE(J8) 00006350
HATtNELI=NMATTY 00006360
GO TO 90 00006370
70 NRITE (10,801 00006380
80 FORMAT(15X,'NUMBEROF GENERATED ELEMENTS EXCEEDS ALLOWABLE', 00006390
1 /15X,'PROGRAtl TERMINATED'1 00005400
STOP 00006410
90 CONTINUE 00006420
RETURN 00006430
END 00006440
SUBROUTINE RENtlBR 00006450
CCtiilON XC~21~21~~YC~21~21~~TEHP~21~21~~THK~21~21~~NN~21~21~~ 00006460
lNROWS,NCOL,IN,IO,IP,NCON~2OO,8~,NUMEL,NB,NCN,IDIFF,IRENUM, 00006470
2IP1,JNT~44l~,~E~JTIlO584~,JnEn(44l~,NH,NSE,NAXCON,HEM, 00006480
3NEWJT(441),JOINT(44l~,NJT,HAT(2OO~,JRN, 00006490
4NROl~l~20~,NCOL1~20~,IND1l~20~,N~AT~20~,NOP~20,8~, 00006500
5XP(100,21,YP(100,2),XN00(441,2),YN00(441,2~, 00006510
6INRG,INBP,ITYPE,ITNP,ITHK 00006520
EQUIVALENCE (NCON(1,1),JT(l)I,IIW,IO),(IR,IN) 00006530
EQUIVALENCE tNP,NB,NUtlNPtr(NE,NEL,NUMELt 00006540
DItlENSIONJT11600) 00006550
NNODE=NCN 00006560
DO 10 I=l,NJT 00006570
JNTtI)=O 00006580
JHEtllI)=O 00006590
10 CONTINUE 00006600
I~=NJTWIA~CON 00006610
DO 20 I=l,IJ 00006620
20 tlEtlJT(It=O 00006630
DO 70 J=l,NUMEL 00006640
DO 60 I=l,NNODE 00006650
JNTI=JT(MEtl*(I-l)+J) 00006660
IF (JNTI.EQ.0)GO TO 70 OOCOa670
JSUB=(JNTI-lt*?lAXCDN 00006680
DO 50 II=l,NNODE 00006690
IF (II.EQ.1) GO TO 50 00006700
JJT=JT(tlEM*(II-l)+J) 00006710
IF (JJT.EQ.0) GO TO 60 00006720
MEHl=JtlEtl(JNTII 00006730
IF (MEMl.EQ.0)GO TO 40 00006740
DO 30 III=l,MEtl1 00006750
IF (tlEtlJT( JSUB+III).EQ.JJT)GO TO 50 00006760
30 CONTINUE 00006770
40 JMEH(JNTI)=JMEM(JNTI)+1 00006i80
tlEMJT(JSUB+JHEM(JNTI~~=JJT 00006790
IF(IABS(JNTI-JJTt.GT.IDIFF) IDIFF=IABS(JNTI-JJTt 00006800
50 CONTINUE 00006810
60 CCNTINUE OOOOe820
70 CONTINUE 00006830
WRITE (IW,BO)IDIFF 00006340
80 FORMAT(//5X,'ORIGINALNODE DIFFERENCE’,I4//1 00006850
CALL OPTNUII 00000860
90 RETURN 00006870
END 00006a80
SUBROUTINE REORDR(NOP,INRG,ICROSS) 00006890
DIMENSION NOP(20r8),IUSE0(20t,ICROSS(2O),NOOE(4t 00006900
DO 10 I=l,INRG 00000910
10 IUSED( 00006920
IUSED(l 0000b930
ICROSS(lt=l 00006940
A versatde
tw~t~nston~l
meshgeuerator
wtthauto~~e~ndwtdth
reductton

KT=2 00006950
DO 30 I=l,INRG 00006960
NDDEtl~=NOPfICROSStI),l) 00006970
NODEtZf=NOPtICROSStIf,31 00006980
NODEt3)=NDPtICROSStI),5) 00006990
NODEt4)=NDPtICROSStI),f) 00007000
DO 30 J=Z,INRG 00007010
IF tIUSEDtJi.LT.0)GO TO 30 00007020
r-t=0 0000?030
DO 20 K=1,8,2 00007040
DO 20 t=1,4 ooooio5o
= ICROSS 00007060
Ii=1 00007070
20 IF ~NOP~J,K~~EQ.~DEIL~.AND.IUSED~J~.Gl~O~
H=M+l 000070~0
IF tH.Gl.Il.AND.J.NE.IC)ICRDSStKTI=J 00007090
IF fM.GT.Il.AND.J.NE.IC)Kf=KTil 00007100
30 XF tM.GT.Il.AND.J.NE.ICffUSEOtJl=-1 00007110
RETURN 00007120
END 00007130

You might also like