flac3d中赋密度用propdefs.ini和ini有什么区别

13357人阅读
FLAC数值模拟(1)
建议:初学者将FLAC/FLAC3D版所有帖子都浏览一遍;学有所得后,再浏览一遍,会发现又有新的收获。
第一部分(相关链接)
1. FLAC3D知识基本介绍SimWe
/forum/viewthread.php?tid=164959&extra=page%3D6%26filter%3Dtype%26typeid%3D38
2.FLAC使用FAQ
/forum/thread--17.html
3.复杂模型建立的前处理(这么多款,总有一款适合你吧,可以说导入问题已经解决,看到此资料者,以后不要再发求接口程序帖)真
推荐采用有限元软件进行复杂模型建模,网格划分,保存几何信息,导入FLAC3D。有限元软件建模可以到论坛相应版块学习。以下是有限元软件与FLAC3D的接口程序下载地址:
4.FLAC3D后处理
个人以为用tecplot进行FLAC3D结果的后处理,看下面两个帖子就可以速成了。
/forum/thread--1.html
关于dd、dip及origin的问题(仔细看,琢磨琢磨,是很搞人,推荐用ori( ) nor( )的方式确定一个面,即高数书中点法式确立面的方法)
/forum/viewthread.php?tid=217911&highlight=dip
10.自定义本构模型的开发
11. 空间任意平面上固定约束的施加
/forum/viewthread.php?tid=375156&highlight=dip
12. 如何显示最大位移点的坐标?
13.几个快捷键命令
14. 查看各个时段不平衡力的具体数值
15. 在flac3D中gp_head,gp_next,zone_head 等类似的变量是怎么定义的
16. 如何在剖面上显示各种应力和位移
17.手册中渗流的例子(版主有详细说明)
/forum/viewthread.php?tid=520548&highlight=apply%2Bini
塑性铰的问题与讨论
将多条曲线画在同一坐标系的方式
桩的参数指定问题
手册中的PILE单元的中文翻译
geogrid单元的部分中文翻译
结构单元中SLIDE的作用和计算方法详述
隧道初期支护中的&钢拱架&应该如何建立
流固耦合手册现场翻译直播
如何输出某一节点随时间的孔压变化
中文流固耦合资料
动力分析入门:一个简单的动力分析模型
结构单元的动力响应分析
动力时间步究竟如何计算?
共享一个隧道计算的例子
1.请问在圆柱体四周如何施加约束条件?
可以用fix ... ran cylinder end1 end2 radius r1 cylinder end1 end2 radius r2 not,其中r2&r1,其实就是选择range的时候选两个圆柱的差,即得到边界。命令流如下:
newgen zone cyl p1 1 0 0 p2 0 4 0 p3 0 0 1 size 12 30 12gen zone refle norm 1 0 0 gen zone refle norm 0 0 1mo ssprop den 2500 bulk 2e8 she 1e8 co 2e6 fric 45 ten 1e6 dil 10prop ftab 1 ctab 2 dtab 3table 1 0 45 0.05 42 0.1 40 1 40table 2 0 2e6 0.05 1e6 0.1 5e5 1 5e5table 3 0 10 0.05 3 0.1 0fix x range end1 1 0 0 end2 1 4 0 rad 1 end1 0.5 0 0 end2 0.5 4 0 rad 0.5回答:加上的约束不对!
fix x range end1 1 0 0 end2 1 4 0 rad 1 end1 0.5 0 0 end2 0.5 4 0 rad 0.5回答:上面的rad 是不是相差太大了?是不是在1左右来限制了
2.关于计算不收敛问题
;初始网格gen zone radcyl p0 15 0 -15.75 p1 add 15 0 0 p2 add 0 6 0 p3 add 0 0 15.75 &size 3 4 8 5 dim 2.25 2.25 2.25 2.25 rat 1 1 1 1.1 fillgen zone radtun size 3 4 3 5 dim 0.75 2.25 0.75 2.25 rat 1 1 1 1.1 &&p0 15 0 -15.75 p1 add 0 0 -14.25 p2 add 0 6 0 p3 add 15 0 0 fillgen zone reflect dip 90 dd 270 ori 15 0 -15.75; 摩尔库仑模型model mohrmacro niyan 'bulk 3.2825e3 shear 1.5150e3 fric 20 coh 0.07'macro meiceng 'bulk 2.1735e3 shear 8.8917e2 fric 19 coh 0.05'prop niyan range z =-13.5 0prop meiceng range z =-15.5 -13.5prop niyan range z = -30 -15.5;为开挖定义整体部分range name in z -15.75 0 cyl end1 15 0 -15.75 end2 15 6 -15.75 rad 2.25 range name hangdao x 12.75 17.25 y 0 6 z -16.50 -15.75;进行加载fix x y z range z -30.001 -29.999app sxx=-20 range x -0.001 0.001app sxx=-20 range x 29.999 30.001app syy=-20 range y -0.001 0.001app syy=-20 range y 5.999 6.001app szz=-20 range z -0.001 0.001 solve          (1)model null range in model null range hangdaorange name in z -15.75 0 cyl end1 15 0 -15.75 end2 15 6 -15.75 rad 2.25range name hangdaoliangce1 x 12.749 12.751 y 0 6 z -16.50 -15.75range name hangdaoliangce2 x 17.249 17.251 y 0 6 z -16.50 -15.75range name hangdao x 12.75 17.25 y 0 6 z -16.501 -16.499apply nstress -0.05 plane dip 90 dd 0 range in ; 给巷道底部加压力
app nstress -0.05 plane dip 90 dd 0 range hangdao ; 给巷道直墙部分(左侧)加压力
apply nstress -0.05 plane dip 90 dd 0 range hangdaoliangce2
; 给巷道直墙部分(右侧)加压力
apply nstress -0.05 plane dip 90 dd 0 range hangdaoliangce1;对点进行监测hist unbalhist gp xdisp 12.75 0 -15.75 :监测左帮hist gp zdisp 15 0 -13.5 ;监测顶板hist gp zdisp 15 0 -16.5 ;监测底板solve
问:第一个solve平衡了,是第二个solve不能平衡,这是为什么?如果我把支护力加大,也不能平衡?
回答:我遇到的不收敛的原因,有两个:1)检查你的模型是不是没有建好,相互之间是不是没有连接好;2)仔细检查你的参数,是不是已经发生了破坏。
回答:力施加有问题,隧道底部隆起破坏,所以无法计算
问:我这个模型就是该模型就是要出现巷道底臌现象,如果按照你的意思,力应该怎样施加才对? 回答:如果无法收敛,应该用step命令,关键问题是要运行多少步。
命令流如下:
g 10 10m edef distortloop i (2,jzones)loop j (2,jzones)x(i,j) =x(i,j)+mag*(urand-0.5)y(i,j)=y(i,j)+mag*(urand-0.5)end_loopend_loopendprop d 1000 sh 1e8 bu 2e8其中:x(i,j) =x(i,j)+mag*(urand-0.5)中的urand是否是随机生成数的命令?
urand :random number drawn from uniform distribution between 0.0 and 1.0;grand :random number drawn from normal distribution: mean = 0.0; standard deviation = 1.0
4. 问:怎么能把一个PLOT的图像数据导出来以便用其他软件绘图?回答:用set log on 命令,把数据导出来,转到excel里处理一下,然后用surfer或者什么作图软件绘制就行了。
5. 问:用命令建立模型后,如何显示点的坐标?
回答:使用plo blo gro gpnum on命令
6.interface问题
问:我加了一个层面,初始平衡就出现了这么大的位移?是怎么原因?;No1gen zone brick p0 0 0 0 p1 10 0 0 p2 0 10 0 p3 0 0 8 &size 8 8 6 rat 1.02 1.02 1.02gen zone brick p0 0 0 9 p1 10 0 9 p2 0 10 9 p3 0 0 11 &size 8 8 2 rat 1.02 1.02 1.02gen zone reflect dip 90 dd 90 origin(0,0,6) range z 0 11group layer1 range z 9 11;interface 1 face range plane norm (0,0,1) origin (0,0,8) dist 0.01ini z add -1.0 range group layer1;No2gen zone brick p0 0 0 11 p1 10 0 11 p2 0 10 11 p3 0 0 13 &size 8 8 2 rat 1.02 1.02 1.02gen zone reflect dip 90 dd 90 origin(0,0,1) range z 11 13group layer2 range z 11 13;interface 2 face range plane norm (0,0,1) origin (0,0,10) dist 0.01ini z add -1.0 range group layer2;No3gen zone brick p0 0 0 13 p1 10 0 13 p2 0 10 13 p3 0 0 14 &size 8 8 1 rat 1.02 1.02 1.02gen zone reflect dip 90 dd 90 origin(0,0,1) range z 13 14group layer3 range z 13 14;interface 3 face range plane norm (0,0,1) origin (0,0,12) dist 0.01ini z add -1.0 range group layer3;No4gen zone brick p0 0 0 14 p1 10 0 14 p2 0 10 14 p3 0 0 15 &size 8 8 1 rat 1.02 1.02 1.02gen zone reflect dip 90 dd 90 origin(0,0,1) range z 14 15group layer4 range z 14 15interface 4 face range plane norm (0,0,1) origin (0,0,13) dist 0.01ini z add -1.0 range group layer4;No5gen zone brick p0 0 0 15 p1 10 0 15 p2 0 10 15 p3 0 0 17 &size 8 8 2 rat 1.02 1.02 1.02gen zone reflect dip 90 dd 90 origin(0,0,15) range z 15 17group layer5 range z 15 17interface 5 face range plane norm (0,0,1) origin (0,0,14) dist 0.01ini z add -1.0 range group layer5;No6gen zone brick p0 0 0 17 p1 10 0 17 p2 0 10 17 p3 0 0 18 &size 8 8 1 rat 1.02 1.02 1.02gen zone reflect dip 90 dd 90 origin(0,0,1) range z 17 18group layer6 range z 17 18interface 6 face range plane norm (0,0,1) origin (0,0,16) dist 0.01ini z add -1.0 range group layer6;No7gen zone brick p0 0 0 18 p1 10 0 18 p2 0 10 18 p3 0 0 20 &size 8 8 2 rat 1.02 1.02 1.02gen zone reflect dip 90 dd 90 origin(0,0,1) range z 18 20group layer7 range z 18 20;interface 7 face range plane norm (0,0,1) origin (0,0,17) dist 0.01ini z add -1.0 range group layer7;No8gen zone brick p0 0 0 20 p1 10 0 20 p2 0 10 20 p3 0 0 24 &size 8 8 3 rat 1.02 1.02 1.02gen zone reflect dip 90 dd 90 origin(0,0,17) range z 20 24group layer8 range z 20 24;interface 8 face range plane norm (0,0,1) origin (0,0,19) dist 0.01ini z add -1.0 range group layer8;No9gen zone brick p0 0 0 24 p1 10 0 24 p2 0 10 24 p3 0 0 29 &size 8 8 4 rat 1.02 1.02 1.02gen zone reflect dip 90 dd 90 origin(0,0,0) range z 24 29group layer9 range z 24 29;interface 9 face range plane norm (0,0,1) origin (0,0,23) dist 0.01ini z add -1.0 range group layer9;----------边界条件------------------------fix x range x -20.1 -19.9fix x range x 19.9 20.1fix y range y -0.1 0.1fix y range y 9.9 10.1fix z range z -0.1 0.1;-----------初始条件-------------------------apply szz -26e6 range z 27.9 28.1initial szz -1.08e6 grad 0 0 2.6e4 range z 0 28set gravity 0 0 -10initial density 2.6e3initial sxx -45.8e6 grad 0 0 2.6e4 range z 0 28initial syy -45.8e6 grad 0 0 2.6e4 range z 0 28;---------------------------------------------model mohr;-----------材料属性--------------------------;-----------No1-----------------------pro bulk 8e9 shear 7e9 fric 25 coh 7.5e6 ten 2.6e6 range z 0 8 ;-----------No2-------------------------pro bulk 7.8e9 shear 3.5e9 fric 30 coh 6.5e6 ten 2.4e6 range z 8 10;------------No3---------------------pro bulk 7e9 shear 3.0e9 fric 22 coh 5.5e6 ten 2.2e6 range z 10 12;------------No4-----------------------------pro bulk 6e9 shear 2.3e9 fric 26 coh 5.5e6 ten 2.0e6 range z 12 13;-----------No5-----------------------------------pro bulk 6.2e9 shear 2.0e9 fric 28 coh 5.2e6 ten 1.2e6 range z 13 14;-------------------No6------------------------pro bulk 5.8e9 shear 2.5e9 fric 35 coh 6.0e6 ten 1.3e6 range z 14 16;-------------------No7------------------------pro bulk 9e9 shear 3.2e9 fric 30 coh 10.3e6 ten 1.2e6 range z 16 17;-------------------No8------------------------pro bulk 8.1e9 shear 3.1e9 fric 26 coh 8.0e6 ten 1.5e6 range z 17 19;-------------------No9------------------------pro bulk 7.6e9 shear 2.6e9 fric 23 coh 8.5e6 ten 1.8e6 range z 19 23;-------------------No10------------------------pro bulk 7.5e9 shear 2.1e9 fric 26 coh 8.0e6 ten 1.9e6 range z 23 28;int 1 prop ks 8e10 kn 8e10 fric 30 dil 6 tension 2e7 bslip=on;int 2 prop ks 8e10 kn 8e10 fric 30 dil 6 tension 2e7 bslip=on;int 3 prop ks 8e10 kn 8e10 fric 35 dil 8 tension 2e7 bslip=onint 4 prop ks 9e11 kn 9e11 fric 32 dil 5 tension 2e7 bslip=onint 5 prop ks 9e11 kn 9e11 fric 32 dil 5 tension 2e7 bslip=onint 6 prop ks 8e11 kn 8e11 fric 33 dil 5 tension 2e7 bslip=on;int 7 prop ks 8e10 kn 8e10 fric 33 dil 5 tension 2e7 bslip=on;int 8 prop ks 8e10 kn 8e10 fric 33 dil 5 tension 2e7 bslip=on;int 9 prop ks 8e10 kn 8e10 fric 33 dil 5 tension 2e7 bslip=onhist unbalstep 5000
apply szz -26e6 range z 27.9 28.1initial szz -1.08e6 grad 0 0 2.6e4 range z 0 28set gravity 0 0 -10initial density 2.6e3initial sxx -45.8e6 grad 0 0 2.6e4 range z 0 28initial syy -45.8e6 grad 0 0 2.6e4 range z 0 28initial szz -1.08e6 grad 0 0 2.6e4 range z 0 28initial density 2.6e3initial sxx -45.8e6 grad 0 0 2.6e4 range z 0 28initial syy -45.8e6 grad 0 0 2.6e4 range z 0 28
这是给的模型加的初始地应力,难道这样加地应力,模型就自动平衡了吗?
回答:你用ini平衡,为什么还要计算5000步?
问:我的INI是用来施加初始地应力的,难道用INI那样加应力边界条件就不用step 或solve算平衡了吗? 模型就能自动平衡吗?
;-----------初始条件-------------------------apply szz -26e6 range z 27.9 28.1initial szz -1.08e6 grad 0 0 2.6e4 range z 0 28set gravity 0 0 -10initial density 2.6e3initial sxx -45.8e6 grad 0 0 2.6e4 range z 0 28initial syy -45.8e6 grad 0 0 2.6e4 range z 0 28
回答:把上面的sxx和syy的剃度2.6e4改为9e3试一下,xx和yy方向的梯度不可能与zz方向的梯度一样的。
7.关于ff边界设置的问题
自由场地边界(FF边界)在动力分析中经常采用,它的原理是采用粘滞阻尼器来模拟静止边界,将自由场节点的不平衡力加到主体的网格边界上。注意:模型底部的动力边界条件应当在app ff之前,进行app ff以后底部的边界条件就自动转为自由场地边界。现举出一简单例子,比如静力模型的尺寸为10*10*10,有以下几种边界施加方式1)free x y z rang z -.1 .1apply squiet dquiet nquiet rang z -.1 .1apply nstress value hist wave rang z -.1 .1apply ff2)free x y z rang z -.1 .1apply ffapply squiet dquiet nquiet rang z -.1 .1apply nstress value hist wave rang z -.1 .13)free x y z rang z -.1 .1apply squiet dquiet nquiet rang z -.1 .1apply ffapply nstress value hist wave rang z -.1 .1
可以验证,以上的施加方式得到的结果是完全一样的.所谓的自由场边界最重要的特征就是复制特征,现对以上各例子做简要分析.1)第二三两句就是在10*10的底面范围内分别设置静止边界和动力条件,当加了ff后,ff的网格的条件即从临近的maingrid的zone进行复制.所以ff的底面的位移边界和动力和maingrid完全一样.2)第二句直接加ff边界,注意这时ff底面是free的,而且动力为0,但是接下来的3.4两句仅仅给定的是z=-.1至.1的范围,导致ff的底面也包括在内了,所以作用方式和命令流1完全相同.3)同2的分析,同样可以得到结论但是对于以上三个命令流中的两句apply squiet dquiet nquiet rang z -.1 .1apply nstress value hist wave rang z -.1 .1如果在maingrid内也指定了范围的话,情形就不一样了,比如2命令流改为apply squiet dquiet nquiet rang z -.1 .1 x 0 10 y 0 10apply nstress value hist wave rang z -.1 .1 x 0 10 y 0 10这样就相当于ff的底面为ff且动力为0,而maingrid的底面为quiet且动力为nstress=value*wave.
假如先重力平衡,分
1)fix z rang bottom情况
在加quiet边界和应力波边界的时候需要先free z rang bottom吗,手册上也有app dquiet squiet,后app nvel 0 rang bottom,如果app sxz his wave 是不是就不用free z了2)fix x y z rang bottom情况因为手册上有加quiet边界,反力就会自动加载在quiet边界上,所以是不是根本就不用free x y z呢?像free 与不free的地表响应加速度差别很大呢.
手册中有这个例子:free x y z rang z -.1 .1apply squiet dquiet nquiet rang z -.1 .1apply nstress value hist wave rang z -.1 .1apply ff我的理解是:第一句:释放底面约束,为下面的输入提供条件第二句:在底面施加quiet边界条件第三句:在底面输入外荷载第四句:是在模型的四周施加自由场边界,底面是当然没有自由场边界的。手册讲ff时有个图形,很清楚的显示只在模型的四周和四个边角处有自由边界条件的。另外,很容易理解上面几种情况的计算结果是相同的。因为flac里一般是不讲先后顺序的,只要你在solve之前都设置好了就可以了。不过对于apply ff命令手册里好像提到了一个限制:(K17)The dynamic boundary conditions at the base of the model should be specified before applying the free-field. 即:在施加自由场边界之前应设置好模型底面的动力边界条件。
8.复杂模型内部接触面的建立方法
最近经常遇到一些朋友在工程项目当中遇到计算模型中接触面方面的问题,大多都很类似,主要是因为在前期计算当中忽略了可能存在的接触面影响,从而在建模中没有考虑到建立接触面。而由于FLAC3D的接触面的建立必须存在两个界面,因此通常的做法是在建模中首先建立两个分开的模型,然后再一个模型表面建立接触面,最后将另外一个模型&移动&过来。而这种方法在已完成的模型当中就不能凑效了,同时因为模型通常都较复杂,建模本身花费的精力就是巨大的,如果修改模型的话,那造成大量不必要的重复劳动。本文推荐一种更加实用的接触面建立方法,通过238版本后的impgrid、expgrid等命令进行模型导入导出,花费很少的时间就可以解决复杂模型的接触面建立问题。下面用一个实例来做一下说明。工况:3*3*3的模型,两个group,模型正中间的一个单元为gropu 2,其他为group 1,如图所示。
现在要在14号单元(即group1)周围加上接触面,模拟实际工程中可能存在的内部结构的接触面问题。下面是工作步骤:(1)将模型文件存为1.sav;(2)将除了需要加接触面的单元以外的所有单元删除,仅保存group 2命令为:del ran group 2 not;(3)在group 2 周围建立接触面,命令为:interface 1 face range x 1 y 1 2 z 1 2interface 1 face range x 2 y 1 2 z 1 2interface 1 face range x 1 2 y 1 z 1 2interface 1 face range x 1 2 y 2 z 1 2interface 1 face range x 1 2 y 1 2 z 1interface 1 face range x 1 2 y 1 2 z 2建成后可以看到接触面的效果:plo inter yel ske
可以用interface 1 face命令来默认建立整个模型的外表面接触面,这个将更加方便实用。对于复杂模型,大家可以试一试。
(4)这时候需要将上面建好的group 2 和接触面进行保存save 2.sav(5)重新restore先前的模型,并将需要建立接触面的实体删除,再将整个模型用expgrid命令进行导出:rest 1.savdel ran group 2expgrid 1.fac3d
下面的工作是这样的:将已建好的group 2和接触面的文件rest,并把其他的模型用impgrid命令进行导入:rest 2.savimpgrid 1.flac3d得到的就是已经建立好接触面的模型
下面进行简单的计算,以验证接触面是否工作。model elaprop bulk 20e8 shear 30e8fix x y z ran z 0ini den 2000set gra 0 0 -10interface 1 prop kn 20e6 ks 20e6 c 10e3 f 15app nstr -200e3 ran x 0 1 y 1 2 z 3solve
可以看到接触面的接应力分布结果:
10.关于gauss_dev对性质进行高斯正态分布的问题?
根据手册上的说明:下面的命令设定一个平均摩擦角为40度,标准方差是&5%。则命令如下:prop friction 40 gauss_dev 2问题:请问gauss_dev 2中的2是如何计算的?如果把&5%改为&10%,则命令应如何写?
11.子程序运行方式
问题如下:进行迭代时子程序是如何运行的?下面命令流运行后,红色子程序仅运行一次,而绿色部分则在每次迭带时均调用。能否请高手详细结实一下程序的运行规则?为什么绿色每次调用,而红色只调用一次?
newtitle Direct shear testset log onset logfile fa3.4.loggen zone brick size 12 1 10 p0 4 0 6 p1 16 0 6 p2 4 1 6 p3 4 0 11gen zone brick size 20 1 10 p1 20 0 0 p2 0 1 0 p3 0 0 5range name bot z 0 5range name top z 6 11interface 1 face range z 5int 1 prop ks 4e4 kn 4e4 fric 30 dil 6 ;tension 1e10 bslip=onini z add -1.0 range top;plo surf lorange interface white axes blackmodel eprop bulk 45e3 sh 30e3fix x y z range z 0fix x range x 0fix x range x 20plot create view/_intplot add surfaceplot add interface redplot show;pauseapply nstress -10 range z 10step 0plot contour szz interface white axes black;step 100solve;pausesave dsta.savini xvel 5e-7 range topfix xvel range topdef ini_jdispvalnd = 0.0count = 0.0p_in=i_node_head(i_head)loop while p_in # nullif in_ztarget(p_in) # null thenvalnd = valnd + in_pen(p_in)count = count + 1.0end_ifp_in = in_next(p_in)end_loopnjdisp0 = valnd/countendini_jdispdef sstavvalns = 0.0valss = 0.0valsd = 0.0valnd = 0.0count = 0.0p_in=i_node_head(i_head)loop while p_in # nullif in_ztarget(p_in) # null thenvalns = valns + in_nstr(p_in)*in_area(p_in)valss = valss + in_sstr(p_in,1)*in_area(p_in)valsd = valsd + in_sdisp(p_in,1)valnd = valnd + in_pen(p_in)count = count + 1.0end_ifp_in = in_next(p_in)end_loopsstav = valss/(12.0*1.0)nstav = valns/(12.0*1.0)sjdisp = valsd/countnjdisp = valnd/count - njdisp0endsstav
hist ns 1hist sstav nstav sjdisp njdisp ini xdis 0 ydis 0 zdis 0step 2500save dst.savplot his -1 vs -3;pauseplot his -4 vs -3print nstav;pauseret
12. reflect问题
问:1)gen zone radbrick &p0 (0,0,0) p1 (10,0,0) p2 (0,10,0) p3 (0,0,10) &size 3,5,5,7 &ratio 1,1,1,1.5 &dim 1 4 2 fillplot surfgen zone reflect dip 0 dd 90
这个是以xy平面作为对称面来对称。那么下面这句话:gen zone reflect dip 90 dd 90按照上面的分析应该按照xz平面对称,可是manual是yz平面,按理说应该是yz面;2)关于dd的理解:dip-direction angle, measured in the global xy-planeclockwise from the positive y-axis 这个是从y轴到x顺时针方向所转过的角度;dip dip angle, measured in the negative z-direction from the global xy-plane 这个是xy平面与z轴负方向的夹角。
dip表示对称参照面与xy平面的夹角,对称参照面与xy平面的夹角在xy平面的投影是一条射线 ,dd表示y轴正向顺时针到那条射线的夹角。首先应该按照dd的方向大体确定这个面的朝向,dd 指的是从y轴正方向按顺时针(clockwise)方向转向所要确定面的法线方向在xy平面上的投影的夹角,然后再确定dip,dip指的是从xy平面转向所要确定的平面的角.
gen zone reflect dip 90 dd 90是以YZ面.gen zone reflect dip 90 dd 0 才是以xz为对称面的.
dip-direction 这个是从y轴到x顺时针方向所转过的角度,如果dd=0,那不就是y轴了吗?所以gen zone reflect dip 90 dd 0 不应是xz面,应该是yz面啊?
回答:dip-direction 是倾向,也就是所求面的法向在XY面上的投影的,dd 0表示倾向是0度既是Y轴正方向,所以是XZ面,那dip=0时,即平面与xy的夹角为0,也就是平行于xy面,还要定义dd干吗?dd为任何值不都一样吗?
13.第二次国际会议上的一个示例模型def tunnel_datax0 = 0.0y1 = 0.0z0 = 0.0rad = 1.0base = 0.7height = 0.5dx = 2.0dz = 2.0y2 = 5.0y3 = 15.0xr = 4.0zt = 4.0nx = 4nr = 3nu = 4nz1 = 4nxr = 5nzt=5ny1 = 8ny2=4raty = 1.2ratr = 1.5
;*** DERIVED PARAMETERS ***nz2 = 2* upper-right and top zonesratr2=1/ratr;Compute x-coordinatesx1 = x0+radx2 = x0+dxx3 = x0+base; Compute arc center (x4,z0) to fit arc-points (x1,z0) and (x0+base,z0-height)x4=x0+(rad*rad-base*base-height*height)/(2.0*(rad-base)); Compute radius of lower arcrad2=rad-(x4-x0)x7=x0+sqrt(2.0)/2*rad; compute inner points for radtunnel - adjust based on nx,nu zonesx5=(x0*nu+x7*nx)/(nx+nu)x5c=(nu*x0+nx*x7)/(nx+nu)x5b=(nu*x0+2*nx*x7)/(2*nx+nu)x6=(x0*nu+x2*nx)/(nx+nu);Compute z coordinatesz1 = z0+radz2 = z0+dzz4 = z0-dzz5 = z0-heightz6 = (z0+z4)/2z8=z0+sqrt(2.0)/2*radz7=(z0*nu+z8*nx)/(nx+nu)z7c=(nu*z0+nx*z8)/(nx+nu)z7b=(nu*z0+2*nx*z8)/(2*nx+nu);slope constant of lower arcdxz=(x3-x1)/(z5-z0);slope constants of upper arcdxz2=(z8-z0)/(x7-x1)dxz3=(x7-x0)/(z8-z1)enddef make1if y1#y2 thencommand; top and upper-right outsidegen zone radcyl size nx ny1 nz2 nr ratio 1 1 1 ratr group 'g1' &p0 x0 y1 z0 & p1 x2 y1 z0 & p2 x0 y2 z0 & p3 x0 y1 z2 & &p4 x2 y2 z0 & &p5 x0 y2 z2 & p6 x2 y1 z2 & p7 x2 y2 z2 & p8 x1 y1 z0 & p9 x0 y1 z1 & p10 x1 y2 z0 & p11 x0 y2 z1
&&&&&&&&end_commandend_ifif y2#y3 thencommandgen zone radcyl size nx ny2 nz2 nr ratio 1 raty 1 ratr group 'g1' &p0 x0 y2 z0 & p1 x2 y2 z0 & p2 x0 y3 z0 & p3 x0 y2 z2 & &&p4 x2 y3 z0 & p5 x0 y3 z2 & p6 x2 y2 z2 & p7 x2 y3 z2 & &p8 x1 y2 z0 & p9 x0 y2 z1 & p10 x1 y3 z0 & &p11 x0 y3 z1&&&&&&&end_commandend_ifenddef make2if y1#y2 thencommand; lower-right outsidegen zone radcyl size nx ny1 nz1 nr ratio 1 1 1 ratr group 'g2' &p0 x4 y1 z0 & &p1 x2 y1 z4 & &p2 x4 y2 z0 & &&p3 x2 y1 z0 & &p4 x2 y2 z4 & &p5 x2 y2 z0 & &p6 x2 y1 z6 & &p7 x2 y2 z6 & &p8 x3 y1 z5 & &p9 x1 y1 z0& p10 x3 y2 z5 & &p11 x1 y2 z0
&&&&&&&end_commandend_ifif y2#y3 thencommand; lower-right outsidegen zone radcyl size nx ny2 nz1 nr ratio 1 raty 1 ratr group 'g2' &p0 x4 y2 z0 & p1 x2 y2 z4 & &p2 x4 y3 z0 & p3 x2 y2 z0 & &p4 x2 y3 z4 & p5 x2 y3 z0 & &p6 x2 y2 z6 & p7 x2 y3 z6 & p8 x3 y2 z5 & &p9 x1 y2 z0 &&&p10 &x3 y3 z5 & &p11 x1 y3 z0&end_commandend_ifenddef make3if y1#y2 thencommand; bottom outsidegen zone brick size nx ny1 nr ratio 1 1 ratr2 group 'g3' &p0 x0 y1 z4 & p1 x6 y1 z4 & p2 x0 y2 z4 & &p3 x0 y1 z5 & p4 x6 y2 z4 & &p5 x0 y2 z5 & &p6 x5 y1 z5 & &p7 x5 y2 z5&&&&&&&end_commandend_ifif y2#y3 thencommand; bottom outsidegen zone brick size nx ny2 nr ratio 1 raty ratr2 group 'g3' &p0 x0 y2 z4 & p1 x6 y2 z4 & &p2 x0 y3 z4 & &p3 x0 y2 z5 & &p4 x6 y3 z4 &&p5 x0 y3 z5 & &p6 x5 y2 z5 & &p7 x5 y3 z5&&&&&&&&&end_commandend_ifenddef make4if y1#y2 thencommand; bottom-right outsidegen zone brick size nu ny1 nr ratio 1 1 ratr2 group 'g4' &p0 x6 y1 z4 & p1 x2 y1 z4 &&&&&&&p2 x6 y2 z4 & &p3 x5 y1 z5 & &p4 x2 y2 z4 & &p5 x5 y2 z5 & &&p6 x3 y1 z5 & &&p7 x3 y2 z5end_commandend_ifif y2#y3 thencommand; bottom-right outsidegen zone brick size nu ny2 nr ratio 1 raty ratr2 group 'g4' &p0 x6 y2 z4 &p1 x2 y2 z4 &p2 x6 y3 z4 &&p3 x5 y2 z5 &&p4 x2 y3 z4 &&p5 x5 y3 z5 &&p6 x3 y2 z5 &p7 x3 y3 z5end_commandend_ifenddef make5if y1#y2 thencommand; top insidegen zone radtunnel size nx ny1 nx nu group 'g5' &p0 x0 y1 z0 &p1 x7 y1 z0 &p2 x0 y2 x0 &p3 x0 y1 z8 &p4 x7 y2 z0 &p5 x0 y2 z8 &p6 x7 y1 z8 &p7 x7 y2 z8 &p8 x5c y1 z0 &p9 x0 y1 z7c &p10 x5c y2 z0 &p11 x0 y2 z7c &p12 x5b y1 z7b &p13 x5b y2 z7bgen zone brick size nx ny1 nx group 'g5' &p0 x0 y1 z0 &p1 x5c y1 z0 &p2 x0 y2 z0 &p3 x0 y1 z7c &p4 x5c y2 z0 &p5 x0 y2 z7c &p6 x5b y1 z7b &p7 x5b y2 z7bend_commandend_ifif y2#y3 thencommand; top insidegen zone radtunnel size nx ny2 nx nu ratio 1 raty 1 group 'g5' &p0 x0 y2 z0 & p1 x7 y2 z0 & p2 x0 y3 x0 &p3 x0 y2 z8 &p4 x7 y3 z0 &p5 x0 y3 z8 &p6 x7 y2 z8 &p7 x7 y3 z8 &p8 x5c y2 z0 &p9 x0 y2 z7c &p10 x5c y3 z0 &p11 x0 y3 z7c &p12 x5b y2 z7b &p13 x5b y3 z7bgen zone brick size nx ny2 nx ratio 1 raty 1 group 'g5' &p0 x0 y2 z0 &p1 x5c y2 z0 &p2 x0 y3 z0 &p3 x0 y2 z7c &p4 x5c y3 z0 &p5 x0 y3 z7c p6 x5b y2 z7b &p7 x5b y3 z7bend_commandend_ifenddef make6if y1#y2 thencommand; bottom insidegen zone brick size nx ny1 nz1 group 'g6' &p0 x0 y1 z5 &p1 x5 y1 z5 &p2 x0 y2 z5 &p3 x0 y1 z0 &p4 x5 y2 z5 &p5 x0 y2 z0 &p6 x5c y1 z0 &p7 x5c y2 z0; bottom-right insidegen zone brick size nu ny1 nz1 ratio 1 1 1 group 'g6' &p0 x5 y1 z5 &p1 x3 y1 z5 &p2 x5 y2 z5 &p3 x5c y1 z0 &p4 x3 y2 z5 &p5 x5c y2 z0 &p6 x7 y1 z0 &p7 x7 y2 z0end_commandend_ifif y2#y3 thencommand; bottom insidegen zone brick size nx ny2 nz1 ratio 1 raty 1 group 'g6' &p0 x0 y2 z5 &p1 x5 y2 z5 &p2 x0 y3 z5 &p3 x0 y2 z0 &p4 x5 y3 z5 &p5 x0 y3 z0 &p6 x5c y2 z0 &p7 x5c y3 z0; bottom-right insidegen zone brick size nu ny2 nz1 ratio 1 raty 1 group 'g6' &p0 x5 y2 z5 &p1 x3 y2 z5 &p2 x5 y3 z5 &p3 x5c y2 z0 &p4 x3 y3 z5 &p5 x5c y3 z0 &p6 x7 y2 z0 &p7 x7 y3 z0end_commandend_ifenddefine make7if nxr&0 thencommand; primitive right of inner primitive - near - lowergen zone brick size nxr ny1 nz1 ratio 1.0 1.0 1.0 group 'g7' &p0 x2 y1 z4 &p1 xr y1 z4 &p2 x2 y2 z4 &p3 x2 y1 z0; primitive right of inner primitive - far - lowergen zone brick size nxr ny2 nz1 ratio 1.0 raty 1.0 group 'g7' &p0 x2 y2 z4 &p1 xr y2 z4 &p2 x2 y3 z4 &p3 x2 y2 z0; primitive right of inner primitive - near - uppergen zone brick size nxr ny1 nx ratio 1.0 1.0 1.0 group 'g7' &p0 x2 y1 z0 &p1 xr y1 z0 &p2 x2 y2 z0 &p3 x2 y1 z2; primitive right of inner primitive - far - uppergen zone brick size nxr ny2 nx ratio 1.0 raty 1.0 group 'g7' &p0 x2 y2 z0 &p1 xr y2 z0 &p2 x2 y3 z0 &p3 x2 y2 z2end_commandend_ifif nzt&0 thencommand; primitive above inner primitive - neargen zone brick size nx ny1 nzt p0 x0,y1,z2 p1 x2,y1,z2 p2 x0,y2,z2 p3 x0 y1 zt &ratio 1.0 1.0 1.0 group g7; primitive above inner primitive - fargen zone brick size nx ny2 nzt p0 x0,y2,z2 p1 x2,y2,z2 p2 x0,y3,z2 p3 x0 y2 zt &ratio 1.0 raty 1.0 group g7; primitive above right lower primitive - nearend_commandif nxr&0 thencommandgen zone brick size nxr ny1 nzt p0 x2 y1 z2 p1 xr y1 z2 p2 x2 y2 z2 p3 x2 y1 zt &ratio 1.0 1.0 1.0 group g7; primitive above right lower primitive - fargen zone brick size nxr ny2 nzt p0 x2 y2 z2 p1 xr y2 z2 p2 x2 y3 z2 p3 x2 y2 zt &ratio 1.0 raty 1.0 group g7end_commandend_ifend_ifenddef map1 below tunnel center (Correct need for initial points to matchkx=(x3-x0)/(x7-x0)p_gp=gp_headloop while p_gp#null; if p_gp in group 'g6', apply delta-x transformation from line to circleif gp_group(p_gp,1)='g6' thenxx=gp_xpos(p_gp)-x0zz=z0-gp_zpos(p_gp)mu=zz/heightx37=x3*mu+x7*(1-mu)kk=x3/x37gp_xpos(p_gp)=x0+xx*kkend_ifp_gp=gp_next(p_gp)end_loopenddef map1 ; below tunnel centertanmax=height/(base-(x4-x0))maxang=atan(tanmax)kk=maxang/tanmaxcosmaxang=cos(maxang)p_gp=gp_headloop while p_gp#null; if p_gp in group 'g6', apply delta-r transformation from line to circleif gp_group(p_gp,1)='g6' thenxx=gp_xpos(p_gp)-x4if xx&0 thenzz=z0-gp_zpos(p_gp)zx=zz/xxif zx&tanmax thenang2=kk* remap from uniform lengths to uniform anglesrr=xx/ remap radius from square to sectorgp_xpos(p_gp)=x4+rr*cos(ang2)gp_zpos(p_gp)=z0-rr*sin(ang2)end_ifend_ifend_ifp_gp=gp_next(p_gp)end_loopenddef map2 ; above tunnel centerangmax=pi/4sqrt2=sqrt(2)cosangmax=cos(angmax)p_gp=gp_headloop while p_gp#null; if p_gp in group 'g5', apply delta-r transformation from line to circleif gp_group(p_gp,1)='g5' thenxx=gp_xpos(p_gp)-x0zz=gp_zpos(p_gp)-z0if xx&zz thenang2=angmax*zz/ remap direction from uniform lengths to uniform anglesrr=xx*sqrt2gp_xpos(p_gp)=x0+rr*cos(ang2)gp_zpos(p_gp)=z0+rr*sin(ang2)elseif zz&xx thenang2=angmax*xx/ remap direction from uniform lengths to uniform anglesrr=zz*sqrt2gp_xpos(p_gp)=x0+rr*sin(ang2)gp_zpos(p_gp)=z0+rr*cos(ang2)end_ifend_ifend_ifp_gp=gp_next(p_gp)end_loopenddef makealltunnel_datamake1 ; outside topmake2 ; outside lower-rightmake3 ; outside bottommake4 ; outside bottom-rightmake5 ; inside bottom (call make5 before make6 so common points mapped with map2)make6 ; inside topmake7 ; far top and right; remap inner tunnel walls into outer arcsmap1 inside bottom (adjust right side to vertical)map1 ; inside bottom (adjust right side to sector)map2 ; inside topendmakeallgen merge 1e-4; gen zone reflect orig x0 y1 z0 norm 1 0 0plo crea qqqplo add block groupplo shopausegroup 'top heading' range group g5group invert range group g6group rock range group 'top heading' not group invert notpause
14.我的例子,出了问题,但不知道原因
;梯形溶洞 y 方向 范围& 2& 10
;create gong ding
gen zone radcyl& size 1 12 10 10 p0 0 0 0 p1 7 0 0 p2 0 12 0 p3 0 0 7&
p4 7 12 0 p5 0 12 7 p6 7 0 7 p7 7 12 7 p8 5 0 0 p9 0 0 5 &
p10 5 12 0 p11 0 12 5& fill
gen zone reflect norm 1 0 0&& ori 0 0 0
gen zone reflect norm 0 0 1&& ori 0 0 0
group 2 range cyl end1 0 0 0& end2 0 12 0 ra 5
group 1 range x -7 7 y 0 12 z -7 7& group 2 not
;create rongdong
gen zone brick size 13 12 10& p0 7 0 -7 p1 20 0 -7 p2 7 12 -7 p3 7 0 7 group 3
gen zone brick size 16 12 3 p0 -7 0 7 p1 9 0 7 p2 -7 12 7 p3 -7 0 10 &
p4 9 12 7 p5 -7 12 10 p6 12 0 10 p7 12 12 10 group 4
;rongdong position
gen zone brick size 10 2 3 p0 9 0 7 p1 19 0 7 p2 9 2 7 p3 12 0 10 &
p4 19 2 7 p5 12 2 10 p6 16 0 10 p7 16 2 10 group 7
gen zone brick size 10 10 3 p0& 9 2 7 p1 19 2 7 p2 9 10 7 p3 12 2 10 &
p4 19 10 7 p5 12 10 10 p6 16 2 10 p7 16 10 10 group 8
gen zone brick size 10 2 3 p0& 9 10 7 p1 19 10 7 p2 9 12 7 p3 12 10 10 &
p4 19 12 7 p5 12 12 10 p6 16 10 10 p7 16 12 10 group 9
;rongdong dingban
gen zone brick size 20 12 2 p0 -7 0 10 p1 20 0 10 p2 -7 12 10 p3 -7 0 12 &group 5
;rongdong& youbianqiang
gen zone brick size 1 12 3 p0 19 0 7 p1 20 0 7 p2 19 12 7 p3 16 0 10 &
p4 20& 12 7 p5 16 12 10 p6 20 0 10 p7 20 12 10 group 6
plot add surface yellow
;create macro
macro rock 'prop bulk 2.5e8 shear 3.3e8'
mo ela range group 1 group 2 group 3 group 4 group 5 group 6 group 7 group 9
mo nu range group 8
macro rock range group 1 group 2 group 3 group 4 group 5 group 6 group 7 group 9
plot add surface yellow
set grav 0 0 -10
fix x range x -7.1 -6.9
fix x range x 20.1 19.9&
fix y range y -0.1 0.1
fix y range y 12.1 11.9
fix z& range z -6.9 -7.1
fix z range z 12.1 11.9&&&&
ini szz -5e4 grad&& 0 0 -1e4&  range z 12 -7
ini sxx& -5e4 grad&& 0 0 -1e2&&& range z 12 -7
ini sxx& -5e4 grad&& 0 0 -1e2&&& range z 12 -7&
app szz -5e4 range z 12.1 11.9
app syy -5e4 range z 12.1 11.9&
app sxx -5e4 range z 12.1 11.9&&
set large&&
我的诊断:(1)没有定义强度参数(2)几个group取并集的时候语法错误,具体参考command reference的range这条命令。
没有定义材料参数修改如下:gen zone radcyl size 1 12 10 10 p0 0 0 0 p1 7 0 0 p2 0 12 0 p3 0 0 7 &
p4 7 12 0 p5 0 12 7 &p6 7 0 7 p7 7 12 7 p8 5 0 0 p9 0 0 5 p10 5 12 0 p11 0 12 5 fill gen zone reflect norm 1 0 0 ori 0 0 0gen zone reflect norm 0 0 1 ori 0 0 0 group 2 range cyl end1 0 0 0 end2 0 12 0 ra 5 group 1 range x -7 7 y 0 12 z -7 7 group 2 not;create rongdonggen zone brick size 13 12 10 p0 7 0 -7 p1 20 0 -7 p2 7 12 -7 p3 7 0 7 group 3gen zone brick size 16 12 3 p0 -7 0 7 p1 9 0 7 p2 -7 12 7 p3 -7 0 10 p4 9 12 7 p5 -7 12 10 p6 12 0 10 p7 12 12 10 group 4;rongdong positiongen zone brick size 10 2 3 p0 9 0 7 p1 19 0 7 p2 9 2 7 p3 12 0 10 p4 19 2 7 p5 12 2 10 p6 16 0 10 p7 16 2 10 group 7gen zone brick size 10 10 3 p0 9 2 7 p1 19 2 7 p2 9 10 7 p3 12 2 10 p4 19 10 7 p5 12 10 10 p6 16 2 10 p7 16 10 10 group 8gen zone brick size 10 2 3 p0 9 10 7 p1 19 10 7 p2 9 12 7 p3 12 10 10 p4 19 12 7 p5 12 12 10 p6 16 10 10 p7 16 12 10 group 9;rongdong dingbangen zone brick size 20 12 2 p0 -7 0 10 p1 20 0 10 p2 -7 12 10 p3 -7 0 12 group 5;rongdong youbianqianggen zone brick size 1 12 3 p0 19 0 7 p1 20 0 7 p2 19 12 7 p3 16 0 10 p4 20 12 7 p5 16 12 10 p6 20 0 10 p7 20 12 10 group 6plot add surface yellow plot show;create macro;prop bulk 2.5e8 shear 3.3e8 'prop bulk 2.5e8 shear 3.3e8'mo ela prop bulk 2.5e8 shear 3.3e8 range group 1prop bulk 2.5e8 shear 3.3e8 range group 2prop bulk 2.5e8 shear 3.3e8 range group 3prop bulk 2.5e8 shear 3.3e8 range group 4prop bulk 2.5e8 shear 3.3e8 range group 5prop bulk 2.5e8 shear 3.3e8 range group 6prop bulk 2.5e8 shear 3.3e8 range group 7prop bulk 2.5e8 shear 3.3e8 range group 9mo nu range group 8plot showset grav 0 0 -10fix x range x -7.1 -6.9fix x range x 20.1 19.9 fix y range y -0.1 0.1fix y range y 12.1 11.9fix z range z -6.9 -7.1fix z range z 12.1 11.9 ini szz -5e4 grad 0 0 -1e4 range z 12 -7ini sxx -5e4 grad 0 0 -1e2 range z 12 -7 ini sxx -5e4 grad 0 0 -1e2 range z 12 -7 app szz -5e4 range z 12.1 11.9app syy -5e4 range z 12.1 11.9 app sxx -5e4 range z 12.1 11.9 set large
15.建立interface的几种方法
首先给出一个简单的例子 newgen zone brick p0 0 0 0 p1 111.4 0 0 p2 0 10 0 p3 0 0 45 size 11 1 5 group 1gen zone brick p0 0 0 45 p1 111.4 0 45 p2 0 10 45 p3 0 0 90 p4 111.4 10 45 &p5 0 10 90 p6 47 0 90 p7 47 10 90 size 11 1 9 group 3gen zone wedge p0 66.4 0 90.1 p1 47 0 90.1 p2 66.4 10 90.1 p3 111.4 0 45.1 &p4 47 10 90.1 p5 111.4 10 45.1 size 5 1 9 group 4;interface 1 face rang plane norm 45,0,64.4 origin 47 5 90interface 1 face range plane norm 45,0,64.4 origin 47 5 90 dist 0.1ini z add -0.1 range group 4gen zone brick p0 111.4 0 0 p1 128 0 0 p2 111.4 10 0 p3 111.4 0 45 &size 2 1 5 group 2model mohrpro bulk=1e8 she=3e7 dens 2e3 coh 12e3 &friction 20 dilation 0. tension 1.0e10 range group 1pro bulk=1e8 she=3e7 dens 2e3 coh 12e3 &friction 20 dilation 0. tension 1.0e10 range group 2int 1 prop ks 2e12 kn 2e12 fric 36pro bulk=1e8 she=3e7 dens 2e3 coh 12e3 &friction 20 dilation 0. tension 1.0e10 range group 3pro bulk=1e8 she=3e7 dens 2e3 coh 12e3 &friction 20 dilation 0. tension 1.0e10 range group 4fix z range z -0.1 0.1fix x range x -0.1 0.1fix x range x 127.9 128.1fix yset gravity 0 0 -10step 1000
ini state 0ini xdis 0 ydis 0 zdis 0;ini xvel 0 yvel 0 zvel 0;set largestep 1000;solve fos file cable.sav associated 修改上面蓝色字体部分
第一种建立interface的方法(书上的移来移去式):gen zone brick p0 0 0 0 p1 111.4 0 0 p2 0 10 0 p3 0 0 45 size 11 1 5 group 1gen zone brick p0 0 0 45 p1 111.4 0 45 p2 0 10 45 p3 0 0 90 p4 111.4 10 45 &p5 0 10 90 p6 47 0 90 p7 47 10 90 size 11 1 9 group 3gen zone wedge p0 66.4 0 90.1 p1 47 0 90.1 p2 66.4 10 90.1 p3 111.4 0 45.1 &p4 47 10 90.1 p5 111.4 10 45.1 size 5 1 9 group 4;interface 1 face rang plane norm 45,0,64.4 origin 47 5 90interface 1 face range plane norm 45,0,64.4 origin 47 5 90 dist=0.1ini z add -0.1 range group 4gen zone brick p0 111.4 0 0 p1 128 0 0 p2 111.4 10 0 p3 111.4 0 45 &size 2 1 5 group 2
通过计算得到的xdisp云图
&&& pl int yel sket
问:为什么第一种方法要加 dist 0.1? 加入节理以后,这个例子就不能计算fos 了?回答:你的第2种,把group2和group4删掉,这样造成的新的模型group2和group4有重复节点,这样是不正确的。方法是在一个实体的外表面全部都设置了接触面,就是可以将两个体完全分开。而你的这个接触问题,在坡脚的位置很难处理。只用把斜坡上的部分删掉,然后导入就可以了。
人为的把group1和group2之间的交界面上多出了节点,下图是两个group的节点图,是分开显示的,可以看到两个共同面上界面标号不同,这样是不对的。计算结果也同样是错误的。
16.call fishcall.fis总是会出错呢?老是给出error opening file,该怎么操作?
错误是:文件名为 fishcall.fis.txt(因为在记事本里这个txt的后缀是默认的)。修改方法是:将 fishcall.fis.txt里面的内容全部复制到新的记事本里,再按保存,保存时候将保存类型改为所有文件(*,*),这时你便可在文件名栏内输入 fishcall.fis,类型也就正确了
fix z range z -0.1 0.1 fix x range x -0.1 0.1 any x 1.9 2.1 anyfix y range y -0.1 0.1 any y 1.9 2.1 any和
fix z range z -0.1 0.1 fix x range x -0.1 0.1 fix x range 1.9 2.1 fix y range y -0.1 0.1 fix y range y 1.9 2.1 问:两者有区别吗?我感觉是一样的
回答:建一个模型,然后实验一下,然后用plot gpfixt看一下。
18.&得到初始应力的方法:方法1、可以先给一些材料参数很大的值,进行初始求解,在计算之前再将材料参数设为正常值,即可。如在手册中给的第一个示例中就是这样做的。下面是例子,These are only initial values that are used during the development of gravitational stresses within the body. In effect, we are forcing the body to behave elastically during the development of the initial in-situ stress state.* This prevents any plastic yield during the initial loading phase of the analysis.Gen zone brick size 6 8 8Mode mohrProp bulk 1e8 shear 0.3e8 fric 35Prop cohesion 1e10 tens 1e10 ;注意在此这个值给的很大。Init dens 1000Set gravity 0 0 -10Fix x range x -0.1 0.1Fix x range x 5.9 6.1Fix y range y -0.1 0.1Fix y range y 7.9 8.1Fix z range z -0.1 0.1set mech force=50solve;---------------------- mode null ---------------------Prop coh 1e3 tens 1e3 ;改为正常值(在此例中我们故意给小值)Mode null range x 2 ,4 y 2 , 6 z 5, 10 Set largeIni xdis 0 ydis 0 zdis 0 ;清零,不影响结果,为画图方便。Setp 2000return方法2:得到初始应力的一个不错办法是设为弹性模型,然后赋予地勘信息,so以后就ok了,得到初始应力了,再把相应的位移清零,下面就可以正式进入所分析的内容了。如上例还可以先设为弹性 (MODEL elastic),之后在开挖之前再设为 Mohr-Coulomb model, 就行。19.关于初始应力的问题
Example 3.21 Initial stress state with gravitational gradientfor example, a 20 m 20 m 20 m box ofhomogeneous material at a depth of 200 m underground, with fixed base and stress boundaries onthe other sides.gen zone brick size 10,10,10 p1 20,0,0 p2 0,20,0 p3 0,0,20model mohrprop bulk 5e9 shear 3e9 fric 35ini density 2500set gravity 0,0,-10fix x y z range z -0.1 0.1ini szz = -5.0e6 grad 0,0,2.5e4ini sxx = -2.5e6 grad 0,0,1.25e4ini syy = -2.5e6 grad 0,0,1.25e4apply szz = -4.5e6 range z 19.9 20.1apply szz = -5.0e6 range z -0.1 0.1apply sxx = -2.5e6 grad 0,0,1.25e4 range x -0.1 0.1apply sxx = -2.5e6 grad 0,0,1.25e4 range x 19.9 20.1apply syy = -2.5e6 grad 0,0,1.25e4 range y -0.1 0.1apply syy = -2.5e6 grad 0,0,1.25e4 range y 19.9 20.1它的意思是通过ini szz来赋予初始地应力,但是为何又有set gravity 0,0,-10?这样不是重复了吗?
ini是模型的内力,set grav是外力施加对模型的作用力,没有外力怎么有内力?一般而言,这样是为了计算比较快,因为这样设置以后,此时几乎已经平衡,了,计算步较少了,变形也就很少了嘛,当然最好再在以后计算时初始化位移为0,但初始化位移与否(在这种情况下),并不会明显影响计算结果的.当然还有另一种方法就是开始时设成弹性的(model elas)(或者还是mohr的但参数给的要大一些,目的是防止破坏),直接运行到平衡达来获取初始应力值,在真正计算时再改成mohr并将参数改为真实的数值,这种方法更适合于单元不太多,因为比较简单.但如果单元数目很多的话,那么此种方法速度会很慢的.
关于初始地应力及其算法,有两个疑问:
1)为何一定要让模型达到初始平衡再进行计算?2.)那种改大参数,让模型在自重下平衡得到初始应力场的做法中,要将哪些参数改大呢?bul she coh ?还是改其他哪几个?
1)这是模拟多数现场施工前的实际情况,并非总是如此,例如土钉墙施工,如果开挖后立即加土钉,就无须先平衡再加土钉再SOLVE.2) 取决于具体模型,核心思想是用该模型在此阶段模拟弹性模型.对于MOHR-COULOMB模型, 这样做(将COHESION,TENSION设置很大的值)与SOLVE ELASTIC是等价的.但对于别的模型,SOLVE  LASTIC并不适用,最好用改变参数的方法来加快计算速度和防止屈服.另外一点: 在FLAC/FLAC3D中, SET命令作用于整个网格(赋值全局变量),INI则初始化指定范围内网格点/域的偏移量.初始应力不仅仅是重力引起的。它还包括土压力,水浮力,上方建筑物的力,这些信息的勘测一般都不容易获得。通常可以把模型材料设为弹性,再把两个模量设到很大solve后再把模量和材料还原可得。具体可以看以前关于初始应力的帖子。不只是这样的,set grav不是直接将力仅仅加在底层上,而是作用在上面,如果没有初始应力的话,地层就会有相应的变形直到地层变形和产生的力与之平衡。所以应当通过initial来初始化应力,而这个力与density相匹配。我是做地铁开挖的如果没有初始化的话地层在开挖前就有了沉降。这与实际不符合。设置重力的原因不是为了平衡减少程序计算步骤,而是因为如果未初始化应力的话,在set grav的时候,模型会在自重应力下发生应力变形。所以,初始化应力的原因是防止模型在自重应力下发生变形(我们认为地层自重变形已经发生,当然欠固结等现象是另外一回事)。其实就是让模型发生变形,然后把位移清零也可以的。有种方法,不少人也在用,就是为了得到初始应力值,先将材料参数放大到很大,获得初始值以后再恢复到正常参数。
20.&&Tension-p shear-p tension-n shear-n表示的含义
在计算的循环里面,每个循环中,每个zone都依据failure criterion处于不同的状态,shear 和tension分别表示因受剪和受拉而处于塑性状态.n表示now,p表示previous,即分别表示在现在和以前的循环当中处于塑性状态.
21. 有一个例子:gen zone cyl p0 0 0 0 p1 1 0 0 p2 0 2 0 p3 0 0 1 size 4 5 4gen zone reflect norm 1,0,0gen zone reflect norm 0,0,1model mohrprop bulk 1.19e10 shear 1.1e10prop coh 2.72e5 fric 44 ten 2e5fix x y z range y -.1 .1fix x y z range y 1.9 2.1ini yvel 1e-7 range y -.1 .1ini yvel -1e-7 range y 1.9 2.1hist gp ydisp 0,0,0hist zone syy 0,1,0hist zone syy 1,1,0hist write 1 file 原点位移.dathist write 2 file 中部单元应力.dathist write 3 file 边缘单元应力.dathist write 1 table 1 hist write 2 table 2hist write 3 table 3hist write 2 3 vs 1 file 单压.datstep 3000结果在&原点位移.dat&文件中只有:&Step 1 Y-Displace& 而没有保存下数值,怎么回事?我怎么才能获得table中的数据?
修改:gen zone cyl p0 0 0 0 p1 1 0 0 p2 0 2 0 p3 0 0 1 size 4 5 4gen zone reflect norm 1,0,0gen zone reflect norm 0,0,1model mohrprop bulk 1.19e10 shear 1.1e10prop coh 2.72e5 fric 44 ten 2e5fix x y z range y -.1 .1fix x y z range y 1.9 2.1ini yvel 1e-7 range y -.1 .1ini yvel -1e-7 range y 1.9 2.1hist gp ydisp 0,0,0hist zone syy 0,1,0hist zone syy 1,1,0step 3000hist write 1 file 原点位移.dathist write 2 file 中部单元应力.dathist write 3 file 边缘单元应力.dathist write 1 table 1 hist write 2 table 2hist write 3 table 3hist write 2 3 vs 1 file 单压.datsave a 'print tabel n' will solve your second qusetion
22.这个plot是什么意思?
hist n 1hist gp ydisp 0,0,0hist ax_strhist gp xdisp 1,1,0step 1500plot hist 2 vs -1 ;axial stress vs axial disp.plot hist 3 vs -1 ; circumferential disp. vs axial disp
plot 显示 hist 历史曲线 曲线2为横坐标,曲线一为纵坐标
hist n 1hist gp ydisp 0,0,0hist ax_strhist gp xdisp 1,1,0step 1500plot hist 2 vs -1 ;axial stress vs axial disp.plot hist 3 vs -1 ; circumferential disp. vs axial disp
那2是不是代表hist gp ydisp 0,0,0,而 -1 指得是hist gp ydisp 0,0,0为什么不是1而是负值?
hist gp ydisp 0,0,0hist ax_strhist gp xdisp 1,1,0step 1500plot hist 2 vs -1 ;axial stress vs axial disp.plot hist 3 vs -1 ; circumferential disp. vs axial disp
1) 在plot hist m vs n的形式里,m代表y轴,n代表x轴(不管m,n的正负);
2) "-"表示对其值作"mirror",如果大家使用AUTOCAD的话就明白"mirror"的含义了,比如上面的 hist 1 gp ydisp的值是0~100,那么vs -1就变成-100~0.以此类推.
3) 为什么要这么做呢?主要是为了符合岩土工程的习惯需要,例如桩载荷试验曲线,沉降曲线等都不是画在第一象限内.
23.关于water.fis的命令注释(设置地下水位)
1)water.fis的功能是设置地下水位面,在二维计算中,通过water table命令即可设置水位线,在三维计算中由于地下水位是面,因此需要作一些插值运算,以便形成水位面。这个FISH程序包含三个函数parm,aux1和aux2。parm用来设定水位的边值,即设置水位的区域,aux1插值计算等值线的点,aux2调用aux1的计算结果,使用FLAC3D命令形成水位面。
2)首先设置参数值,然后定义一个table.
def parmnptab1=7nprof=10 endparm
table 1 (12 0) (18.25 12.5) (25 17) (35 21) (50 24) (75 25) (150 25)
产生table1,包含7组数据点。
3) 在解释的两个FISH函数之前,对table,xtable,ytable作一些总的说明。water.fis程序反复使用了这三个变量,理解了这三个变量的含义,water.fis这段程序就解决了大半问题了。
Itasca的所有软件都使用了相同的数据结构储存数据,称之为链表结构,类似于关系型数据库中的数据链接方法。如果有数据结构的知识,或掌握关系型数据库的SQL语言,这三个变量的含义就不难理解了,只不过这个操作与真正的数据库操作相比,只有两个数据变量x,y。我用数据库的术语作解释:table就是产生一个&表&,xtable,ytable的作用就是产生一个新表(Create)以及对表中的数据进行取出(Select)、插入(Insert)、替换(Update)操作.
4)FISH函数aux1的作用是在table 1的基础上产生出另外个table,table的ID从11到17,每个table有10个数据集。alfa的计算方法是为适合(fit)曲面而采用的坐标点算法。
def aux1loop n(1,nptab1)&&rr=xtable(1,n)&&zz=ytable(1,n)&&&&loop k(1,nprof)&&&&&&case_of k&&&&&&&&alfa=0.5*(pi+.1)*float(k-2)/float(nprof-2)&&&&&&&&xtable(n+10,k)=rr*cos(alfa)&&&&&&&&ytable(n+10,k)=rr*sin(alfa)&&&&&&&&case 1&&&&&&&&xtable(n+10,k)=rr&&&&&&&&ytable(n+10,k)=-40.0&&&&&&&&case 2&&&&&&&&xtable(n+10,k)=rr&&&&&&&&ytable(n+10,k)=0.0&&&&&&end_case&&&& end_loopend_loopendaux1
当执行这个FISH函数后,生成(nptab1+10,nprof)组数据,这些数据为Aux2调用。注意:本段程序产生的数据是为那个特定的曲面边坡制作的,不是一个general purpose的LIB
5)FISH函数aux2的作用是使用WATER TABLE face命令产生水
面,把table 1的ytable值作为z坐标,aux1产生的数据作为x,y坐标。
def aux2command&&set grav 0 0 -10&&water dens 1000end_commandloop n(1,nptab1-1)&&loop k (1,nprof-1)&&&& xx1=xtable(n+10,k)&&&& yy1=ytable(n+10,k)&&&& zz1=ytable(1,n)&&&& xx2=xtable(n+10,k+1)&&&& yy2=ytable(n+10,k+1)&&&& zz2=zz1&&&& xx3=xtable(n+11,k+1)&&&& yy3=ytable(n+11,k+1)&&&& zz3=ytable(1,n+1)&&&& xx4=xtable(n+11,k)&&&& yy4=ytable(n+11,k)&&&& zz4=zz3&&&& command &&&&&& WATER TABLE face xx1,yy1,zz1 xx2,yy2,zz2 xx3,yy3,zz3 &&&&&& WATER TABLE face xx1,yy1,zz1 xx3,yy3,zz3 xx4,yy4,zz4 &&&& end_command&& end_loopend_loopendaux2
24.产生结构元的几何形状(Geometry Creation)
FLAC3D有6种类型的结构单元,它们分别是梁单元beamSELs,锚杆单元cableSELs,桩单元pileSELs,壳单元shellSELs,地质网格单元geogridSELs和衬砌单元linerSELs.每一种类型的结构由相应分量对象的集合来表示。例如锚杆结构(cable)由一系列的cableSELs组成,而衬砌结构(liner)则由一系列的linerSELs组成。每种结构元都由两个不同的辨识号码来表示,以便与其它结构元相区别。
用Seltype命令和相应的关键字来定义结构单元:Seltype beam/cable/geogrid/liner/pile/shell,每一种支护类型的性质用SEL 命令的property关键字定义.History SEL keywordsID:用来标识一个结构对象,比如第一根锚杆的ID=1,第二根锚杆的ID=2,它是对整个结构进行编号;
CID:用来表示一个结构对象内部的分量,比如一根锚杆划分为3段,则这根锚杆的CID分别是1,2,3,用来表示这根锚杆的不同部分。
ID是为结构进行编号,CID是为结构的分量进行编号。比如下面的例子:
sel pile id=1 begin=(10.0, 1.0, 0.0) end=(10.0, 1.0, -10.0) nseg=5sel pile id=2 begin=(10.0, 3.0, 0.0) end=(10.0, 3.0, -10.0) nseg=5
在这个例子中,设置了2根桩,第一根桩以id=1来表示,第二根桩以id=2来表示;第一根桩分为5段,则cid=1~5,第二根桩也分为5段,则cid=6~10。 可以用plot sel geom 命令来查看设置是否正确。
问题: 我设了三根桩,
sel pile id=1 begin=(10.0, 1.0, 0.0) end=(10.0, 1.0, -3.0) nseg=3sel pile id=2 begin=(10.0, 3.0, 0.0) end=(10.0, 3.0, -3.0) nseg=3sel pile id=3 begin=(10.0, 5.0, 0.0) end=(10.0, 5.0, -3.0) nseg=3
图中红色的数字1-3-4-2代表什么?是node?还是link?
生成node的时候,如果周围存在zone,会自动生成link,而且link和node位置总是重合的25. 基于ansys复杂地质体flac模型自动生成
首先将复杂的三维地质模型建于ansys,然后导出结点坐标信息和单元信息,最后运用此程序就可以生成复杂地质体的flac命令,用flac程序运行此命令就可以生成复杂地质体的flac模型。
复杂的三维地质模型一般是在cad中建立的,然后导入ansys中,通过此它建立复杂地形的flac模型。用autocad建好模型后,输出为.sat文件,就可以导入到ansys,不用软件转换。
26. FLAC结果数据的导出
设置背景set plot bitmap size (800,510) ;设置图片大小plot set caption size 37 ; 设置图例数字大小 (default=35 范围10-50)mainwin size 1 1 position 0 0.8 ; command windowplot set window size 0.8 0.8 position 0.1 0.0 ; graphics windowplot set center 100 0 40 根据情况更改。
27.一段fish命令的解释
def aux1 定义函数loop n(1,nptab1) 开始一个循环,从1循环到变量nptab1rr=xtable(1,n) 从table 1 的x列中读第n个数付给变量rrzz=ytable(1,n) 从table 1 的y列中读第n个数付给变量zzloop k(1,nprof) 开始第二个循环,从1循环到变量nprofcase_of k 下面是一个选择结构,利用变量k判断alfa=0.5*(pi+.1)*float(k-2)/float(nprof-2)xtable(n+10,k)=rr*cos(alfa)ytable(n+10,k)=rr*sin(alfa)case 1 当k=1的时候执行下面语句xtable(n+10,k)=rr table n+10的x列第k个值等于变量rrytable(n+10,k)=-40.0 table n+10的y列第k个值等于变量-40case 2 当k=2的时候执行下面语句xtable(n+10,k)=rr table n+10的x列第k个值等于变量rrytable(n+10,k)=0.0 table n+10的y列第k个值等于变量0end_case 结束选择结构end_loop &&结束第二个循环end_loop 结束第一个循环end 函数定义结束aux1 执行什么定义的函数
28. 如何删除指定区域的塑性区?
可以通过分组塑性区来查看def plasticarrangezp=zone_headloop while zp # nullcurr_state=z_state(zp,0) if curr_state # 0 z_group(zp)='yield'(这以后的什么意思?)else z_group(zp)='other'endifzp=z_next(zp)endloopendplasticarrangepr curr_state
是将塑性区分组为yield,再用model null ran gr yield
29.有关命令的解释
1) apply nvel 0.1 plane dip 60 dd 270 range left_boun   apply 施加边界条件,plane法向速度为0.1,plane 面的位置:倾角60(在xoy平面从-Z轴方向逆时针旋转),dd 走向270度,从+y方向绕z轴顺时针旋转;2) ini szz -5e4 grad 0 0 -1e4ini 初始边界条件,szz=-5e4+x*0+y*0+-z*-1e4,注:-5e4是range范围起点坐标的SZZ值,x,y,z所施加应力网格点的坐标。
30. 问:做的边坡开挖是一个四面体或是契体,除了在建模过程中单独建模再开挖以外,还有什么方法?单独建模的话,模型比较复杂,而且网格不太好统一。
回答:用group定义,然后在挖掉即可,斜面你可以采用wedge来建立,或用brick建立,但是设置斜面要用:norm (X X X) ori (X,X,X) above x x1 x2 y y1 y2 z z1 z2
31. 渗流示例;------------------------------参数部分bulk modulus, K 390 MPa 体积模量(土质比较硬)shear modulus, G 280 MPa 剪切模量soil dry density, &d 1200 kg/m3 土的密度water density, &w 1000 kg/m3 水的密度wall density, &wal 1500 kg/m3 档土墙的密度permeability, k 1012 m2/Pa-s 渗透系数porosity, n 0.3 孔隙率fluid bulk modulus, Kf 2.0 GPa 流体的体积模量;-------------------------------------;-----以下是命令流;------------------------------------------------------; Excavation in a saturated soil;------------------------------------------------------设置流体算法; --- geometrical model --- 建立模型gen zone brick p1 12 0 0 p2 0 12 0 p3 0 0 12 size 12 12 12 rat 1 1 1设置土组group excavate range x 0 4 y 0 4 z 0 5 ;设置开挖范围组group wal1 range x 4 5 y 0 5 z 0 7 ; 设置档土墙 1 组group wal2 range x 0 4 y 4 5 z 0 7 ;设置档土墙 2 组group wall range group wal1 any group wal2档土墙1 和2 合并为一个档土墙组; --- fluid flow model --- 流体模型model fl_各项同性流体prop perm 1e-12 poro 0.3 ;设置渗透系数和??比 or ??率ini fdensity 1e3 ; 初始化水密度ini fmod 2.0e9 ftens -1e-3 ; 初始化水的体积模量 及 ??model fl_null r 开挖部分没有水流model fl_nu档土墙 不渗水ini pp 0 grad 0 0 1e4 ;初始化孔隙水压力fix pp range z -0.1 0.1 ;约束 应该是整个模型的底部吧?fix pp range x -0.1 4.1 y -0.1 4.1 z 4.9 5.1 ;开挖部分也给约束住了,而其他的地方不管; --- mechanical model --- 力学模型 弹塑性prop bul 3.9e6 shea 2.8e6 ;设置体积模量和 剪切模量,这两个必须,有一次我只设置了体积模量,就错的一塌糊涂model null r力学模型的开挖ini density 1.2e3 ;初始化密度 ,应该是土的密度ini density 1.5e3初始化墙(档土墙)的密度,fix x range x -.1 .1 ;施加约束,据说差分法约束0 的时候,必须取一个-0.1&0&0.1,范围fix x range x 11.9 12.1 ;施加约束,或者叫做边界条件fix y range y -.1 .1 ;施加约束fix y range y 11.9 12.1fix z range z 11.9 12.1; initial total stresses 出世总应力ini szz 0 grad 0 0 -1.5e4 ;z方向的应力大一些ini sxx 0 grad 0 0 -1.2e4 ;水平方向的,小一些ini syy 0 grad 0 0 -1.2e4 ;apply nstress 0 grad 0 0 -1.2e4 range x 0.0 4.0 y 3.9 4.1 z 0.0 5.0 apply nstress 0 grad 0 0 -1.2e4 range x 3.9 4.1 y 0.0 4.0 z 0.0 5.0apply nstress -7.5e4 range x 0.0 4.0 y 0.0 4.0 z 4.9 5.1; --- setting --- 设置set gravity 0 0 10 ;设置重力加速度; --- initial state --- ;初始化状态solve force 1 ; check initial equilibrium 求解平衡; --- histories --- 记录set hist_rep 40 ;记录步为40记录时间hist gp pp 0 0 6 ;记录某点的孔隙水压力hist gp xdis 4 0 0 ;水平位移hist gp xdis 4 0 2 ;记录水平位移hist gp xdis 4 2 0hist gp zdis 0 0 5 ;记录竖向位移hist gp zdis 2 0 5hist gp zdis 4 0 5hist gp zdis 2 2 5hist gp zdis 4 2 5hist gp zdis 4 4 5hist gp zdis 10 0 1hist gp zdis 10 0 2;; --- excavation --- 开挖关闭水; apply pore pressure at walls 在墙上施加孔隙水压力apply nstress 0 grad 0 0 -1.e4 range x 0.0 4.0 y 3.9 4.1 z 0.0 5.0apply nstress 0 grad 0 0 -1.e4 range x 3.9 4.1 y 0.0 4.0 z 0.0 5.0apply nstress -5.e4 range x 0.0 4.0 y 0.0 4.0 z 4.9 5.1force 1 ;求解save exc1. 保存;; --- drainage --- 排水a撤掉刚才的压力定义一个释放 函数的参数step0 = stepend调用定义一个释放函数rstep = step - step0 if rstep & ncyc thenrelax=1.0-(float(rstep)/float(ncyc))elserelax = 0.0endif结束set ncyc = 1000 ;先赋值,随后调用apply nstress 0 grad 0 0 -1.e4 hist relax &range x 0.0 4.0 y 3.9 4.1 z 0.0 5.0apply nstress 0 grad 0 0 -1.e4 hist relax &range x 3.9 4.1 y 0.0 4.0 z 0.0 5.0apply nstress -5.e4 hist relax &range x 0.0 4.0 y 0.0 4.0 z 4.9 5.1cyc ncyc求解save exc2.保存;; --- percolation --- 渗透设置水算法fix pp 0 range x -0.1 4.1 y -0.1 4.1 z 4.9 5.1 ;施加孔隙水压力cyc 9000 ;循环save exc3.保存建立一个显示的视图 一下内容都是显示内容plot set rot 200 0 195plot set cent 6 6 6plot set dist 39.18plot set magn 0.8plot set plane ori 0 0 0 normal 0 -1 0plot add cont pp out onplot add block group lgra range group wallplot add cont pp int 10000 max 110000 range x 0 4 y 0 4 z 5 7plot add flow planeplot showret
32.VB中调用FLAC与FLAC调用VB程序
在VB中调用Flac3d.exe的源代码:Private Sub Command1_Click()'定义打开Flac时返回的值Dim Flac As Long'在VB中调用Flac3dFlac = Shell("E:/工具箱/FLAC 3D/flac3d v3.00-251/Flac3d v3.00/f3d300.exe", vbNormalFocus)' 激活Flac,使其窗口获得焦点'AppActivate Flac'使用代码模拟键盘输入' 按下回车键给计算器SendKeys "{Enter}", True'SendKeys "gen zone brick", True'SendKeys "{Enter}", True'SendKeys "plot surface", True'SendKeys "{Enter}", True'SendKeys "{Enter}", True'调用命令流SendKeys "call F:/VB/work/test.dat", TrueSendKeys "{Enter}", TrueEnd Subtest.dat:restore tcav3.savcall stable.datstable.dat:;;显示支撑轴力得变化plot hist 7;;excavate the fourth layermodel null ran group pcav4;;支撑稳定性判断程序;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;读出数据,将其输到文件c:/panda/t1.txt中;;read the force from flacdef stableloop t(1,200) ;每500步判断一次 ;;计算200步command step 200endcommandcommand;;删除旧有文件Sys del F:/VB/work/t1.txt;;打开文件开关,并将支撑轴力录入到c:/panda/t1.txt中。set log onset logfile F:/VB/work/t1.txtprint sel beam forceset log off;;调用vb程序Sys start /wait F:/VB/work/inputdata.exeendcommand;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;读入数据之前的定义a_size = 1IO_READ = 0IO_WRITE = 1IO_FISH = 0IO_ASCII =1 ;当需要读入,需使用ASCII模式filename = 'output.txt' ; 注意:如果要进行文件操作,必须先定义,不能直接使用。;;读入数据;;define the arrayarray var(1);;3.输入数据status=open(filename,IO_READ,IO_ASCII)status=read(var,a_size)status=close;;将在z_d初始化为零z_d=0;;对数据类型进行转化 z_d=int(var(1));;判断是否失稳,如果输入数据为0,则继续循环,如果输入数据为1,则判断失稳并跳出循环将所有杆刚度设为0if z_d=1 then command ;;将所有杆设置刚度设为很小sel beam id=1 prop density 1.9 emod=1.0e8 nu=0.0003 &xcarea=0.00968 xciy=0.844e-3 xciz=0.844e-3 xcj=0endcommand exitendifendloopendstable;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;solvesave pcav4.savinputdata.exe的源代码:'工程文件路径Public strInputPath As StringPublic strOutputPath As StringPrivate Sub Form_Load()'隐藏窗口Me.Hide'定义极限荷载Dim Plim As Single'定义杆件失稳标记'如果杆件失稳则输出1,如果没有失稳则输出0Dim nFlag As IntegerPlim = 10.44 * 100000# '根据0.85的折减系数而得'定义单元编号Dim nEleID As Integer'定义节点编号Dim nNodeID As Integer'定义杆件节点的轴力的分量Dim F(1 To 3) As Single'定义字符串变量Dim str As String'定义读入数据前忽略的行数Dim nLine As IntegernLine = 21'定义欲读入单元的个数Dim nElement As IntegernElement = 10'定义每个单元的节点数Dim nNode As IntegernNode = 2'定义可供Open语句使用的文件号Dim nInputFile As IntegerDim nOutputFile As Integer'FreeFile函数返回一个Integer,代表下一个可供Open语句使用的文件号nInputFile = FreeFilenOutputFile = nInputFile + 1'打开文本文件strInputPath = "F:/VB/work/t1.txt"strOutputPath = "F:/VB/work/output.txt"Open strInputPath For Input As #nInputFileOpen strOutputPath For Output As #nOutputFile'读入忽略的行数For i = 1 To nLineLine Input #nInputFile, strNext i'读入数据'For i = 1 To nElementFor i = 1 To 1For j = 1 To nNode'If j = 1 Then' Input #nInputFile, nEleID, nNodeID, F(1), F(2), F(3)'Else' Input #nInputFile, nNodeID, F(1), F(2), F(3)'End IfIf j = 1 ThenInput #nInputFile, nEleIDEnd IfInput #nInputFile, nNodeID, F(1), F(2), F(3)'将轴力值与杆件的极限载荷相对比,如果杆件失稳则输出1,如果没有失稳则输出0If j = 1 ThenIf Plim & (-F(1) * 3) ThennFlag = 1ElsenFlag = 0End IfWrite #nOutputFile, nFlagEnd IfNext jNext i'关闭文件Close #nInputFileClose #nOutputFile'卸载窗体Unload Me
33. 用什么命令可以位移图中显示最大位移点的坐标呀????
用fish编了一个,算法好像有点烦,不过目的可以实现你可以参考一下。def get_gp_maxdispgp0_disp = gp_xdisp(gp_head)*gp_xdisp(gp_head)gp0_disp = gp0_disp + gp_ydisp(gp_head)*gp_ydisp(gp_head)gp0_disp = gp0_disp + gp_zdisp(gp_head)*gp_zdisp(gp_head)gp0_disp = sqrt(gp0_disp) p_gp=gp_head;找最大值loop while p_gp # nullgp_disp = gp_xdisp(p_gp)*gp_xdisp(p_gp)gp_disp = gp_disp + gp_ydisp(p_gp)*gp_ydisp(p_gp)gp_disp = gp_disp + gp_zdisp(p_gp)*gp_zdisp(p_gp)gp_disp = sqrt(gp_disp) if gp_disp&gp0_dispgp0_disp=gp_dispendif p_gp = gp_next(p_gp)endloop;找最大值的坐标p_gp=gp_headss=0loop while p_gp # nullgp_disp = gp_xdisp(p_gp)*gp_xdisp(p_gp)gp_disp = gp_disp + gp_ydisp(p_gp)*gp_ydisp(p_gp)gp_disp = gp_disp + gp_zdisp(p_gp)*gp_zdisp(p_gp)gp_disp = sqrt(gp_disp) if gp_disp=gp0_dispss=ss+1xtable(1,ss)=gp_xpos(p_gp)ytable(1,ss)=gp_ypos(p_gp)endif p_gp = gp_next(p_gp)endloopendget_gp_maxdisp
33. 如何显示计算后模型的变形状态?
plot keyword magfac valuevalue 取大于0的值即可,当然要想看的明显,应该取大一点比较好~
34如何查看剖面上任一点的位移值?
print gp disp range x() y( ) z( )或print gp disp range id plot gp disp range x() y( ) z( )或plot gp disp range id
35. group命令时的疑惑
我在用group划分区域时,遇到了斜线条,该怎么整啊,我只知道平行于轴的区域的划分
group groupname colour range plane above dd ** dip ** origin *** below dd ** dip ** origin ***dd 和dip就是两个斜面的倾向和倾角,origin是这个斜面通过的某个点,这个命令就可以group两个斜面间的区域.试一下看行不行.
我试了一下,不行的,缺个planegroup groupname colour range plane above dd ** dip ** origin *** plane below dd ** dip ** origin ***
36.请问各位:ansys导入flac的时候,能划分一下group吗?如何实现?给兄弟我一个详细的解释如何?
在ansys中对不同group用不同的材料号(mat)定义,再用ansys2flac之类的程序转换成flac的.dat文件就可,group自动生成。
37. fix x y z range x -0.1 0.1 ..........................afix x range x -0.1 0.1................................b请问a式与b式有何区别?
a 表示 在x=0 这个平面 是固定的b 表示在x=0 这个平面 只x方向不能发生运动。
38. initial 与 apply 区别
initial初始化命令,如初始化计算体的应力状态等;& & & & rKD4u2b仿真分析,有限元,模拟,计算,力学,航空,航天,ANSYS,MSC,ABAQUS,ALGOR,Adina,COMSOL,FEMLAB,Matlab,Fluent,CFD,CAE,CAD,CAMapply边界条件限制命令,如施加边界的力、位移等约束等。
initial的应力状态会随计算过程的发生而发生改变,一般体力需要初始化-X-j& & & & gG$|仿真|设计|有限元|虚拟仪器而apply施加的边界条件不会发生变化
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:86439次
排名:千里之外
转载:26篇
(1)(5)(1)(1)(4)(3)(3)(1)(1)(5)(3)(1)(1)
(window.slotbydup = window.slotbydup || []).push({
id: '4740881',
container: s,
size: '200,200',
display: 'inlay-fix'}

我要回帖

更多关于 bat批处理修改ini赋值 的文章

更多推荐

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

点击添加站长微信