首页/文章/ 详情

plxle极限平衡法计算结果的提取

2年前浏览183
1 引言
plxle借助极限平衡软件Plaxis LE的核心,使用Python API计算边坡的安全系数【LEM边坡稳定性分析模块plxle的安装和使用】,所有的计算结果保存在 result = plxle.solve(model)中,本文讨论了如何从这个结果文件中取出具体的输入参数值和计算结果,这样做有两个目的:第一个目的是使用这些取出的值自动生成一个计算书,第二个目的是取出的值有可能输入到其它类似软件中,比如HYRCAN【下载LEM边坡稳定性软件HYRCAN V2.0.8】。

2 取出过程
首先让我们检查result = plxle.solve(model)的变量类型:

print(type(result))
输出结果显示result是一个类<class 'plxle.result.SolutionResult'>, 因此可以直接取出其中的值。下面按result的顺序取出各项之值。
【1】 FOS
result.fos取出安全系数:1.481

print(result.fos)
【2】 result.output_path
result.output_path取出结果的保存路径:

print(result.output_path)
【3】model_info
result文件的第三项是model_info,所有的结果都保存在这个对象中,首先加载:

totals = json.loads(result.model_info)
然后查看totals的内容,由于totals是一个字典对象,因而也可以使用totals.keys()


for each in totals:    print(each)

显示如下:

ModelProperties

ModelSettings

PoreWaterPressureSettings

AnalysisMethods

SlipSurfaceSettings

MaterialProperties

Results


(1) ModelProperties
ModelProperties显示模型名称,创建时间以及使用的单位。




model_prop = totals["ModelProperties"]print(model_prop)for i in model_prop.items():    print(i[0],i[1])
Name BASIC
Created 0001-01-01T00:00:00 [显示错误,plxle的问题]
Units Metric

(2) ModelSettings
ModelSettings取出边坡的方向。



model_settings = totals["ModelSettings"]for i in model_settings.items():    print(i[0],i[1])

FailureDirection Left to Right

(3) PoreWaterPressureSettings

PoreWaterPressureSettings提取与地下水相关的参数,包括水的密度、水压力类型、Ru、B-Bar以及每层土的水位线等。



pwps = totals["PoreWaterPressureSettings"]for i in pwps.items():    print(i[0],i[1])
PoreFluidUnitWeight 9.807 kN/m^3
PoreWaterPressureType Water Surfaces
ApplicationOfRuCoefficient Off
ApplicationOfBBarParameters Off
Regions ['Region - Upper Soil: Water Table Line 1', 'Region - Lower Soil: Water Table Line 1']

(4) AnalysisMethods

AnalysisMethods提取与分析方法相关的参数值,包括使用的极限平衡方法、条分数量、收敛准则以及最大的迭代次数



analysis_methods = totals["AnalysisMethods"]for i in analysis_methods.items():    print(i[0],i[1])
MethodsUsed ['GLE (Interslice Force Function - Half-sine)']
NumberOfSlices 30
ConvergenceTolerance 0.0010000000474974513
MaximumNumberOfIterations 50

(5) SlipSurfaceSettings
SlipSurfaceSettings用来提取滑动面设置的参数值,包括滑动面形状、搜索方法及其相应的其他参数。




slip_surface = totals["SlipSurfaceSettings"]print(sss)for i in slip_surface.items():    print(i[0],i[1])
SlipSurfaceShape Circular
SearchMethod Cuckoo Search
NumberOfSlipSurfaces 100

(6) SlipSurfaceSettings
MaterialProperties用来提取土层的参数值,这个值的外层使用了list,内层使用了dict,因此提出方法与上面的方法稍有不同。



mat_prop = totals["MaterialProperties"]for i in mat_prop:    print(i)
{'MaterialName': 'Upper Soil', 'StrengthType': 'Mohr Coulomb', 'Properties': {'Cohesion': '5 (kPa)', 'Phi': '20 (deg)', 'Unit Weight': '15 (kN/m^3)'}}
{'MaterialName': 'Lower Soil', 'StrengthType': 'Mohr Coulomb', 'Properties': {'Cohesion': '10 (kPa)', 'Phi': '25 (deg)', 'Unit Weight': '18 (kN/m^3)'}}
如果要提取单个属性的值,使用下面的方法:





mat_prop = totals["MaterialProperties"]for i in mat_prop:    a = i["Properties"]    for each in a.items():        print(each[0],each[1])
Cohesion 5 (kPa)
Phi 20 (deg)
Unit Weight 15 (kN/m^3)
Cohesion 10 (kPa)
Phi 25 (deg)
Unit Weight 18 (kN/m^3)

(7) Results
Results提取全部的计算结果,首先提取计算方法和安全系数







for fos in totals["Results"]:    print (fos['Method'])    print(fos['MomentFOS'])    print(fos['ForceFOS'])    final_results = fos['ResultsSummary']    for each in final_results.items():        print(each[0],each[1])
GLE
1.481
1.481
Calculation Method GLE
Search Method Cuckoo Search
FOS 1.481
Total Weight 2.123E+003 kN
Total Volume 1.237E+002 m^3
Total Activating Moment 1.331E+004 kNm
Total Resisting Moment 1.972E+004 kNm
Total Activating Force 6.046E+002 kN
Total Resisting Force 8.954E+002 kN
Rotation Center 24.830, 21.305 m
Radius 19.479 m
Slip Surface Entry Point 6.772, 14.000 m

Slip Surface Exit Point 33.772, 4.000 m

....


来源:计算岩土力学
岩土
著作权归作者所有,欢迎分享,未经许可,不得转载
首次发布时间:2022-12-02
最近编辑:2年前
计算岩土力学
传播岩土工程教育理念、工程分析...
获赞 153粉丝 1129文章 1783课程 0
点赞
收藏
未登录
还没有评论
课程
培训
服务
行家
VIP会员 学习计划 福利任务
下载APP
联系我们
帮助与反馈