flac3d中table.insert 用法用法有哪些,求帮忙总结一下

(window.slotbydup=window.slotbydup || []).push({
id: '2014386',
container: s,
size: '234,60',
display: 'inlay-fix'
&&|&&0次下载&&|&&总448页&&|
您的计算机尚未安装Flash,点击安装&
阅读已结束,如需下载到电脑,请使用积分()
下载:100积分
13人评价3页
8人评价8页
7人评价25页
9人评价81页
0人评价112页
所需积分:(友情提示:大部分文档均可免费预览!下载之前请务必先预览阅读,以免误下载造成积分浪费!)
(多个标签用逗号分隔)
文不对题,内容与标题介绍不符
广告内容或内容过于简单
文档乱码或无法正常显示
文档内容侵权
已存在相同文档
不属于经济管理类文档
源文档损坏或加密
若此文档涉嫌侵害了您的权利,请参照说明。
我要评价:
下载:100积分初学flac,求助大神。。。【flac3d吧】_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:1,693贴子:
初学flac,求助大神。。。收藏
1.本人初学Flac,在做岩石试件单轴压缩基本试验时,选用应变软化模型,为何峰值之后强度会跌落至负值?各位大神帮帮我呗~ 2.另外,Ftable,Ctable 里的塑形剪切应变具体指的是什么呢
Itasca系列产品国内专业直销,大陆区未设中间代理机构.专业技术团队提供特定需要的专业技术支持和各种培训.
楼主,你的history曲线是怎么显示出来的的?为什么我的什么也没显示?
楼主,我也有同样的问题,您现在解决了吗?现在我知道Ftable,Ctable是分别用来描述塑性变形和内摩擦角、粘聚力的函数关系(后面应变软化过程)。希望能和你探讨一下。qq:
你这是弹性模型吧
弹塑性的~~
你的是3D的吗?2D有研究吗?我的毕业设计也是岩石单轴抗压的,不过我做的2D
你的加载速率是多少 跟这个有关系
这个应力应变怎么做出来的?我的加载速度6E-7,但是怎么弄出轴向应力图啊???
猎聘网,专为经理人提供500强企业高薪职位,实时发布3d场景模型招聘信息.让经理人求职安全无忧,圆您高薪梦!
楼主有视频吗?能不能给我一份?感谢
楼主有5.0能发一份么,万分感谢了
登录百度帐号推荐应用404 - 找不到文件或目录。
404 - 找不到文件或目录。
您要查找的资源可能已被删除,已更改名称或者暂时不可用。flac3d中table用法有哪些,求帮忙总结一下_百度知道
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。
flac3d中table用法有哪些,求帮忙总结一下
我有更好的答案
rangge英文范围的意思,那么就是范围的意思在Flac3D中,你可以百度一下:Flac3D教程,我录制了一套5.0的,希望对你有帮助,请给我最佳哟,
采纳率:94%
为您推荐:
其他类似问题
换一换
回答问题,赢新手礼包当前位置: >>
flac3d手册中的fish说明(新手必看)
FLAC 3D Version 2.06-166.1FISH REFERENCEIntroduction and OverviewChapter 6 contains a detailed reference to the FISH language. Following the introduction, Section 6.2 describes the rules of the language and how variables and functions are used. Section 6.3 explains FISH statements and Section 6.4 describes how the FISH language links with FLAC 3D. Pre-de?ned FISH variables, functions and arrays are described in Section 6.5. Section 6.6 discusses extensions to FISH, the use of which generally requires a reasonable understanding of programming techniques and constructs, although FISH can be used without reference to these extensions. FISH is a programming language embedded within FLAC 3D that enables the user to de?ne new variables and functions. These functions may be used to extend FLAC 3D’s usefulness or add userde?ned features. For example, new variables may be plotted or printed, special grid generators may be implemented, servo-control may be applied to a numerical test, unusual distributions of properties may be speci?ed, and parameter studies may be automated. FISH is a “compiler” (rather than an “interpreter”): programs entered via a FLAC 3D data ?le are translated into a list of instructions stored in FLAC 3D’ the original source program is not retained by FLAC 3D. Whenever a FISH function is invoked, its compiled code is executed. The use of compiled code ― rather than interpreted source code ― enables programs to run much faster. However, unlike a compiler, variable names and values are available for
values may be modi?ed by the user by using FLAC 3D’s SET command. FISH programs are simply embedded in a normal FLAC 3D data ?le ― lines following the word DEFINE are processed as a FISH the function terminates when the word END is encountered. Functions may invoke other functions, which may invoke others, and so on. The order in which functions are de?ned does not matter as long as they are all de?ned before they are used (e.g., invoked by a FLAC 3D command). Since the compiled form of a FISH function is stored in FLAC 3D’s memory space, the SAVE command saves the function and the current values of associated variables. A summary of FISH language and intrinsic names is provided in Appendix A. 6-2FLAC 3D Version 2.06.2 6.2.1FISH Language Rules, Variables and Functions LinesFISH programs can be embedded in a normal FLAC 3D data ?le or may be entered directly from the keyboard ― lines following the word DEFINE are taken to be statements of a FISH the function terminates when the word END is encountered. A valid line of FISH code must take one of the following forms. 1. The line starts with a statement, such as IF, LOOP, etc. (see Section 6.3). 2. The line contains one or more names of user-de?ned FISH functions, separated by spaces ― e.g., fun 1 fun 2 fun 3where the names correspond to functions these functions are executed in order. The functions need not be de?ned prior to their reference on a line of FISH code (i.e., forward references are allowed). 3. The line consists of an assignment statement (i.e., the expression on the right of the = sign is evaluated and the value given to the variable or function name to the left of the = sign). 4. The line consists of a FLAC 3D command, provided that the line is embedded in a section of FISH code delimited by the COMMAND C ENDCOMMAND statements (see Section 6.3.3). 5. The line is blank or starts with a semicolon. FISH variables, function names and statements must be they cannot be truncated, as in FLAC 3D commands. No continuation lines are allowed: intermediate variables may be used to split complex expressions. FISH is “case-insensitive” by default ― i.e., it makes no distinction between upper-case and lower- all names are converted to lower-case letters. (Note that this can be changed with the command SET case on.) Spaces are signi?cant (unlike in FORTRAN) and serve to separate variables, keywords, no embedded blanks are allowed in variable or function names. Extra spaces may be used to improve readability ― for example, by indenting loops and conditional clauses. Any characters following a semi-colon ( ; ) comments may be embedded in a FISH program by preceding them with a semi-colon. Blank lines may be embedded in a FISH program. FLAC 3D Version 2.06-36.2.2Reserved Names for Functions and VariablesVariable or function names must start with a non-number and must not contain any of the following symbols (be wary of punctuation or symbols in general): . , * / + - ? = & & # ( ) [ ] @ ; ’ & User-de?ned names can be any length, but they are truncated in print-out and in plot captions due to line-length limitations. In general, names may be chosen arbitrarily, although they must not be the same as a FISH statement (see Section 6.3) or a pre-de?ned variable or function (see Section 6.5). There are also many other words used in FLAC 3D input that should be avoided. The list contained in Table 6.2 shows all words that could give rise to a con?ict if used to name a FISH variable or function. However, the potential con?ict depends on the way in which the chosen name is used. For example, the word gravity could be used as a FISH variable provided that it is simply referred to inside a FISH a con?ict would arise only if it is necessary to use the SET command to set its value, since gravity is a valid argument to the SET command. Similarly, it may be impossible to print the value of a FISH variable if its name is the same as a parameter for the PRINT command. If in doubt, avoid any of the names listed in Table 6.2 or contractions of the names (since FLAC 3D allows truncation of keywords and commands). As an alternative strategy, the FLAC 3D command SET safe on can be used to force the explicit recognition of FISH variables in a command line instruction. The @ symbol pre-pended to any FISH variable identifes the object as such and forces the command line parser to ignore any other possible interpretation. For example, suppose that a FISH function initial as shown in Example 6.1 has been created. Attempting to run the function from the command prompt would ordinarily produce an error since the command INITIAL would take precedence over the FISH initial. However, using the FISH identi?er @ in front of the variable gives us an unambiguous, correct interpretation. Example 6.1 Explicit identi?cation of FISH variablesdef initial xvel = 0.0 yvel = 1.0 end . ; these lines will both result in errors... ... vainly hoping to initialize parameters... ini
...obviously ambiguous... . ; these lines would solve the problem... set safe on @initial ini xvel @xvel yvel @yvel 6-4FLAC 3D Version 2.0Table 6.1 Symbol C H M P Pl Pr S St Fc Ff Fg Fi FM FS Fs . . . -XSymbols used in Table 6.2 Meaning FLAC 3D command or keyword FLAC 3D HISTORY argument FLAC 3D model name FLAC 3D PROPERTY argument FLAC 3D PLOT argument FLAC 3D PRINT argument FLAC 3D SET argument FLAC 3D structural element argument FISH state variable FISH special function FISH code variable FISH intrinsic function FISH consitutive-model variable FISH statement FISH scalar variable discontinued use FLAC 3D Version 2.0 Table 6.2 List of words in FLAC 3D and FISH that may con?ict with chosen namesName a1 a2 a wipp a3 a4 above abs act energy add age ai:30 ai:31 ai:32 ai:40 ai:50 ai:51 ai:52 ai:53 alias and annulus any apply array aspect atan atan2 attach auto autocolor average axes axial b mod b wipp background beam beamsel begin behind below b?x biot c biot mod block Usage P P P S S Pl Fi P Pl C S S S S S S S S Pl Fi C C C,St FS S Fi Fi C C Pl Pl Pl Pl P P Pl St St C,St Pl C C P P Pl Name both bottom boundary brick bulk cable cablesel call caption case caseof center cid cleanup clear clock close cohesion color command conductivity con?g continue contour convection copy cos cp:11 crdt create creep crtime cshell ctable current custom cycle cylinder cylint d wipp damp dbrick dd default de?ne Usage Pl Pl Pl C P,FM-X C,H,Pr,St St C Pl FS FS C St C Pl Fs Pl P,FM-X Pl FS P C C Pl C Pl Fi S Fs Pl C Fs C P Pl Pl C C C P P C C Pl C Name degrad delete density destroy dilation dim dip discharge displacement down dquiet drucker dstress dt dtable dump dvelocity dydt dynamic dytime e e dot star echo edge effective elastic element else emod end end1 end2 endcase endcommand endif endloop endsection es plastic et plastic exit exp expand extrude eyedistance face Usage6- 5Fs C,H Fg,St Pl P,FM-X Fs C C C,Pl Pl C M C S P H C Fs C Fs P P S C Pl M Pl FS St C,St C C FS FS FS FS FS P,FM-X P,FM-X FS Fi C C Pl C? (See p. 6 - 4 for explanation of symbols.) 6- 6FLAC 3D Version 2.0Table 6.2 List of words in FLAC 3D and FISH that may con?ict with chosen namesName fap fc fc arg fdensity ?le ?ll ?nal ?sh ?shcall ?x ? isotropic ? null ?oat ?dt ?ow ?ow ratio ?time ?uid ?ux fmodulus fob force foreground free friction front fstrength ftable g:5 g:6 g:8 g id gap gas c gauss dev generate geom get mem gp gp copy gp extra gp head gp id gp mass gp near Usage Pl Pr Fi C C Pl C Pr Pr,S C,St M M Fi Fs C,Pl Fs Fs C C C Pr,Pl Pr Pl C,St P,FM-X Pl C P S S S C St P C C,P St Fi,Fs H,P Fg Fg,C,Pl,Pr Fs Fg Fg Fg Name gp next gp pp gp temp gp xdisp gp xfapp gp xfunbal gp xpos gp xvel gp ydisp gp yfapp gp yfunbal gp ypos gp yvel gp zdisp gp zfapp gp zfunbal gp zpos gp zvel gradient grand gravity gray grid group gui hardcopy hist rep history i:23 i:25 i elem head i ?nd i head i id i next i node head ie area ie id ie join ie norm ie fhost ie zhost id in area in ctol Usage Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Pl Fi,Fs S Pl C C C Pl S C,Pr S S Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg St Fg Fg Name in disp in id in fhost in ftarget in hweight in nstr in nstr add in pen in pos in prop in sdisp in sstr in tweight in vel in zhost in ztarget id if image implicit in inactive increment info information initial initialize inrange insert istropic int interface internal item iterate jcohesion jdd jdilation jdip jfriction jnx jny jnz jtension kbond Usage Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg C FS Pl C Fi C Pl Pr St C,St St Fi C St Fi C C Pl C P,FM-X P P,FM-X P P,FM-X P,FM-X P,FM-X P,FM-X P,FM-X P? (See p. 6 - 4 for explanation of symbols.) FLAC 3D Version 2.0 Table 6.2 List of words in FLAC 3D and FISH that may con?ict with chosen namesName kn ks kshear landscape large latency ldamp leakage left lfob light line link lmul ln local location log log?le loop lose mem lsys macro mainwin mark mass max maxdt maxedge maximum mech ratio mechanical mem memfree memory memsize merge min mindt minimum mode model modgradient modify mohr Usage P,St P,St P,FM-X Pl S,Fs S St S Pl S Pl Pl Pl,St S Fi C Pl S,Fi S FS Fi,Fs St C C Pl St Fi,H C C Pl Fs C Fi,Fs Fs Pr Fs C Fi S Pl S C,Fg-X Pl Pl M Name moment move msafety mul mx mxx mxy my myy mz n1 n2 n wipp name new ngp node normal not nquiet nseg nstep nstress nu null number nvelocity nxx nxy nyy nzone off ok:3 on or origin orthotropic ostrength out outline output overlay p:4 p1 p10 Usage Pl Pl C C St St St St St St P P P C C Fs C,St C,Pl Fi C St H C St M,Fi,Fs Pl Pl St St St Fs S S S Fi C,Pl St C Fi Pl S C S C C Name p11 p12 p13 p14 p15 p16 p2 p3 p4 p5 p6 p7 p8 p9 pagelength pagination pause pcx pcxout penetration permeability perspective pi pile pilesel pinterval plane plot point polygon porosity portrait position positive post pressure pretension ppressure print property psource purge pwell pyramid q:2 Usage6- 7C C C C C C C C C C C C C C S S C S S Pr P Pl Fs St St S Pl C,S C C P Pl Pl Pl S St St C C,H,St C,St C H C C S? (See p. 6 - 4 for explanation of symbols.) 6- 8FLAC 3D Version 2.0Table 6.2 List of words in FLAC 3D and FISH that may con?ict with chosen namesName q:3 qdil query quit qvol qx qy radbrick radcylinder radius radtunnel range ratio rayleigh reactivate read red re?ect regenerate rename reset restore return reverse rgb right rigid rlist rotation rs 1 rs 2 s3:10 s3:11 s3:12 save sbond scale section segment sel sel area sel cen sel cid sel csncoh sel csnfric Usage S P,FM-X St C P,FM-X St St C C C C C,H,S C S,St C C Pl C Pl Pl H C C Pl Pl Pl St Pr Pl P P S S S C P Pl FS C St St St St St St Name sel csngap sel csnk sel csscoh sel cssfric sel cssk sel density sel e sel extra sel grcoh sel grfric sel grk sel grper sel head sel id sel length sel locsys sel mark sel ndforce sel next sel node sel nu sel numnd sel ortho sel per sel press sel strglb sel strglbpos sel strres sel strrespos sel strsurf sel strsurfpos sel thick sel type sel volume sel xcarea sel xciy sel xciz sel xcpolmom sel ycomp sel ypress sel ytens sel zpress selcm depend selcm linear selcm nyield Usage St St St St St St St St St St St St St St St St St St St St St St St St St St St St St St St St St St St St St St St St St St St St St Name selcm pile selcm syield sellink head sellk deform sellk free sellk node sellk rigid sellk zone selnode head seltype beam seltype cable seltype pile seltype shell set sgn shade shear shell shellsel show sig1 sig2 sig3 sin size sketch skip small smax smid smin solve sort source spec heat sphere sqrt squiet ssoften sstress st:30 st:31 state step stop Usage St St St St St St St St St St St St St C Fi Pl P,FM-X St St Pl Fg-X Fg-X Fg-X Fi Pl,C Pl H S Pl Pl Pl C C St P C Fi C M C S S Fg-X Fs,C,S C? (See p. 6 - 4 for explanation of symbols.) FLAC 3D Version 2.0 Table 6.2 List of words in FLAC 3D and FISH that may con?ict with chosen namesName string substep subtract surface surfarea surfx svelocity sxx sxy sxz system syy syz szz table target tan tc:3 tc:4 temperature tension tet text th isotropic th null thdt then therm ratio thermal thexp thickness thtime time title tolerance top total tr:3 tr:4 tr:5 trace translate triangle ts:30 ts:31 Usage Fi S Pl C,Pl,St St St Pl Fg-X,Pr,St Fg-X,Pr,St Fg-X,Pr,St C Fg-X,Pr,St Fg-X,Pr,St Fg-X,Pr,St Ff,C,Pr,H St Fi S S C P,FM-X Pr,C Pl M M Fs FS Fs C P St Fs C C Pl Pl Pl S S S C Pl C S S Name ts:32 ts:34 ts:40 ts:41 ttable ttol tunint type u thc ubiquitous ufob umul unbal uniform dev up urand us letter us tabloid v0 v1 v2 v3 v4 v5 v7:10 v7:11 v7:12 v7:7 ve:31 ve:32 ve:33 ve:34 ve:40 ve:41 ve:42 ve:43 ve:44 ve:45 ve:46 ve:47 ve:53 ve:55 velocity vertex vfactor Usage S S S S P C C Fi P M S S Fs,H C Pl Fi,Fs S S C C C C C C S S S S S S S S S S S S S S S S S S Pl C C Name vftol view viscosity vmagnitude volume vs vsource vstrength vwell wait water wedge while whilestepping window wipp write xbody xbodyforce xcara xcen xciy xciz xcj xdirection xdisp xfob xforce xgrav xmaximum xminimum xmom xpolygon xpos xr xrdirection xrdisp xrfob xrvel xreaction xtable xvel xvelocity ybody ybodyforce Usage6- 9C Pl P C Fg Pl C C C Pl C C FS FS Pl M H Fg-X C St Fg-X St St St St Fg-X St Fg-X,St Fs Pl Pl St C Fg-X,St St St St St St C Ff Fg-X,St C,H,St Fg-X C? (See p. 6 - 4 for explanation of symbols.) 6- 10FLAC 3D Version 2.0Table 6.2 List of words in FLAC 3D and FISH that may con?ict with chosen namesName ycen ycomp ycompression ydirection ydisp ydist yforce yfob ygrav yield ymaximum yminimum ypos yr yrdirection yrdisp yrfob yrvel yreaction ytable ytens ytension yvel yvelocity z code z copy z density z extra z facegp z facesize z fsi z fsr z gp z group z id z model z near z next z numgp z pp z prop z qx z qy z qz z sig1 Usage Fg-X C St St Fg-X St Fg-X,St St Fs C,St Pl Pl Fg-X,St St St St St St C Ff St St Fg-X,St C,H,St Fg Fg Fg Fg,C,Pl Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Name z sig2 z sig3 z state z ssi z ssr z sxx z sxy z sxz z syy z syz z szz z volume z vsi z vsr z xcen z ycen z zcen zbody zbodyforce zcen zdirection zdisp zdist zextra zfob zforce zgrav zmom zone zone head zpos zr zrdirection zrdisp zrfob zreaction zrvel zvel zvelocity Usage Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg Fg-X C Fg-X St Fg-X St Pl St Fg-X,St Fs St H,Pr Fs Fg-X,St St St St St C St Fg-X,St C,H,St Name Usage? (See p. 6 - 4 for explanation of symbols.) FLAC 3D Version 2.06 - 11By default, user-de?ned variables represent single numbers or strings. Multi-dimensional arrays of numbers or strings may be stored if the ARRAY statement is used. Section 6.3.1,de?nes the way in which arrays are created and used. At present, there is no explicit printout or input facility for arrays, but functions may be written in FISH to perform these operations. For example, the contents of a two dimensional array (or matrix) may be initialized and printed as shown in Example 6.2. Example 6.2 Initializing and printing FISH arraysfill matrix with random numbers array var(4,3) loop m (1,4) loop n (1,3) var(m,n) = urand endloop endisplay contents of matrix loop m (1,4) hed = ’ ’ msg = ’ ’+string(m) loop n (1,3) hed = hed + ’ ’+string(n) msg = msg + ’ ’+string(var(m,n)) endloop if m = 1 dum = out(hed) endif dum = out(msg) endloop end afill ashowUpon execution, the following output is produced:1 5.... 6.... 7....1 2 3 4 6 - 12FLAC 3D Version 2.06.2.3Scope of VariablesVariable and function names are recognized globally (as in the BASIC language). As soon as a name is mentioned in a valid FISH program line, it is thereafter recognized globally, both in FISH code and in FLAC 3D commands (for example, in place of a number); it also appears in the list of variables displayed when the PRINT ?sh command is given. A variable may be given a value in one FISH function and used in another function or in a FLAC 3D command: the value is retained until it is changed. The values of all variables are also saved when the FLAC 3D SAVE command is given and restored by the RESTORE command. 6.2.4 Functions: Structure, Evaluation and Calling SchemeThe only object in the FISH language that can be executed is the “function”. Functio communication of parameters is through the setting of variables prior to invoking the function. (Recall that variables have global scope.) The name of a function follows the DEFINE statement, and its scope terminates with the END statement. The END statement also serves to return control to the caller when the function is executed. (Note that the EXIT statement also returns control ― see Section 6.3.2.) Consider Example 6.3, which shows function construction and use. Example 6.3 Construction of a functiondef xxx aa = 2 * 3 xxx = aa + bb endThe value of xxx is changed when the function is executed. The variable aa is computed locally, but the existing value of bb is used in the computation of xxx. If values are not explicitly given to variables, they default to zero (integer). It is not necessary for a function to assign a value to the variable corresponding to its name. The function xxx may be invoked in one of the following ways: (1) as a single word xxx on a FISH (2) as the variable xxx in a FISH formula ― e.g.,new var = (sqrt(xxx) / 5.6)?4(3) as a single word xxx on a FLAC 3D (4) as a symbolic replacement for a number on an input line (see Section 6.4.1); and (5) as a parameter to the SET, PRINT or HISTORY commands of FLAC 3D. FLAC 3D Version 2.06 - 13A function may be referred to in another function before it is de? the FISH compiler simply creates a symbol at the time of ?rst mention and then links all references to the function when it is de?ned by a DEFINE command. Function calls may be nested to any level ― i.e., functions may refer to other functions, which may refer to others, ad in?nitum. However, recursive function calls are not allowed (i.e., execution of a function must not invoke that same function). Example 6.4 shows a recursive function call, which is not allowed, because the name of the de?ning function is used in such a way that the function will try to call itself. The example will compile, but will fail on execution (assuming a grid is de?ned). Example 6.4 A recursive function calldef stress sum stress sum = 0.0 pnt = zone head loop while pnt # null stress sum = stress sum + z sxx(pnt) pnt=z next(pnt) end loop endThe same function should be coded as shown in Example 6.5 below. Example 6.5 Straightening out the recursive function shown in Example 6.4def stress sum sum = 0.0 pnt = zone head loop while pnt # null sum = sum + z sxx(pnt) pnt=z next(pnt) end loop stress sum = sum endThe difference between variables and functions is that functions are always executed whenever the variables simply convey their current values. However, the execution of a function may cause other variables (as opposed to functions) to be evaluated. This effect is useful, for example, when several histories of FISH variables are required ― only one function is necessary in order to evaluate several quantities, as in Example 6.6. 6 - 14FLAC 3D Version 2.0Example 6.6 Evaluation of variablesnew def h var 1 ipz = h var 1 = h var 2 = h var 3 = h var 4 = h var 5 = h var 6 = endz near(1,2,3) sxx(ipz) + fac syy(ipz) + fac szz(ipz) + fac sxy(ipz) + fac syz(ipz) + fac sxz(ipz) + facThe FLAC 3D commands to request histories might be:hist hist hist hist hist hist h h h h h h var var var var var var 1 2 3 4 5 6The function h var 1 would be executed by the FLAC 3D’s history logic every few steps but, as a side effect, the values of h var 2 through h var 6 would also be computed and used as history variables. 6.2.5 Data TypesThere are four data types used for FISH variables or function values: 1. Integer (exact numbers in the range -2,147,483,648 to +2,147,483,647); 2. Floating-point (approximate numbers with about 15 decimal digits of precision, with a range of approximately 10?300 to 10300 ); 3. String (packed sequence of any
the sequence may be any length, but it will be truncated on the print-out. Strings are denoted in FISH and FLAC 3D by a sequence of characters enclosed by single quotes ― e.g., ’Have a nice day’ ― note that the use of strings in FLAC 3D is restricted to titles and ?le names. See Section 6.4.1.); and 4. Pointer (machine address ― used for scanning through linked lists. They have an associated type from the object to which the pointer refers, except for the null pointer.). FLAC 3D Version 2.06 - 15A variable in FISH can change its type dynamically, depending on the type of the expression to which it is set. To make this clear, consider the assignment statementvar1 = var2If var1 and var2 are of different types, then two things are done: ?rst, var1’s type is converted to var2’ second, var2’s data are transferred to var1. In other languages, such as FORTRAN or C, the type of var1 is not changed, although data conversion is done. By default, all variables in FISH start th however, a statement such asvar1=3.4causes var1 to become a ?oating-point variable when it is executed. The current type of all variables may be determined by giving the FLAC 3D command PRINT ?sh ― the types are indicated by the nature of the print-out. The dynamic typing mechanism in FISH was devised to make programming easier for nonprogrammers. In languages such as BASIC, numbers are stored in ?oating-point format, which can cause dif?culties when integers are needed for, say, loop counters. In FISH, the type of the variable adjusts naturally to the context in which it is used. For example, in the following code fragment,n = n + 2 xx = xx + 3.5the variable n will be an integer and will be incremented by exactly 2, and the variable xx will be a ?oating-point number, subject to the usual truncation error but capable of handling a much bigger dynamic range. The rules governing type conversion in arithmetic operations are explained in Section 6.2.6. The type of a variable is determined by the type of the object on the right-hand side of an
this applies both to FISH statements and to assignments done with the FLAC 3D SET command. Both types of assignment may be used to change the type of a variable according to the value speci?ed, as follows. 1. An integer assignment (digits 0-9 only) will cause the variable to become an integer (e.g., var1 = 334). 2. If the assigned number has a decimal point or an exponent denoted by “e” or “E”, then the variable will become a ?oating-point number (e.g., var1 = 3e5; var2 = -1.2). 3. If the assignment is delimited by single quotes, the variable becomes a string, with the “value” taken to be the list of characters inside the quotes (e.g., var1 = ’Have a nice day’). 6 - 16FLAC 3D Version 2.0Type conversion is also done in assignments involving pre-de?ned va these rules are presented in Section 6.5. Note that pointer variables may not be converted to or from other variable types. 6.2.6 Arithmetic: Expressions and Type ConversionsArithmetic follows the conventions used in most languages. The symbols ? / * - + denote exponentiation, division, multiplication, subtraction and addition, respectively, and are applied in the order of precedence given. Arbitrary numbers of parentheses may be used to render explicit the expressions within parentheses are evaluated before anything else. Inner parentheses are evaluated ?rst. As an example, FISH evaluates the following variable xx as 133:xx = 6/3*4?3+5The expression is equivalent to:xx = ( (6/3) * (4?3) ) + 5If there is any doubt about the order in which arithmetic operators are applied, then parentheses should be used for clari?cation. If either of the two arguments in an arithmetic operation are of ?oating-point type, then the result will be ?oating-point. If both of the arguments are integers, then the result will be integer. It is important to note that the division of one integer by another causes truncation of the result ― for example, 5/2 produces the result 2, and 5/6 produces the result 0. Arithmetic operations are not allowed for pointer variables except for the addition of an integer (see Section 6.5.5.2; however, two pointers may be tested for equality in an IF statement ― e.g.,if zp # null FLAC 3D Version 2.06 - 176.2.7StringsThere are three FISH intrinsic functions that are available to manipulate strings.in(var)prints out variable var if it is a string or the message “Input?” if it is not, and then waits for input from the keyboard. The returned value depends on the characters that are typed. FISH tries to decode the input ?rst as an integer and then as a ?oating-point number ― the returned value will be of type int or ?oat if a single number has been typed in that can be decoded as integer or ?oating-point, respectively. If the characters typed in by the user cannot be interpreted as a single number, then the returned value will be a string containing the sequence of characters. The user’s FISH function can determine what has been returned by using the function type( ). prints out the message contained in s to the screen (and to the log ?le, if it is open). The variable s must be of type string. The returned value of the function is zero if no error is detected and 1 if there is an error in the argument (e.g., if s is not a string). converts var to type string.out(s)string(var)One use of these functions is to control interactive input and output. Example 6.7 demonstrates this for user-supplied input parameters for Young’s modulus and Poisson’s ratio. Example 6.7 Control of interactive inputdef in def xx = in(msg+’(’+’default:’+string(default)+’):’) if type(xx) = 3 in def = default else in def = xx endif end def moduli data default = 1.0e9 msg=’Input Young‘s modulus ’ y mod = in def default = 0.25 msg=’Input Poisson‘s ratio ’ p ratio = in def if p ratio = 0.5 then ii = out(’ Bulk mod is undefined at Poisson‘s ratio = 0.5’) ii = out(’ Select a different value --’) p ratio = in def 6 - 18FLAC 3D Version 2.0endif s mod = y mod / (2.0 * (1.0 + p ratio)) b mod = y mod / (3.0 * (1.0 - 2.0 * p ratio)) end moduli data gen zone brick size 2,2,2 model elastic prop bulk = b mod shear = s mod print p ratio y mod b mod s mod pause print zone prop bulk pause print zone prop shearThe only arithmetic operation that is valid for string v as demonstrated in Example 6.7, this causes two strings to be concatenated. Table 6.3 identi?es special characters available in string manipulation.Table 6.3 String manipulation characters \’ \& \\ \b \t \r \n place single quote in string place double quote in string place backslash in string backspace tab carriage return CR/LFIt is invalid for only one argument to be a string variable. The intrinsic function string( ) must be used if a number is to be included as part of a string variable (see variable xx in Example 6.7). Also, you will note the use of intrinsic function type( ), which identi?es the type of argument (see Section 6.5.4. FLAC 3D Version 2.06 - 196.3FISH StatementsThere are a number of reserved words in the FISH language: they must not be used for variable or function names. The reserved words, or statements, fall into three categories, as explained below. 6.3.1 Speci?cation StatementsThe following words are normally placed at the beginning of a FISH function: they alter the characteristics of the function or its variables but do not affect the ?ow of control within the function. They are only interpreted during compilation.ARRAYvar1(n1, n2 . . . ) &var2(m1, m2 . . . )& &var3(p1, p2 . . . )& . . . This statement permits arrays of any dimension and size to be included in FISH code. In the above speci?cation, var1 is any valid variable name and n1, n2 . . . are either actual integers, or the scalar variable (dim), or single variables (not expressions) that have integer values at the time the ARRAY statement is processed. There may be several arrays speci?ed on the same line (e.g., var2, above); the number of dimensions may be different for each array. The ARRAY statement is a speci?cation and is acted on during compilation, not execution (it is ignored during execution). Note the following. 1. The given name may be an existing single variable: if so, it is converted to an array and its value is lost. If the name does not already exist, it is created. 2. The given name may not be that of a function or the name of an existing array (i.e., arrays cannot be rede?ned). 3. The given dimensions (n1, n2, . . . ) must be positive integers or evaluate to positive integers (i.e., indices start at 1, not 0). 4. There is no limit to the number and size of the array dimensions, except FLAC 3D’s memory capacity and the maximum line length. Array variables take any type (integer, ?oat , pointer or string), according to the same rules governing single variables. They are used exactly like single variables, except that they are always followed by an argument (or index) list enclosed by parentheses. In use (as opposed to in speci?cation), array indices may be integer expressions: e.g.,var1 = (abc(3,nn+3,max(5,6)) + qqq) / 3.4is a valid statement if abc is the name of a three-dimensional array. Arrays may appear on both sides of an assignment, and arrays may be used as indices of other arrays. 6 - 20FLAC 3D Version 2.0Some restrictions apply to the use of array names in FLAC 3D command lines: (1) the command PRINT ?sh prints the legend ― array ― if the corresponding symbol is an array, together with
(2) PRINT name (where name is a FISH array name) simply prints out the m (3) PRINT name index prints the value stored in name(index); and (4) the use of a FISH array name as the source or destination for a number is not allowed, and prompts an error message (e.g., SET grav=name, where name is a FISH array name). WHILESTEPPING If this statement appears anywhere within a user-de?ned function, then the function is always executed automatically at the start of every FLAC 3D step. The WHILESTEPPING attribute can later be disabled with the use the SET ?shcall 0 remove command (see Section 6.4.3). The ?shcall (see the command SET ?shcall) statement provides more ?exibility and control than the WHILESTEPPING command, and its use is preferred. Synonym: WHILE STEPPING FLAC 3D Version 2.06 - 216.3.2Control StatementsThe following statements serve to direct the ?ow of control during execution of a FISH function. Their position in the function is of critical importance, unlike the speci?cation statements described above.DEFINE ENDfunction-nameThe FISH program between the DEFINE and END commands is compiled and stored in FLAC 3D’s memory space. The compiled version of the function is executed whenever its name is mentioned, as explained in Section 6.2.4. The function name (which should be chosen according to the rules in Section 6.2.2) does not need to be assigned a value in the program section that follows.CASEOF CASE ENDCASEexpr n The action of these control statements is similar to the FORTRAN computed GOTO or C’s SWITCH statement. It allows control to be passed rapidly to one of several code segments, depending on the value of an index. The use of the keywords is illustrated in Example 6.8. Synonym: CASE OF END CASE Example 6.8 Usage of the CASE constructCASEOF............ CASE i1 ;............ CASE i2 ;............ CASE i3 ;............ ENDCASE default code here case i1 code here case i2 code here case i3 code here 6 - 22FLAC 3D Version 2.0The object expr following CASEOF can be any valid
when evaluated, it will be converted to an integer. The items i1, i2, i3, etc. must be integers (not symbols) in the range 0 to 255. If the value of expr equals i1, then control jumps to the statements following the CASE i1 execution then continues until the next CASE statement is encountered. Control then jumps to the code following the ENDCASE there is no “fall-through”, as in the C language. Similar jumps are executed if the value of expr equals i2, i3 and so on. If the value of expr does not equal the numbers associated with any of the CASE statements, then any code immediately following the CASEOF statement is executed, with a jump to ENDCASE when the ?rst CASE is encountered. If the value of expr is less than zero or greater than the greatest number associated with any of the CASEs, then an execution error is signaled, and processing stops. The numbers n (e.g., i1, i2, i3) need not be sequential or contiguous, but no duplicate numbers may exist. CASEOF . . . ENDCASE sections may be
there will be no con?ict between CASE numbers in the different levels of nesting ― e.g., several instances of CASE 5 may appear, providing that they are all associated with different nesting levels. The use of CASE statements allows rapid decisions to be made (much quicker than for a series of IF . . . ENDIF statements). However, the penalty is that som the amount of memory depends on the maximum numerical value associated with the CASE statements. The memory consumed is one plus the maximum CASE number in double-words (four-byte units).IF ELSE ENDIFexpr1 test expr2 THENThese statements allow conditional execution of FISH ELSE is optional and the word THEN may be omitted if desired. The item test consists of one of the following symbols, or symbol pairs: = # & & &= &= The meanings are standard, except for #, which means “not equal”. The items expr1 and expr2 are any valid algebraic expressions (which can involve functions, FLAC 3D variables and so on). If the test is true, then the statements immediately following IF are executed until ELSE or ENDIF is encountered. If the test is false, the statements between ELSE and ENDIF are executed if the ELSE otherwise, control jumps to the ?rst line after ENDIF. All the given test symbols may be applied when expressions expr1 and expr2 evaluate to integers or ?oating-point values (or a mixture). If both expressions evaluate to strings, then only two tests are valid: = and #; all other operations are invalid for strings. Strings must match exactly for equality. Similarly, both expressions may evaluate to pointers, but only = and # tests are valid. IF . . . ELSE . . . ENDIF clauses can be nested to any depth. Synonym: END IF FLAC 3D Version 2.06 - 23EXITThis statement causes an unconditional jump to the end of the current function.EXIT SECTIONThis statement causes an unconditional jump to the end of a SECTION; FISH program sections are explained below.LOOP ENDLOOP LOOP ENDLOOPvar (expr1, expr2) or WHILE expr1 test expr2The FISH program lines between LOOP and ENDLOOP are executed repeatedly until certain conditions are met. In the ?rst form, which uses an integer counter, var is given the value of expr1 initially and is incremented by 1 at the end of each loop execution until it obtains the value of expr2. Note that expr1 and expr2 (which may be arbitrary algebraic expressions) are evaluated at t re-de?nition of their component variables within the loop has no effect on the number of loop executions. var is a sin it may be used in expressions within the loop (even in functions called from within the loop) and may even be rede?ned (at the responsibility of the programmer). In the second form of the LOOP structure, the loop body is executed while the te otherwise, control passes to the next line after the ENDLOOP statement. The form of test is identical to that described for the IF statement. The expressions may involve ?oating-point variables the use of strings and pointers is also permitted under the same conditions that apply to the IF statement. The two forms of the LOOP structure may be contrasted. In the ?rst, the test is done at the end of the loop (so there will be at least one pass through the loop); in the second, the test is done at the start of the loop (so the loop will be bypassed if the test is false initially). Loops may be nested to any depth. Synonym: END LOOPSECTION ENDSECTIONThe FISH language does not have a “GO TO” statement. The SECTION construct allows control to jump forward in a controlled manner. The statements SECTION . . . ENDSECTION may enclose any number of lines of FISH they do not affect the operation in any way. However, an EXIT SECTION statement within the scope of the section so de?ned will cause control to jump directly to the end of the section. Any number of these jumps may be embedded within the section. The ENDSECTION 6 - 24FLAC 3D Version 2.0statement acts as a label, similar to the target of a GO TO statement in C or FORTRAN. The logic is cleaner, however, because control may not pass to anywhere outside the de?ned section, and ?ow is always “downward”. Sectio there may be many sections in a function, but they must not overlap or be contained within each other. Synonym: END SECTION 6.3.3 FLAC 3D Command ExecutionCOMMAND ENDCOMMANDFLAC 3D commands may be inserted between this pair of FISH statements: the commands will be interpreted when the FISH function is executed. There are a number of restrictions concerning the embedding of FLAC 3D commands within a FISH function. The NEW and RESTORE commands are not permitted to be invoked from within a FISH function. A FISH function de?nition may appear within a COMMAND C ENDCOMMAND pair, and may itself contain the COMMAND statement ― however, recursive calling is not allowed and will produce an error message. A function that contains the WHILESTEPPING statement or a function that is the subject of a ?shcall may contain the COMMAND statement. However, this construction should be used with caution, and avoided if possible. Comment lines ( ) are taken as FLAC 3D comments, rather than FISH comments ― it may be useful to embed an explanatory message within a function, to be printed out when the function is invoked. The lines found between a COMMAND C ENDCOMMAND pair are simply stored by FISH
they are not checked at all, and the function must be executed before any errors can be detected. If the echo mode is off (SET echo = off), then any FLAC 3D commands coming from the function are not displayed to the screen or recorded to the log ?le. Synonym: END COMMAND FLAC 3D Version 2.06 - 256.4 6.4.1Linkages to FLAC 3D Modi?ed FLAC 3D CommandsThe following list contains all the FLAC 3D commands that refer directly to FISH variables or entities. There are many other ways in which FLAC 3D and FISH may interact: these are described in Section 6.4.2.HISTORYvar causes a history of the FISH variable or function to be taken during stepping. If var is a function, then it will be evaluated every time that histories are taken (controlled by HISTORY nstep command); it is not necessary to register the function with a ?shcall. If var is a FISH variable, then its current value will be taken ― hence, caution should be exercised when using variables (rather than functions) for histories. The history may be plotted in the usual way.PRINTvar prints out the value of the FISH variable var. var is also executed (and everything else that it calls) if it is a FISH function.PRINT?sh prints out a list of FISH symbols and either their current values or an indication of their type.PRINT?shcall prints the current associations between ?shcall ID numbers and FISH functions (see Section 6.4.3 ).SET?shcall n &remove& nameThe FISH function name will be called in FLAC 3D from a location determined by the value of the ?shcall ID number n. The currently assigned ID numbers are listed in Table 6.4 . The optional keyword remove, causes the FISH function to be removed from the list when placed before the FISH function name.SETvar value sets the value of a FISH variable var to the given value. The given number also determines the type given to var, as explained in Section 6.2.5. Note that value may itself be a FISH variable or function name ― in this case, its value and type are transferred to var. 6 - 26FLAC 3D Version 2.0TITLEstr changes the stored title (used on plots, for example) to the value of the FISH string variable str. Note that the variable name must not be in single quotes.6.4.2Execution of FISH FunctionsIn general, FLAC 3D and FISH operate as separate entities ― FISH statements cannot be given as FLAC 3D commands, and FLAC 3D commands do not work directly as statements in a FISH program. However, there are many ways in which the two
some of the more common ways are listed below. 1. Direct use of function ― A FISH function is executed at the user’s request by giving its name on an input line. Typical uses are to generate geometry, set up a particular pro?le of material properties, or initialize stresses in some fashion. 2. Use as a history variable ― When used as the parameter to a HISTORY command, a FISH function is executed at regular times throughout a run, whenever histories are stored. 3. Automatic execution during stepping ― If a FISH function makes use of the generalized ?shcall capability (or contains the WHILESTEPPING statement), then it is executed automatically at every step in FLAC 3D’s calculation cycle, or whenever a particular event occurs. (See Section 6.4.3 for a discussion on ?shcall.) 4. Use of function to control a run ― Since a FISH function may issue FLAC 3D commands (via the COMMAND statement), the function can be used to “drive” FLAC 3D in a way that is similar to that of a controlling data ?le. However, the use of a FISH function to control operation is much more powerful, since parameters to commands may be changed by the function. The primary way of executing a FISH function from FLAC 3D is to give its name as FLAC 3D input. In this way, FISH function names act just like regular commands in FLAC 3D. However, no parameters may follow the function name so given. If parameters are to be passed to the function, then they must be set beforehand with the SET command (explained later). There is another important link between FISH and FLAC 3D : a FISH symbol (variable or function name) may be substituted anywhere in a FLAC 3D command that a number is expected. This is a very powerful feature, because data ?les can be set up with symbols rather than with actual numbers. Example 6.9 shows how a data ?le can be constructed that is independent of the mesh density ― the same geometry (a radially graded mesh around a cylindrical tunnel) can be set up for any number of elements in the mesh simply by changing two numbers on the SET command. FLAC 3D Version 2.06 - 27Example 6.9 FISH function with generic mesh-handling capability;--- function definition ... def make hole x bou = 400.0 y bou = 200.0 z bou = 200.0 rad = 20.0 = n inner n 1 = n total n 2 n 3 = 2 * n inner = n total - n inner n 4 FLAC3D input --set n inner 5 n total 10 create grid gen zone radcylinder size n 1,n 2,n 3,n 4 & p0 (0,0,0) p1 add (x bou,0,0) p2 add (0,y bou,0) p3 (0,0,z bou) & dim (rad,rad,rad,rad)Several of the points made above are illustrated in Example 6.9: the function make hole is invoked by givin the parameters controlling the function are given beforehand with the SET there are no numerical values in the FLAC 3D input ― they are all replaced by symbols. String variables may be used in a similar way, but their use is much more restricted compared to the use of numerical variables. A FISH string variable may be substituted (a) wherever a ?lename is required, or (b) as a parameter to the TITLE command. In these cases, single quotes are not placed around the string, so that FLAC 3D can distinguish between a literal name and a variable standing for a name. Example 6.10 illustrates the syntax. 6 - 28FLAC 3D Version 2.0Example 6.10 Using string variablesdef xxx name1 = ’abc.log’ name2 = ’This is run number ’ + string(n run) name3 = ’abc’ + string(n run) + ’.sav’ end set n run = 3 xxx set logfile = name1 set log on title name2 save name3The intrinsic function string( ) is described in Sections 6.2.7 and 6.5.4; it converts a number to a string. Another important method of using a FISH function is to control a FLAC 3D run or a series of FLAC 3D operations. FLAC 3D commands are placed within a COMMAND . . . ENDCOMMAND section in the function. The whole section may be within a loop, and parameters may be passed to FLAC 3D commands. This approach is illustrated in Example 6.11, in which 8 complete runs are done, each with a different value of friction angle. Example 6.11 Controlling a FLAC 3D rundef series new fric = 85.0 step lim=1000 ipt = gp near(1,5,1) loop n (1,8) command prop fric = new fric ini sxx 0.0 syy 0.0 szz 0.0 sxy 0.0 sxz 0.0 szz 0.0 ini xvel 0.0 yvel 0.0 zvel 0.0 ini xdis 0.0 ydis 0.0 zdis 0.0 print new fric set mech step step lim force 50 solve step 1000 force 50 endcommand xtable(1,n) = new fric ytable(1,n) = log(abs(gp ydisp(ipt))) new fric = new fric - inc fric endloop end FLAC 3D Version 2.06 - 29gen zone brick size 3 5 3 model mohr prop bulk 1e8 shear .3e8 coh 1e4 ten 1e4 fix y range y -0.1 0.1 set grav 0 -10 0 ini dens 2500 set inc fric = 5 series plot table 1 bothFor each run (i.e., execution of the loop), all grid variables are reset and the friction angle is rede?ned. The results are summarized in a table in which the log of incremental displacement is plotted against friction angle (Figure 6.1). The stability limit is seen to be about 65? . The table functions xtable and ytable are described in Section 6.5.5.1.FLAC3D 2.00Step :48 Fri Mar 21 1997Table1 UnNamed Linestyle -2.398e+000 &-& -6.716e-001-0.8-1.0-1.2-1.4-1.6-1.8-2.0-2.25.0Itasca Consulting Group, Inc. Minneapolis, Minnesota USA5.56.06.5 x10e17.07.58.08.5Figure 6.1Plot of log of incremental displacement against friction angle 6 - 30FLAC 3D Version 2.06.4.3FISHCALLFISH functions may be called from several places in the FLAC 3D program. The form of the command isSET?shcall n &remove& nameSetting a ?shcall causes the FISH function name to be called from FLAC 3D from a location determined by the value of ID number n. Currently, the ID numbers shown in Table 6.4 are assigned (at present, they are all in the calculation cycle). The numbers indicate the position that ?shcall is located in the program. Note that ID numbers (in Table 6.4) are placed between speci?c components of the calculation cycle: this indicates the stage at which the corresponding FISH function is called. For example, a function associated with ID 3 would be called just before the stress calculation (stresses from velocities); ID 4 functions would be called just after. The ID number 0 also corresponds to functions that contain the WHILE STEPPING statement ― i.e., these functions are automatically mapped to ID 0. Any number of functions may be associated with the same ID number (although the order in which they are called is unde? if the order is important, then one master function should be called, which then calls a series of sub-functions). Also, any number of ID numbers may be associated with one FISH in this case, the same function will be invoked from several places in the host code. There is a print-out keyword ?shcall (the abreviation is ?shc) that lists the current associations between ID numbers and FISH functions ― i.e., PRINT ?shcall. The SET ?shcall command normally adds the given name to the list already associated with the given ID number. However, the keyword remove placed before the FISH name causes the FISH function to be removed from the list. For example,set fishcall 2 remove xxxwill remove the association between function xxx and ID number 2. Note that a FISH function may be associated twice (or more times) with the same ID in this case, it will be called twice (or more times). The remove keyword will remove only one instance of the function name. FLAC 3D Version 2.06 - 31Table 6.4Assigned ?shcall IDs CONFIG ModeLocation in Calculation Cycle initialization geometry update in large strain ?shcall 1 top of main cycle loop (after incrementing cycle count ?shcall 2 timestep calculated ?shcall 0 begin mechanical calculation ?shcall 3 consti gridpoint forces calculated ?shcall 4 motion calculations ?shcall 5 velocities passed to slaves ?shcall 6 ?shcall 7 thermal-stress calculation ?shcall 8 ?shcall 9 groundwater-?ow calculation ?shcall 10 total stress update ?shcall 12 his mechanical, ?uid-?ow and thermal ratios calculated ?shcall 13 end of main cycle loopall modesall modes all modes mechanical only mechanical only mechanical only mechanical only mechanical only thermal only if thermal made active thermal only ?uid-?ow only if ?uid-?ow made active ?uid-?ow only ?uid-?ow onlyall modesThe numbers listed in Table 6.4 are given symbolic macro names in ?le “FISHCALL.FIS,” the contents of which is listed in Example 6.12: the symbolic names should be used in preference to actual numbers, so that assignments may be changed in the future without the need to change existing FISH functions. 6 - 32FLAC 3D Version 2.0Example 6.12 Listing of “FISHCALL.FIS”set echo macro FC macro FC macro FC macro FC macro FC macro FC macro FC macro FC macro FC macro FC macro FC macro FC macro FC Macro definitions for FishCall numbers ... CYC2 0 XINIT 1 CYC1 2 STRESS 3 XSTRESS 4 XMOT 5 XMECH 6 THERM 7 XTHERM 8 FLUID 9 XFLUID 10 STRESS TOT 12 END CYC 13 onThe data ?le in Example 6.13 illustrates the use of a ?shcall. Function rotation is called just before the motion calculation in FLAC 3D (ID = 4) in order to apply x- and z-velocity components to rotate a grid. This example tests the stress calculation in the large- the σxx and σzz stress components return to their initial values following a cyclic rotation of 30? . For this example, it is necessary for FLAC 3D to perform geometry updates in every cycle: hence the SET geom rep = 1 command. Example 6.13 Illustration of ?shcall use;--- test of stress rotation --config gpextra 2 call fishcall.fis gen zone brick size 1 1 1 mo el prop she 300 bu 300 def ini coord pnt = gp head loop while pnt # null gp extra(pnt,1) = sqrt((gp xpos(pnt)-xc)?2+(gp zpos(pnt)-zc)?2) gp extra(pnt,2) = atan2((gp xpos(pnt)-xc),(zc-gp zpos(pnt))) pnt = gp next(pnt) endloop end set xc=0 zc=0 ini rotate about y-axis tt=tt+delta t FLAC 3D Version 2.06 - 33theta=0.5*amplitude*(1.0-cos(2*pi*freq*tt)) pnt = gp head loop while pnt # null length = gp extra(pnt,1) angle = gp extra(pnt,2) xt = xc + length * sin(angle+theta*degrad) zt = zc - length * cos(angle+theta*degrad) gp xvel(pnt) = xt - gp xpos(pnt) gp zvel(pnt) = zt - gp zpos(pnt) pnt = gp next(pnt) endloop end set fishcall FC XSTRESS ... just before MOTION fix x y z ini sxx 1 set freq=1 delta t=1e-3 amplitude=30 set large hist nstep 2 hist tt hist theta hist zone sxx 1 1 1 hist zone syy 1 1 1 hist zone szz 1 1 1 set geom rep = 1 def series loop nn (1,10) command step 100 plot grid vel red axes black endcommand endloop end plot set cent -.02 .50 .50 size 3.4 mag 0.64 series plot his 3 4 5 vs 1 6 - 34FLAC 3D Version 2.06.5Pre-De?ned Variables, Functions and ArraysThere are certain functions and variables that are built into FISH ― the names of these entities must be avoided when naming user-de?ned variables or functions. This section describes all pre-de?ned entities. The entities are organized in the following categories: scalars, general intrinsic functions, table functions and memory-access functions. In some cases, an entity is listed under more than one category, as appropriate. 6.5.1 FLAC 3D-Speci?c Scalar VariablesThe variables listed in this category have a single value and are speci?cally related to internal FLAC 3D data structures or the solution process. An asterisk (*) denotes that the variable may be assigned a value within a user- otherwise, the variable’s value may only be tested, not set. The variable is of ?oating-point type unless otherwise noted.crdt crtime dim dydt dytime ?dt ?ow ratio ?time gp head i head large mech ratio memfree memsize ngpcreep timestep creep time = 3 (number of spatial dimensions) (integer) dynamic timestep dynamic time ?uid-?ow timestep current ?uid-?ow ratio (set by the SET ratio command) ?uid-?ow time pointer to the top of the gridpoint list pointer to the top of the list of interfaces = zero if small-strain
otherwise, large is non-zero (integer). current mechanical-force ratio (set by the SET ratio command) current free memory (integer) available memory size (integer) total number of gridpoints (integer) FLAC 3D Version 2.06 - 35nzone sel head sellink head selnode head step thdt therm ratio thtime unbal xgrav ygrav zgrav zone head6.5.2 General Scalar Variablestotal number of zones (integer) pointer to the top of the SEL list (pointer) pointer to the top of the structural link list (pointer) pointer to the top of the structural node list (pointer) current step number (integer) thermal timestep current thermal-?ux ratio (set by the SET ratio command) thermal time maximum unbalanced force in grid * x-component of gravity * y-component of gravity * z-component of gravity pointer to the top of the zone list (pointer)The variables listed in this category have a single value and are not speci?cally related to FLAC 3D ; they are general-purpose scalars. An asterisk (*) denotes that a variable may be assigned a value within a user- otherwise, the variable’s value may only be tested, not set. The variables listed below are of ?oating-point type unless declared otherwise.clock degrad grandnumber of hundredths-of-a-second from midnight π/180 (used to convert degrees to radians ― for example, a = cos(30*degrad) gives the cosine of 30? ). random number drawn from normal distribution, with a mean of 0.0 and standard deviation of 1.0. The mean and standard deviation may be modi?ed by multiplying the returned number by a factor and adding an offset. link-list terminator: it is of type pointer. π random number drawn from uniform distribution between 0.0 and 1.0null pi urand 6 - 36FLAC 3D Version 2.06.5.3FLAC 3D - Speci?c Model VariablesThe variables listed in this category are speci?cally related to internal FLAC 3D data structures. The variables are divided into three groups: grid (gridpoint and zone) variables, interface variables and structural element variables. The reserved names in each group refer to variables that require the memory address of the associated object to be speci?ed in parentheses immediately following the name. Functions are provided for each group to locate the appropriate memory address. The variable names must be spelled out in full in FISH they cannot be truncated as in FLAC 3D commands. All model variables are of ?oating point type unless declared otherwise. An asterisk (*) denotes that the variable can be modi?ed by a FISH otherwise, its value may only be tested. 6.5.3.1 Grid Variables The memory address of a gridpoint or zone, located at or near a global coordinate (x, y, z) in space, may be found using the following functions. p gp = gp near(x, y, z) address of gridpoint closest to (x, y, z) p z = z near(x, y, z) address of zone closest to (x, y, z)These functions are time-consuming, as the entire grid must be scanned. Alternatively, the list of gridpoints or zones may be scanned by using headers gp head or zone head, respectively, and the next-item pointers gp next( ) and z next( ). Gridpoint Variablesgp copy(p gpSource, p gpDest)copies the gridpoint state information from the source to the destination gridpoint. This function must be called from an assignment, however the return value is ignored.gp extra(p gp, ind) gp ?ow(p gp) gp id(p gp) gp mass(p gp) gp next(p gp) gp pp(p gp) gp temp(p gp)* value in extra parameter array at index ind for gridpoint p gp (the extra array is created using the CONFIG command) unbalanced ?ow discharge at a gridpoint gridpoint ID number (integer) * gridpoint mass address of next gridpoint in gridpoint list (pointer) gridpoint pore pressure gridpoint temperature FLAC 3D Version 2.06 - 37gp xdisp(p gp) gp xfapp(p gp) gp xfunbal(p gp) gp xpos(p gp) gp xvel(p gp) gp ydisp(p gp) gp yfapp(p gp) gp yfunbal(p gp) gp ypos(p gp) gp yvel(p gp) gp zdisp(p gp) gp zfapp(p gp) gp zfunbal(p gp) gp zpos(p gp) gp zvel(p gp)Zone Variables* x-displacement at gridpoint x-applied force (including body force) x-unbalanced force at gridpoint * x-coordinate of gridpoint * x-velocity at gridpoint * y-displacement at gridpoint y-applied force (including body force) y-unbalanced force at gridpoint * y-coordinate of gridpoint * y-velocity at gridpoint * z-displacement at gridpoint z-applied force (including body force) z-unbalanced force at gridpoint * z-coordinate of gridpoint * z-velocity at gridpointz code(p z)* zone code: 0=brick, 1=wedge, 2=pyramid, 3=dbrick, 4=tetra (integer)z copy(p zSource, p zDest)copies the zone state information from the source zone to the destination zone. This function must be called from an assignment, however the return value is ignored.z density(p z) z extra(p z, ind) z facegp(p z, if, iv) z facesize(p z, if)* zone density * value in extra parameter array index ind for zone p z (the extra array is created using the CONFIG command) pointer to gridpoint on face if and vertex iv, where the integers if and iv are as described in Section 5.2 (pointer) number of gridpoints on face if of the zone (integer) ― see Section 5.2 6 - 38FLAC 3D Version 2.0z fsi(p z, arr) z fsr(p z, arr) z gp(p z,igp) z group(p z) z id(p z) z model(p z)full strain increment tensor (see Strain Calculations, below) full strainrate tensor (see Strain Calculations, below) address of zone gridpoint number igp (pointer) ― see Section 5.2 * zone group name (string) zone ID number (integer) * returns or sets the zone mechanical constitutive model. The constitutive model is identi?ed as a FISH string, string, as follows: Model transversely isotropic elastic model Cam-clay model Creep model for crushed salt Drucker-Prager model linear elastic model Finn liquefaction model Mohr-Coulomb model null model orthotropic elastic model power law creep model plastic WIPP creep model strain hardening/softening model softening ubiquitous joint model ubiquitous joint model viscous creep model WIPP creep model String anisotropic cam-clay cwipp drucker elastic ?nn mohr null orthotropic power pwipp ssoftening subiquitous ubiquitous viscous wippz next(p z) z numgp(p z) z pp(p z) z prop(p z, string)address of next zone in zone list (pointer) number of gridpoints in zone (integer) zone pore pressure * returns or assigns a value to a zone property identi?ed by the name in string (See the PROPERTY command for the names of the properties associated with each constitutive model.) x-component of the speci?c discharge vectorz qx(p z) FLAC 3D Version 2.06 - 39z qy(p z) z qz(p z) z sig1(p z) z sig2(p z) z sig3(p z) z ssi(p z) z ssr(p z) z state(p z)y-component of the speci?c discharge vector z-component of the speci?c discharge vector major principal stress intermediate principal stress minor principal stress shear strain increment (see Strain Calculations, below) shear strainrate (see Strain Calculations, below) plasticity state indicator ?ag ― refer to the discussions on the individual constitutive models in the PROPERTY command for the ?ag setting. (integer) * xx-stress * xy-stress * xz-stress * yy-stress * yz-stress * zz-stress zone volume volume strain increment (see Strain Calculations, below) volume strainrate (see Strain Calculations, below) x-coordinate of zone centroid y-coordinate of zone centroid z-coordinate of zone centroidz sxx(p z) z sxy(p z) z sxz(p z) z syy(p z) z syz(p z) z szz(p z) z volume(p z) z vsi(p z) z vsr(p z) z xcen(p z) z ycen(p z) z zcen(p z) 6 - 40FLAC 3D Version 2.0Strain Calculations There are six FISH zone “variables” ― ssr, ssi, vsr, vsi, fsr, fsi that give user-written functions access to zone strains and strainrates. Note that “shear strainrate” in this context means the square root of the second invariant of the deviatroic strainrate. The following four (read-only) functions return only single values for the zone of address p z:z ssi(p z) z ssr(p z) z vsi(p z) z vsr(p z)maximum shear strain increment maximum shear strainrate volumetric strain increment volumetric strainrateThe following two functions provide all the tensor components, rather than invariants, providing six components in the array arr, which the user must declare beforehand, and which must have at least six elements (the function itself returns a zero).z fsi(p z, arr) z fsr(p z, arr)full strain increment tensor full strainrate tensorThe components in arr are ordered in the following way, according to the array index (given as the ?rst number in the following table). index 1 xx index 2 yy index 3 zz index 4 xy index 5 yz index 6 xz The computation of strainrate is identical to that performed by FLAC 3D when it applies constitutive relations to a zone (see Appendix C) - i.e., strainrates are based on gridpoint velocities and the current coordinates. “Stain increments” are computed with the same equations, but with displacements substituted for velocities. There are two potential problems with the latter calculation. First, gridpoint displacements may be reset or changed at
they are not used in the calculation process. It is the user’s responsibility to ensure that displacements are accumulated over a meaningful interval. Second, the strain increments are based on the geometry at the time of measurement. If the geometry changes signi?cantly during a large-strain simulation, the measured strain will depend on the assumption made about the referenc there are many different formulations for strain to be found in the literature when large displacements are involved. FLAC 3D Version 2.06 - 41The conscientious user may wish to use only the function z fsr, and derive strain increments by accumulation, using some formula of choice. Note that the functions described take a long time to execute. It is rather inef?cient to compute the values for each zone at each time step, i}

我要回帖

更多关于 table.insert 用法 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信