1 引言
免费的二维边坡稳定性分析软件HYRCAN V2.0.8发布了(10/21/2022)。HYRCAN是Mikola博士在2020年疫情大流行期间开发的一个类似于Slide2的边坡稳定性分析软件。Mikola博士2012年毕业于加州大学伯克利分校(University of California at Berkeley),毕业后在Jacobs Engineering---一个国际知名的土木工程咨询公司工作,2018年加入WSP-Golder USA工作。Dr. Mikola在工作之余,开发了许多小型的岩土工程工具软件,例如DXF到UDEC的转换、有限元分析、工程岩体分类、岩石楔形破坏分析、巷道支护等。
HYRCAN是一个二维边坡稳定性程序,用于评估土或岩石边坡圆形破坏面的安全系数,可以快速创建和分析复杂的模型,能够模拟外部荷载、地下水和支护。按照Dr. Mikola的说法,HYRCAN(包括有限元软件ADONIS)的最终目标是向岩土工程师和大学教师提供类似于商业软件包(FLAC, SLIDE, PLAXIS等)的服务,使用现代软件设计原理的免费框架为计算岩土力学提供一个新的和有用的工具,而且为该领域的计算软件设立一个新的标准。
V2.0.8修复了一个法向应力计算出现的问题,同时启用了基于显示器像素密度的自动缩放功能,因而极大地改善了图形显示的效果。
newmodel()
set("failureDir","r2l")
extboundary(20,25,30,25,50,35,70,35,70,20,20,20,20,25)
matboundary(30,25,50,29,54,31,70,31)
matboundary(40,27,52,24,70,24)
definemat("ground","matID",1,"matName","Soil 1","uw",19.5,"cohesion",0,"friction",38)
definemat("ground","matID",2,"matName","Soil 2","uw",19.5,"cohesion",5.3,"friction",23)
definemat("ground","matID",3,"matName","Soil 3","uw",19.5,"cohesion",7.2,"friction",20)
assignsoilmat("matid",1,"atpoint",53.5982,32.8461)
assignsoilmat("matid",2,"atpoint",56.9309,28.517)
assignsoilmat("matid",3,"atpoint",34.2547,22.0234)
definelimits("limit",20,36.665,"limit2",45,70)
compute()
这段代码用来计算下图所示的边坡稳定性。可以用JavaScript或Python语言写子程序来扩展程序现有的功能。
newmodel()
set("language","en")
set("unit","metric","waterUW",9.81)
set("failureDir","l2r","numSlice",50)
set("Method","GLE/M-P","on","Method","JanbuSim","on","Method","Spencer","on")
extboundary(20,25,30,25,50,35,70,35,70,20,20,20,20,25)
matboundary(30,25,50,29,54,31,70,31)
definemat("ground","matID",1,"matName","soil 1","uw",19.5,"cohesion",0,"friction",38)
assignsoilmat("matid",1,"atpoint",44.1517,29.8778)
definelimits("limit",20,36.665,"limit2",45,70)
addwatertable(0,10,30,3,40,3)
applyload("constant","loadid",1,"mag",50,"orientation","normal","frompoint",8,16,"topoint",14,16)
applyload("seismic","horizCoeff",0.15)
definemat("support","matID",1,"supportType","SoilNail","matName","soil_nail","spacing",1.5,"tensCapacity",118,"plateCapacity",86,"bondStrength",15)
addsupport("pattern","id",1,"matid",1,"orientation","anglefromhoriz","angle",-15,"length",4.9,"spaced","along","dist",1.5,"frompoint",0,1.5,"topoint",0,5)
compute("silence")
getminfos("JanbuSim")
show("slices")hide("allsurfaces")savemodel()
3 Python模块
import hyrcan as hynewmodel()
set('failureDir','r2l')
extboundary(0,0,130,0,130,50,80,50,50,30,0,30,0,0)
matboundary(0,20,130,35)
matboundary(56,34,130,42)
definemat('ground','matID',1,'matName','Sand','uw',18,'cohesion',5,'friction',38)
definemat('ground','matID',2,'matName','Clay','uw',17,'cohesion',57,'friction',0)
assignsoilmat('matid',2,'atpoint',85,30)
definelimits('limit',20,65,'limit2',80,100)
set('Method','BishopSim','on')
""")
(6) hy.surf_radius---返回特定滑动面id的半径
(7) hy.surf_center_min_fos---返回最小滑动面的中心
(8) hy.surf_radius_min_fos---返回最小滑动面的半径
其中(7)和(8)是V2.0.7新增加的函数。
HYRCAN目前使用的Python版本是3.9.13。曾经想把plxle【二维和三维边坡稳定性分析模块plxle】安装在HYRCAN的环境中,使用一个输入参数同时运行两个软件,结果在安装后不能正确输入模块plxle,在初始化时出现错误信息[cannot import name 'cygrpc' from 'grpc._cython'];另一个问题是HYRCAN与Python的集成使用了与Itasca软件相同的内嵌方法,也就是Python代码只能在它的软件环境中运行,不能使用象Plaxis那种远程编程方式【Plaxis使用Spyder替换默认编辑器SciTE的方法】;此外,外部参数如何传递到hy.command()命令也没尝试到合适的方法,Itasca软件通过FISH可以实现,但HYRCAN似乎没有直接的方法。
fos_array = [-1,-1,-1,-1]
coh_array = [60,70,80,90]
cmd = "definemat('ground','matID',2,'matName','Clay','uw',17,'cohesion',{coh},'friction'
,0)"
for i in range(0, 4):
hy.command(cmd.format(coh=coh_array[i]))
hy.command("compute('silence')")
fos_array[i] = hy.min_fos('BishopSim')
worksheet.write_column('A2', coh_array)worksheet.write_column('B2', fos_array)