Table_Fish_Function from FLAC3D 7.0 to FLAC3D 6.0

Hello, everyone!

Does anyone know what the command line for '[table.as.list(‘X-Vel’) = table.integrate(‘X-Acc’)] in FLAC3D 7.0 to FLAC3D 6.0? I need a help!!

;converting acceleration to velocity in FLAC3D 6.0.
Thank you

I haven’t used v6, but its possible the equivalent FISH command does not exist. If you don’t find it, then perhaps look at the FLAC 8.1 documentation. I remember there being a FFT.fis and INT.fis functions for doing fast-fourier transforms and integration in the “General Steps for Dynamic Analysis” section. Perhaps you could make your own in v6.

1 Like

Are you talking about converting acceleration to velocity?
Then you can do it like this!
It’s so simple.

;;--------for flac3d ver 6.0----------------------
program call ‘D-Prep.f3fis’

;input motion, prototype scale in (g), corrected accelerogram, considered as rock outcrop motion
table ‘100’ import ‘M3_S1.acc’
@G_cor(100,9.81) ; change unit G to m/s^2
@integrate(100,200) ; velocity history will be stored to the table 200

;;------------------------ D-Prep.f3fis ---------------------------
;Name: integrate
;Purpose: Integrate a table
;Diagram:
;Arguments: int_in/int/1/table with original data
; int_out/int/2/table with integration
;Note: This routine will integrate a table, outputting another table
;Note: containing the integration. The resulting table will have the
;Note: same number of points as the original.
;
fish define integrate(int_in,int_out)
local ii = table.delete(int_out)
local outp = table.get(int_out)
local inp = table.get(int_in)
local nitem = table.size(inp)
;
local vold = table.value(inp,1)
local val = 0.0
table.value(outp,1) = vector(comp.x(vold),val)
loop ii (2,nitem)
local vnew = table.value(inp,ii)
val = val + 0.5*(comp.y(vold) + comp.y(vnew))*(comp.x(vnew)-comp.x(vold))
table.value(outp,ii) = vector(comp.x(vnew),val)
vold = vnew
end_loop
end
;
fish define G_cor(t_no,s_ca)
local ii_ = 1
local nt_ = table.size(t_no)
dt_ = table.x(t_no,2)-table.x(t_no,1)
dur_ = nt_*dt_
loop while ii_ <= nt_
table.y(t_no,ii_) = table.y(t_no,ii_)*s_ca
ii_= ii_+1
endloop
end

3 Likes