国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

FISH規(guī)則

2020-12-19 16:07 作者:隱生宙語  | 我要投稿

說明的FISH規(guī)則,語法和語句在為FISH變量和函數(shù)選擇名稱時,具有很大的靈活性。

下劃線字符(_)可以包含在名稱中。

名稱必須以字母開頭(即不能為數(shù)字或特殊字符),并且不得包含任何算術(shù)運(yùn)算符(+,-,/,*或^)。

所選名稱不能與內(nèi)置FISH內(nèi)部函數(shù)之一的名稱相同。?

FISH變量名稱不區(qū)分大小寫,因此aVariable和AVARiable是相同的變量。

除了檢查全局符號控制集中的FISH變量/函數(shù)名稱外,還可以使用fish list命令獲取所有當(dāng)前變量和函數(shù)的列表。該命令的結(jié)果是產(chǎn)生所有當(dāng)前值的打印輸出,并按名稱按字母順序排序。

FISH的一些變量形式


model new

fish define types

? ? v1 = 2

? ? v2 = 3.4

? ? v3 = 'Have a nice day'

? ? v4 = v1 * v2

? ? v5 = v3 + ', old chap'

? ? v6 = vector(1,2,3)

? ? v7 = matrix(vector(1,1,1))

? ? v8 = true

end

@types

fish list

(注意最后的fish list 可以列出fish函數(shù)中的值表格比較有用)

fish基本形式:

fish define fname

abc=22*3+5

end

;after run this we need key @fname in the console ,then the value of abc can be see in the FISH Global Symbols.

[abc]

;use this Print value

model new

fish define abc

? ? hh = 22

? ? abc = hh * 3 + 5

end

[abc=0];abc=0

[hh=0];hh=0

[hh];hh=0

[abc];abc=71

[hh];hh=22

; a variable "hh" hh and a FISH function "abc"

;an alternate syntax to achieve the same effect is given below

fish set @abc = 0 @hh = 0

list @hh

list @abc

list @hh

;test

model new

fish define abc

? ? abc = hh * 3 + 5

end

[hh = 22]

[abc]

[abc = 0]?

[hh = 0]

[hh]

[abc]

[hh]

FISH Capturing the history of a FISH variable (捕獲FISH變量的歷史記錄)

model new

zone create brick size 1 2 1

zone cmodel assign mohr-coulomb

zone property shear=1e8 bulk=2e8 cohes=1e5 tens=1e10

zone gridpoint fix velocity range position-y 0.0

zone face apply velocity-y -1e-5 range position-y 2.0

fish define get_ad

? ? ad1 = gp.near(0,2,0)

? ? ad2 = gp.near(1,2,0)

? ? ad3 = gp.near(0,2,1)

? ? ad4 = gp.near(1,2,1)

end

@get_ad

fish define load

? ? load = gp.force.unbal.y(ad1) + gp.force.unbal.y(ad2) ...

? ? ? ? ? ?+ gp.force.unbal.y(ad3) + gp.force.unbal.y(ad4)

end

fish history load

zone history displacement-y position (0,2,0)

model step 1000

plot item create chart-history history 1 vs 2 reverse on

simple use FISH Function in Edit(一些簡單的函數(shù))

model new

fish define derive(y_mod,p_ratio)

? ? s_mod = y_mod / (2.0 * (1.0 + p_ratio))

? ? b_mod = y_mod / (3.0 * (1.0 - 2.0 * p_ratio))

end

[derive(5e8,0.25)]

[b_mod]?

[s_mod]

;The result of these operations can be checked by printing bulk and shear in the usual way (e.g., using the zone list property command).

zone create brick size 2,2,2

zone cmodel assign elastic

zone property bulk [b_mod] shear [s_mod]

zone list prop bulk

zone list prop shear

fish list

FISH 循環(huán),有很多種,具體,應(yīng)該避免簡寫,合理書寫

model new

fish define xxx

? ? sum? = 0

? ? prod = 1

? ? loop for (n = 1, n <= 10, n = n + 1)

? ? ? ? sum? = sum? + n

? ? ? ? prod = prod * n

? ? end_loop

? ? io.out('The sum is ' + string(sum) + ...?

? ? ? ? ? ?' and the product is ' + string(prod))

end

@xxx

;another example and another way

model new

zone create brick point 0 (0,0,0) point 1 (-10,0,0) ...

? ? ? ? ? ? ? ? ? point 2 (0,10,0) point 3 (0,0,-10)

zone cmodel assign elastic

fish define install(y_zero,cc)

? ? loop foreach pnt zone.list

? ? ? ? z_depth = -zone.pos.z(pnt)

? ? ? ? y_mod = y_zero + cc * math.sqrt(z_depth)

