Вы находитесь на странице: 1из 4

PROGRAM GUIDE

4-1

4 PROGRAM GUIDE
4.1 Linked-List Sizes and Offsets
As mentioned in Section 2.5.7, FISH programs have access to some of FLAC s linked-list data
structures. The global pointers to these data structures are provided as FISH scalar variables. The
sizes of the various data blocks and the offsets of items within the blocks are contained in a series
of files supplied with FLAC. These files have the extension .FIN (for Fish INclude file); they
provide symbolic names for sizes and offsets and current numerical values (which may change in
future versions of FLAC).* The .FIN files serve two purposes: first, they document the meanings
of the various data items; second, the files may be CALLed from a data file they automatically
execute and define appropriate symbols. The symbols are all preceded by the $ sign, so that they are
invisible to the casual user who gives a PRINT sh command. The FISH programmer may simply
use numbers for offsets (as done in the example of Section 2.5.7), or the programmer may use the
symbols provided in the .FIN files. It is better to specify offsets in symbolic form because the
resulting FISH program will work correctly with future versions of FLAC, in which offsets and
block sizes may be different. (Every effort will be made by Itasca to retain the same symbolic
names in future versions of FLAC.)
The following list provides the names of FISH scalar pointers and file names for each type of data
structure.

Table 4.1

Global pointers and include file names

Global pointer
app pnt
att pnt
ieb pnt
int pnt
str pnt
trac pnt
udm pnt

File name
app.fin
att.fin
ieb.fin
int.fin
str.fin
trk.fin
udm.fin

Data structure
lists of APPLY data
lists of ATTACHed points
data associated with IEB
interface list data
structural data
data associated with TRACK logic
user-defined model data

By calling .FIN files, some memory overhead is incurred, since all the offsets for a particular data
structure are stored in memory; typical additional memory requirement is between 500 and 1000
words per file.

* The .FIN files are contained in the \FISH\4-ProgramGuide directory.

FLAC Version 7.0

4-2

FISH in FLAC

4.2 Example .FIN File


The form of data in a .FIN file is illustrated in the following example, which lists the contents of
INT.FIN.
Example 4.1 Interface structure file INT.FIN
def $int fin
;Interface parameters: include-file for FISH program
;-------------------;Global pointer to list of control blocks: INT PNT
;Block sizes
;----------$nwinco = 16
$nwindi = 21

;Control block (one for each interface)


;Interface node block

;Control block
;------------;
0
Link to next control block
$kicext = 1
;Spare extension (can be used by FISH)
$kicapt = 2
;Pointer to list of "A-side" nodes
$kicbpt = 3
;Pointer to list of "B-side" nodes
$kicatp = 4
;Type of A-side contact: 0 = grid; 1 = beam.
$kicbtp = 5
;Type of B-side contact: 0 = grid; 1 = beam.
$kicfri = 6
;Friction angle in degrees
$kiccoh = 7
;Cohesion (stress units)
$kicbon = 8
;Tensile strength
$kicglu = 9
;1 if glued; 0 if not
$kicid = 10 ;ID number
$kicks = 11 ;Shear stiffness (stress/disp)
$kickn = 12 ;Normal stiffness
$kictph = 13 ;Tan(friction angle)
$kicdil = 14 ;Tan(dilation angle)
$kicxxx = 15 ; Unused
;Node block
;---------;
0
$kidext = 1
;
$kidi
= 2
$kidj
= 3
$kidadd = 4
$kidfn = 5
$kidfs = 6

FLAC Version 7.0

Link to next node block


;Spare extension (can be used by FISH)
----- grid connection --------- beam connection ---;I index of associated g.p. ID of structural node
;J index of associated g.p. = 0 for beam connection
;Address of g.p.
Address of structural node
;Normal force
;Shear force

PROGRAM GUIDE

$kidun =
;
=
$kidslf =
$kidseg =
$kidrlk =
$kidbfl =
$kidrat =
;
;
;
$kidlen =
$kidsxx =
$kidsxy =
$kidsyy =
$kidx
=
;
$kidy
=
$kidass =
$kidasd =
$kidand =
end
$int fin

7
8
9
10
11
12
13

14
15
16
17
18
19
20
21
22

4-3

;Unit normal vector (2 words)


"
;1 if slipping; 0 if not
;Pointer to nearest opposing node block
;Reverse node pointer ("down" if material is to right)
;Bond flag: 1 if tension bond unbroken; 0 if broken
;Ratio of contact position:
= 1.0 ... exactly at position of opposing node
< 0.0 ... to left of opposing node (material below)
> 0.0 ... to right
"
"
"
"
;Effective length of contact
;Initial xx-stress
;Initial xy-stress
;Initial yy-stress
;X coordinate; for plotting purposes only - updated
infrequently
;Y coordinate
- ditto ;Accumulated shear slip (used for dilation)
;Accumulated relative shear displacement (marker only)
;Accumulated relative normal displacement (marker only)

In order to illustrate the way this file is used, the example of Section 2.5.7 is repeated, but with
symbolic names substituted for offsets given previously as integers. The program operation is
identical.
Example 4.2 Accessing FLACs data structure via a .FIN file
set log
set echo off
call int.fin
set echo on
g 10 11
m e
prop dens 2000 sh 1e8 bu 2e8
m n j=6
ini x add 2.5 y add -0.9 j=7,12
int 4 aside from 1,6 to 11,6 bside from 1,7 to 11,7
int 4 kn 5e8 ks 2.5e8 fric 10
set grav 10,5 large
fix x y j=1
step 1
def make list
ip = int pnt

FLAC Version 7.0

4-4

loop while ip # 0
imem(ip+$kicext) = get mem(3) ;get storage buffer
ip = imem(ip)
end loop
end
make list
def save data
while stepping
ip = int pnt
loop while ip # 0
;scan interfaces
ii = imem(ip+$kicext)
loop nside (1,2)
;scan 2 sides
caseof nside
case 1
ispt = imem(ip+$kicapt)
case 2
ispt = imem(ip+$kicbpt)
endcase
loop while ispt # 0 ;scan nodes on one side
if abs(fmem(ispt+$kidfn)) > fmem(ii) then
fmem(ii)
= abs(fmem(ispt+$kidfn))
imem(ii+1) = ispt
imem(ii+2) = step
end if
ispt = imem(ispt)
end loop
end loop
ip = imem(ip)
end loop
end
def sho data
ip = int pnt
loop while ip # 0
ii
= imem(ip+1)
s1
= max-Fn = +string(fmem(ii))+,
ig
= imem(imem(ii+1)+2)
jg
= imem(imem(ii+1)+3)
s2
=
g.p.(+string(ig)+,+string(jg)+)
s3
= at step +string(imem(ii+2))
?? = out(s1+s2+s3)
ip
= imem(ip)
end loop
end
step 500
sho data

FLAC Version 7.0

FISH in FLAC

Вам также может понравиться