Sei sulla pagina 1di 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 FLACs 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 les supplied with FLAC. These les have the extension .FIN (for Fish INclude le); they
provide symbolic names for sizes and offsets and current numerical values (which may change in
future versions of FLAC).* The .FIN les serve two purposes: rst, they document the meanings
of the various data items; second, the les may be CALLed from a data le they automatically
execute and dene 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 symbols provided in the
.FIN les. 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 lenames for each type of data
structure.
Table 4.1 Global pointers and include lenames
Global pointer Filename Data structure
app pnt app.n lists of APPLY data
att pnt att.n lists of ATTACHed points
ieb pnt ieb.n data associated with IEB
int pnt int.n interface list data
str pnt str.n structural data
trac pnt trk.n data associated with TRACK logic
udm pnt udm.n user-dened model data
By calling .FIN les, 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 le.
* The .FIN les are contained in the \FISH\FIN directory.
FLAC Version 4.0
4 - 2 FISH in FLAC
4.2 Example .FIN File
The form of data in a .FIN le is illustrated in the following example, which lists the contents of
INT.FIN.
Example 4.1 Interface structure le 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 ;Control block (one for each interface)
$nwindi = 21 ;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 = 15 ; Dilation angle
$kicxxx = 15 ; Unused
;Node block
;----------
; 0 Link to next node block
$kidext = 1 ;Spare extension (can be used by FISH)
; ----- grid connection ----- ----- beam connection ----
$kidi = 2 ;I index of associated g.p. ID of structural node
$kidj = 3 ;J index of associated g.p. = 0 for beam connection
$kidadd = 4 ;Address of g.p. Address of structural node
$kidfn = 5 ;Normal force
$kidfs = 6 ;Shear force
FLAC Version 4.0
PROGRAM GUIDE 4 - 3
$kidun = 7 ;Unit normal vector (2 words)
; = 8 "
$kidslf = 9 ;1 if slipping; 0 if not
$kidseg = 10 ;Pointer to nearest opposing node block
$kidrlk = 11 ;Reverse node pointer ("down" if material is to right)
$kidbfl = 12 ;Bond flag: 1 if tension bond unbroken; 0 if broken
$kidrat = 13 ;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 " " " "
$kidlen = 14 ;Effective length of contact
$kidsxx = 15 ;Initial xx-stress
$kidsxy = 16 ;Initial xy-stress
$kidsyy = 17 ;Initial yy-stress
$kidx = 18 ;X coordinate; for plotting purposes only - updated
; infrequently
$kidy = 19 ;Y coordinate - ditto -
$kidass = 20 ;Accumulated shear slip (used for dilation)
$kidasd = 21 ;Accumulated relative shear displacement (marker only)
$kidand = 22 ;Accumulated relative normal displacement (marker only)
end
$int fin
In order to illustrate the way this le 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 le
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 4.0
4 - 4 FISH in FLAC
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 4.0

Potrebbero piacerti anche