PFC常规三轴试验

之前做过一个真三轴的数值模拟,这里讲一下常规三轴的基本思路。

1、成样

    生成圆柱形的试样,这个比较简单,直接公开代码


new
def chicun_par
    sample_rad=0.5
    sample_hight=2
   
    keli_rdmin=0.06
    keli_rdmax=0.09
end
@chicun_par

domain extent [-sample_hight*1.5] [sample_hight*1.5][n=1.4]
wall generate cylinder base 0 0 [-sample_hight*0.5*n] axis 0 0 1 ...
                    height [sample_hight*n] radius [sample_rad] cap false falsewall generate plane position 0 0 [sample_hight*0.5] dip 0 ddir 0
wall generate plane position 0 0 [-sample_hight*0.5] dip 0 ddir 0

ball distribute radius [keli_rdmin] [keli_rdmax] porosity 0.28 ...
    range cylinder end1 0 0 [sample_hight*0.5-keli_rdmin] ...
    end2 0 0 [-sample_hight*0.5+keli_rdmin] radius [sample_rad-keli_rdmin]

cmat default model linear method deform emod 100e6 kratio 1.5 property fric 0.5

ball attribute density 2.7e3 damp 0.7
cycle 2000 calm 50

solve

save sample

2、预压

    这里是主要难点,圆柱形墙的伺服比较难,如何监测侧面墙的应力以及如何进行侧面墙的加载是个难点。

这里的代码在付费中公开。下图为伺服的应力变化。

点击完整阅读全文
PFC常规三轴试验

课程推荐

岩土行业离散元软件PFC6.0入门学习讲义

  • 10
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
PFC2D是一种用于离散颗粒模拟的软件工具,可用于模拟颗粒物质在三轴压缩实验中的行为。下面是一个基本的PFC2D三轴压缩实验代码示例: 1. 导入所需的库和模块: ```cpp from yade import pack, plot from yade import utils, plot, export utils.step = 0.001 # 定义时间步长 O.materials.append(FrictMat(Young=600000, Poisson=0.3, Ys=10000, sigmaT=10, density=2700, label='particles')) # 定义颗粒物质的力学属性 ``` 2. 创建颗粒堆积: ```cpp N = 10 # 定义颗粒的数量 diameter = 0.01 # 定义颗粒的直径 spheres = pack.randomDensePack(L=[1,1,1], N=N, rMean=diameter/2, rRelFuzz=0.1) # 创建颗粒堆积 for s in spheres: O.bodies.append(utils.sphere([s.position[0], s.position[1], s.position[2]], radius=diameter/2, material='particles')) # 将颗粒添加到模拟中 ``` 3. 设置边界条件: ```cpp xtol = 0.001 # x方向边界条件的容差 ytol = 0.001 # y方向边界条件的容差 ztol = 0.001 # z方向边界条件的容差 O.engines = [ ForceResetter(forceMask=1), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(), Ig2_Sphere_Facet_ScGeom()], # 定义颗粒之间和颗粒与边界之间的力学相互作用 [Ip2_FrictMat_FrictMat_FrictPhys()], # 定义力学模型 [Law2_ScGeom_FrictPhys_CundallStrack()],), NewtonIntegrator(), PyRunner(command='addPlotData()', iterPeriod=100), # 定义绘图周期 InsertionSortCollider([Bo1_Facet_Aabb(), Bo1_Wall_Aabb(), Bo1_Sphere_Aabb()]), InteractionLoop( [Ig2_Facet_Sphere_ScGeom(), Ig2_Wall_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()]), NewtonIntegrator() ] ``` 4. 运行模拟: ```cpp O.run(1000) # 运行模拟1000次 plot.saveDataTxt('stress-strain.txt') # 存储应力应变数据 ``` 这是一个简单的PFC2D三轴压缩实验的代码示例,你可以根据需要进行修改和扩展。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值