免费的二维有限元分析软件ADONIS发布了新的版本V3.75.2 (10/28/2022),主要修复了绘图面板(Chart Tab)的一个错误。ADONIS在软件设计的框架上,模仿了RS2和FLAC的部分功能,在与Python的集成上模仿了Itasca Python模块的交互方式。ADONIS的部分应用参看如下链接,在此不再赘述。
相关文章,在仿真秀官网搜索:
新功能 | 有限元分析ADONIS(V3.75.0)与Python的集成
免费二维有限元分析软件ADONIS计算步骤
边坡剪切强度折减分析(Shear Strength Reduction Analysis)
二维有限元分析软件ADONIS新功能评述
ParaView在ADONIS, Plaxis, FLAC3D和3DEC中的应用
板桩墙(Sheet Pile Wall)模拟---FEM中的界面元
Ubiquitous节理岩体模拟(Ubiquitous Joint Rock Mass Modelling)
2 命令流
(1) 项目设置
在项目设置中,主要设置单位和重力加速度。所有的数值模拟软件自身都不提供单位换算功能,输入数据的单位由用户定义,但必须符合单位一致性的规则,否则计算结果出错。
newmodel()
set("language","en")
set("unit","stress-pa")
set("gravity",0,9.8)
set("useNMD","on")
为了得到精确的塑性计算结果,可以启用节点混合离散化(Nodal Mixed Discretization, NMD)算法【压缩试验模拟考虑的几个问题(本构模型和NMD算法)】---useNMD,不过这种算法只能用于三节点的三角形T3单元。
(2) 几何形状
模型的几何形状由rect, line, circle, arc 命令来定义:
rect("startPoint",-30,-30,"endPoint",30,30)
line("startPoint",0,0,"endPoint",52,0)
circle("centerPoint",0,0,"radius",5,"numSeg",20)
arc("startPoint",3.88,-20.23,"midPoint",4.6,-19.6,"endPoint",5.2,-18.7,"numSeg",6)
界面元的定义使用crack命令:
crack("startPoint",10,-10,"endPoint",10,0)
(3) 材料模型
材料模型包括:
(1) Isoelastic
(2) Mohr-Coulomb
(3) Hoek-Brown
(4) Modified Hoek-Brown
(5) Cam-Clay
(6) Strain-Softening
(7) P-Hardening
(8) Ubiquitous-joint
(9) Swell
material("create","Ubiquitous-Joint","matid",1,"matname","Jointed Rock","density",2600,"shear",3e+07,"bulk",1e+08,"coh",100000,"fric",40,"jangle",30,"jcoh",5000,"jfric",25)
material("assign","matid",1)
material("assign","matid",1,"region",16,-1)
(4) 网格划分
ADONIS的网格目前只有两种:三节点的三角形和六节点的三角形单元,segment命令用来对特定的单元进行网格细化。
triangle("elemtype","T6(T3)")
discretize("maxedge",0.75)
triangle("maxedge",0.75)
segment("id",24,"numedge",3)
(5) 边界条件
边界设置使用applybc命令:
applybc("xyfix","xlim",-0.1,0.1,"ylim",-0.1,10.1)
applybc("xfix","xlim",-0.1,0.1,"ylim",-100.1,0.1)
(6) 原岩应力
原岩应力可以安装为常量,也可以按照区域设置成线性变化的值。
initial("szz",-30e6)
initial("syy",isyy1,"yvar",dsyy1,"xlim",-60,60,"ylim",-2,0)
(7) 计算过程
可以进行一般的弹塑性计算solve(),也可以进行安全系数计算:
solve("fos")
solve("fos","isFosMCTens","on")
(8) 初始化
岩土工程问题模拟施工步骤时需要首先在原岩应力下求解[solve]取得平衡,然后把单元的位移或速度初始化为0:
initial("xydisp",0)
initial("xyvel",0)
(9) 开挖回填
excavate("region",16.507,-1.40485,"reset","off")
backfill("region",16.507,-1.40485,"reset","off")
(10) 结构元
structure("initial","reset","alldisp")
structure("material","beamid",1,"area",beam_area,"I",beam_I,"ymod",beam_ymod)
structure("drawliner","beamid",1,"iftype","bothSides","ifid1",1,"ifid2",2,"xlim",29.9,30.1,"ylim",-32.1,0.1)
structure("drawcable","cabid",1,"frompoint",0,5,"topoint",0,15,"pretens",0.0,"segnum",10)
(11) 界面属性
imaterial("assign","Coulomb","ifid",1,"matname","Interface1","jkn",1e9,"jks",1e9,"friction",25)
imaterial("assign","Coulomb","ifid",2,"matname","Interface2","jkn",1e9,"jks",1e9,"friction",25)
(12) 结果显示
ADONIS提供了位移、应力、应变、孔隙压力以及结构元的的图形显示。
tab("plot")
plot("contour","ssi")
plot("struc","beam","axialforce")
plot("struc","beam","moment")
(13) 调用子程序
script("call","filename","initial_pp_stresses.ajs")
Python的安装版本是3.9.13,三个附加安装的模块是numpy, scipy和XlsxWriter。首先需要输入模块:
import adonis as ad
ad.command() #命令
ad.set_path() #修改当前工作路径
adonis.fos() #获得安全系数
3.3 算例
import adonis as ad
import xlsxwriter
cu1 = 50000
fos_array = [-1,-1,-1,-1,-1]
coh_ratio_array = [0.2,0.4,0.6,0.8,1.0]
cmd = "material('create','Mohr-Coulomb','matid',2,'matname','Material 2','density',2038,'shear',3.84615e07,'bulk',8.33333e+07,'coh',{coh},'fric',0,'dil',0,'tens',0)"
for i in range(0, 5):
ad.command("""
newmodel()
set('unit','stress-pa')
line('startPoint',0,0,'endPoint',0,20)
line('startPoint',0,20,'endPoint',20,20)
line('startPoint',20,20,'endPoint',40,10)
line('startPoint',40,10,'endPoint',60,10)
line('startPoint',60,10,'endPoint',60,0)
line('startPoint',60,0,'endPoint',0,0)
line('startPoint',6,20,'endPoint',38,4)
line('startPoint',38,4,'endPoint',48,4)
line('startPoint',48,4,'endPoint',54,10)
line('startPoint',8,20,'endPoint',36,6)
line('startPoint',36,6,'endPoint',48,6)
line('startPoint',48,6,'endPoint',52,10)
triangle('elemtype','T3')
discretize('maxedge',1)
segment('id',14,11,'numedge',60)
segment('id',15,12,'numedge',20)
segment('id',16,13,'numedge',15)
triangle('maxedge',1)
set('useNMD','on')
material('create','Mohr-Coulomb','matid',1,'matname','Material 1','density',2038,'shear',3.84615e+07,'bulk',8.33333e+07,'coh',50000,'fric',0,'dil',0,'tens',0)
""")
new_coh = coh_ratio_array[i] * cu1
ad.command(cmd.format(coh=new_coh))
ad.command("""
material('assign','matid',1,'region',42,8)
material('assign','matid',2,'region',42,5)
material('assign','matid',1,'region',42,2)
applybc('xfix','xlim',59.743,61.035,'ylim',-1.499,10.698)
applybc('xfix','xlim',-1.654,0.103,'ylim',-1.499,20.621)
applybc('xyfix','xlim',-1.602,61.035,'ylim',-1.240,0.103)
set('gravity',0,9.8)
solve('fos','fosLBLimit',0.25,'fosUBLimit',2.0,'dispinfodlg','off')
""")
fos_array[i] = ad.fos()