? ? ? ? zone.prop(pnt,'young') = y_mod

? ? end_loop

end

@install(1e7,1e8)

zone property poisson 0.25

plot item create zone contour property name 'young'

FISH的選擇語句


model new

fish define abc(xx)

? ? if xx > 0 then

? ? ? ? abc = 33

? ? else

? ? ? ? abc = 11

? ? end_if

end

[abc(1)]

[abc(-1)]

FISH使用在Edit Sequence of excavation and cable placement
(編輯開挖和電纜布置順序)


model new

zone create brick size 10 3 5

zone cmodel assign mohr-coulomb

zone property bulk 1e8 shear 0.3e8 friction 35

zone property cohesion 1e3 tension 1e3

zone initialize density 1000

model gravity 0 0 -10

zone gridpoint fix velocity-x range position-z 0.0

zone gridpoint fix velocity-y range position-z 0.0

zone gridpoint fix velocity-z range position-z 0.0

zone gridpoint fix velocity-y range position-y 0.0

zone gridpoint fix velocity-y range position-y 3.0

zone gridpoint fix velocity-x range position-x 0.0

zone gridpoint fix velocity-x range position-x 10.0

model largestrain on

model history mechanical unbalanced-maximum

model solve

model save 'cab_str'

zone gridpoint initialize displacement-x 0

zone gridpoint initialize displacement-y 0

zone gridpoint initialize displacement-z 0

zone history displacement-x position 0 1 5

fish define place_cables(num,segs)

? ? loop local n (1,num)

? ? ? ? local z_d = 5.5 - float(n)

? ? ? ? local z_t = z_d + 0.5

? ? ? ? local z_b = z_d - 0.5

? ? ? ? command

? ? ? ? ? ? zone gridpoint free velocity-x ...

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? range position-x 0.0 position-z [z_b] [z_t]

? ? ? ? ? ? model solve

? ? ? ? ? ? structure cable create by-line 0.0 0.5 [z_d] 7.0 0.5 [z_d] ...

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?segments [segs]

? ? ? ? ? ? structure cable create by-line 0.0 1.5 [z_d] 7.0 1.5 [z_d] ...

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?segments [segs]

? ? ? ? ? ? structure cable create by-line 0.0 2.5 [z_d] 7.0 2.5 [z_d] ...

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?segments [segs]

? ? ? ? ? ? structure cable property young 2e10 yield-tension 1e8 ...

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?cross-sectional-area 1.0 ...

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?grout-stiffness 2e10 ...

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?grout-cohesion 1e10 grout-perimeter 1.0

? ? ? ? end_command

? ? end_loop

end

@place_cables(5,7)

model save 'cab_end'

FISH Arrays and Maps(fish的數(shù)組和映射)

model new

fish define array_operation

? ? ;create and populate an array with products of 2

? ? arr = array.create(10)

? ? loop local n(1,10)

? ? ? ? arr[n] = 2*n

? ? end_loop

? ? ??

? ? ;compute the sum and product of elements in the array

? ? sum = 0

? ? prod = 1

? ? local i = 1

? ? loop while (i <= array.size(arr,1))

? ? ? ? sum = sum + arr[i]

? ? ? ? prod = prod * arr[i]

? ? ? ? i = i + 1

? ? end_loop

? ? io.out('The sum is ' + string(sum) + ...

? ? ? ? ? ?' and the product is ' + string(prod))

end

@array_operation

;MAP

model new

fish define map_operation

? ? ;create and populate a map with products of 2

? ? my_map = map(1,2)

? ? loop local n(2,10)

? ? ? ? map.add(my_map,n,2*n)

? ? end_loop

? ? ??

? ? ;compute the sum and product of elements in the map

? ? sum = 0

? ? prod = 1

? ? loop foreach n my_map

? ? ? ? sum = sum + n

? ? ? ? prod = prod * n

? ? end_loop

? ? io.out('The sum is ' + string(sum) + ...

? ? ? ? ? ?' and the product is ' + string(prod))

end

@map_operation


FISH規(guī)則的評論 (共 條)

分享到微博請遵守國家法律
阳曲县| 育儿| 剑河县| 河源市| 信宜市| 张北县| 桐梓县| 龙泉市| 兰西县| 衢州市| 景谷| 尚义县| 威信县| 商河县| 平邑县| 屏南县| 金溪县| 江津市| 岗巴县| 遂川县| 抚远县| 鄂伦春自治旗| 巴彦淖尔市| 紫阳县| 平邑县| 浮山县| 灯塔市| 绩溪县| 昌平区| 新化县| 彭州市| 中方县| 易门县| 永顺县| 河北区| 简阳市| 凭祥市| 新余市| 千阳县| 沾化县| 饶河县|