跳转至

model

class model

Properties

<span id="model-%<------------ data objects ------------>">%<------------ data objects ------------>

TAG;%structure to record additional information, such as data for debug

模拟信息记录,用于记录和输出信息

SET;%structure to record running data

模拟设置信息,可记录二次开发新的数据

PAR;%parameters of parallel computing

用于平行计算的参数(未启用)

status;%model status

模型状态

dem;%build object

母build对象

FnCommand='nFN0=obj.nKNe.*nIJXn;';%command of Fn

正向力的定义,默认为线弹性接触。采用备注中的代码,可以定义hertz接触模型,具体原理可见《地质与岩土工程矩阵离散元分析》

d.mo.isShear=0;
d.mo.FnCommand='nFN1=obj.nKNe.*nIJXn;
nR=obj.aR(1:m_Num)*nRow;
nJR=obj.aR(obj.nBall);
Req=nR.*nJR./(nR+nJR);
nE=obj.aKN(1:m_Num)*nRow./(pi*nR);
nJE=obj.aKN(obj.nBall)./(pi*nJR);
Eeq=nE.*nJE./(nE+nJE);
nFN2=-4/3*Eeq.*Req.^(1/2).*abs(nIJXn).^(3/2);
f=nIJXn<0;
nFN0=nFN1.*(~f)+nFN2.*f;';

balanceCommand

平衡函数的命令,用于自定义接触模型和计算(d.mo.setBalanceFunction)

见Box_Crash1

afterBalance

在运行完balanceCommand后运行的命令

<span id="model-%<------------ initial parameters ------------>">%<------------ initial parameters ------------>

aNum;%ball number including boundary balls

模型单元和边界单元个数和

aMatId;

单元的材料编号

aX;aY;aZ;aR;%XYZ components and radius of all balls (model balls and boundary balls)

模型单元的X,Y,Z坐标和半径

aKN;aKS;%radius, stiffness of all balls

单元正向劲度系数和切向劲度系数

aBF;%, breaking force

单元断裂力

aFS0;%inter-ball shear resistance,

单元初始抗剪强度

aMUp;%coefficient of friction

单元摩擦系数

mNum;%ball number of model

模型活动单元个数

mVis;mVisX;mVisY;mVisZ;%viscosity,

单元阻尼系数

当mVis=[]时,将启用mVisX,Y,Z,实现各向异性的阻尼

mM;%mass

单元质量

mVX;mVY;mVZ;

单元在X,Y,Z方向上速度

mAX;mAY;mAZ;%acceleration

单元在X,Y,Z方向上加速度

mVFX;mVFY;mVFZ;%viscous force

单元在X,Y,Z方向上阻尼力

g;

重力加速度

mGX;mGY;mGZ;%mGZ is generally the gravity, GX,GY can be used to define constant load on balls

单元在X,Y,Z方向上的体力,也用于给压力板platen设置体力,并产生压力作用

aHeat;%heat matrix, colomn [Viscosity Heat, Normal Breaking Heat, Shear Breaking Heat, Slipping Heat]

单元热量

<span id="model-%<------------ running parameters ------------>">%<------------ running parameters ------------>

">%parameters for "remesh", i.e. setNearbyBall()→

用于邻居查找的参数

dSide;%border of ball grid, see documentation

邻居矩阵查找时的网格边长

dis_mXYZ;%summation of dmX and dmY of normal balls in balance, trigger of setNearbyBall

模型单元在上次邻居查找后的位移

dis_bXYZ;%summation of displacement boundary balls in newstep, trigger of setNearbyBall

边界单元在上次邻居查找后的位移

dbXYZ;%boundary displacement, used to calculate friction, updated in newStep

边界位移,用于内部计算

bFilter;%bond filter, n matrix

胶结过滤器

cFilter;%compressive filter

压缩过滤器

tFilter;%tensile filter

张拉过滤器

nBondRate;%remained bond rate

残余强度系数矩阵,连接的BF和FS0将乘以这个系数。可用于设置节理和裂隙,见user_Box3DJointStress示例

isBondRate=0

是否设定单独强度系数,当其值为1时,且设定d.mo.SET.nBondRate.BF为系数矩阵时,则单元间连接的断裂力将乘以这个系数矩阵,,见user_Box3DJointStress示例使用于MUp

nBall;%Id of nearby balls

邻居编号矩阵

nKNe;nKSe;nIKN;nIKS;%ball stiffness matrix, equivalent stiffness for normal force and shearing force

单元与邻居间劲度系数

nFnX;nFnY;nFnZ;%normal displacement along x,y,z directions

单元与邻居间正向力

nFsX;nFsY;nFsZ;%shear displacement along x,y,z directions

单元与邻居间切向力

nClump=[];

单元与邻居间clump重叠量,当其不为零时为clump连接

<span id="model-%<------------ system parameters ------------>">%<------------ system parameters ------------>

系统参数

dT=0;totalT=0;%current time interval, total time

时间步;总时间

isGPU=0;%whether the GPU calculation is on

是否用GPU计算

GPULevel;%the GPU calculation level in setNearbyBall, 0~3, more gpu memory will be used when it increases,basicfs.setModel

邻居矩阵查找时的GPU使用层次,0不使用,1初步使用,2中度使用,3全面使用(占用大量显存,支持单元数降为一半)

见user_SpeedTest

isHeat=0;%heat of the model; switch of heat calculation

是否计算热

isClump=0;%whether use the clump

是否有clump

isFix=0;

是否锁定自由度,锁定活动单元自由度后,其类似固定墙单元

FixXId;FixYId;FixZId;

锁定X,Y,Z坐标的单元编号

isWaterDiff;

是否进行有限差分计算

isCrack=0;%whether record the cracking process

是否统计生成的裂隙

isShear=1;%whether the shear force is calculated

是否考虑单元间切向力

isFailure=0;%whether the failure is considered

是否考虑单元压密破坏

isSmoothB=0;%whether the boundary is smooth, data recorded in SET

是否采用平滑边界

Methods

balance()

平衡迭代一次

d.mo.balance();

dispNote(note)

显示提示*

getBalanceData(dName,isBalance)

获取求解中的指定参数,nIJXn单元重叠量

dName参数名;isBalance,是否先做零时平衡

参数的值

nIJXn=d.mo.getBalanceData('nIJXn');

gpuStatus=setGPU(type)

设置GPU状态

type: 'on', 'off', 'auto','fixed','unfixed'

当前的GPU状态:'on'或'off'

详见以下示例

recement()

将处于压缩状态的连接设为完整连接,再两单元接触后会重新粘结

setBalanceFunction(functionFileName)

设置平衡函数命令d.mo.balanceCommand

命令语句

见BoxCrash1示例

setContactModel(type,varargin)

设置接触模型*,未来将取消

setKNKS()

设置单元与邻居间刚度,在改变单元刚度后需使用

setModel()

设置初始模型

setNearbyBall()%set nearby balls of each ball

三维邻居查找

setNearbyBall2()%set nearby balls of each ball

二维邻居查找

setNewStep(dbXYZnew)

设置新的边界步(将取消)

在新一步里,边界的位移

setShear(type)

开启或关闭剪切力计算,当开启时,会初始化所有剪切力为0;关闭时,将所有剪切力矩阵置空

on'或'off'

d.mo.setShear('on')

zeroBalance()%to intialize the model, break impossible intact bonds

零时平衡,用于计算模型当前状态

setFastComputing(type)

启用或关闭单精度浮点计算,建议不要启用

on'或'off'