flac3d仅显示模型塑形区部分单元体(2)
(2015-04-14 14:33:33)
标签:
佛学
flac3d
仅显示塑形区
|
分类:
flac3d
|
C++ Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
|
set logfile myfile.log
set log on
DEF _States
shearnow = 1 ; 1
tensionnow = 2 ; 2
shearpast = 4 ; 3
tensionpast = 8 ; 4
jointshearnow = 16 ; 5
jointtensionnow = 32 ; 6
jointshearpast = 64 ; 7
jointtensionpast = 128 ; 8
volumenow = 256 ; 9
volumepast = 512 ; 10
;
; Quick reference
; Model States used
; ------ -----------
; Cam-Clay 1 - 2
; Drucker-Prager 1 - 4
; Mohr-Coulomb 1 - 4
; Strain-Hardening/Softening 1 - 4
; Ubiquitous-Joint 1 - 4, 5 - 8
; Bilinear, Strain-Hardening/
; Softening Ubiquitous-Joint 1 - 8
; Double-Yield 1 - 4, 9 - 10
; Finn 1 - 4
; WIPP- Creep Viscoplastic model 1 - 4
;
END
;
_States
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
def plasticarrange
my_query = shearnow + tensionpast;若my_query等于3就是shearnow和tensionnow破坏,若是9则是Shear-now and Tension-past
; define output
my_output = 'Shear-now and Tension-past';定义一个字符串
;
pnt=zone_head
loop while pnt # null
curr_state=z_state(pnt,0) ; z_state(pnt,0)返回0- any所有塑性; 1-average;
result_and_op = and(curr_state, my_query);and(0,3)什么意思?,怎么可以连接
if curr_state # 0
z_group(pnt)='yield';
else
z_group(pnt)='other'
endif
;;;;;;;;;;;;;;;
if result_and_op # 0 then
ii = out('zone' + string(z_id(pnt)) + ':'+ my_output )
else
_zId = string(z_id(pnt))
_res = string(result_and_op)
ii = out('zone' + _zId +':'+'result_and_op'+ _res )
end_if
pnt=z_next(pnt)
endloop
end
plasticarrange
pr curr_state
;model null range group other
plot creat qqq
plot add surf red range group yield
plot add sk range group other
plot show qqq
set log off
return
|
喜欢
0
赠金笔
加载中,请稍候......