a slight change to an example
this is an example of a triaxial shear test
from yade import pack,plot,qt,export
IsoSigma = -100.
O.periodic=True
# define material
idSand=
# create particles
sp1=pack.
sp1.makeCloud(
sp1.toSimulatio
#### show how to use makeClumpTempla
#dyad:
relRadList1 = [1,1]
relPosList1 = [[0.4,0,
#peanut:
#relRadList2 = [.5,1,.5]
#relPosList2 = [[1,0,0]
#stick:
#relRadList3 = [1,1,1,1,1]
#relPosList3 = [[0,1,0]
templates= []
templates.
#templates.
#templates.
#### show how to use replaceByClumps():
#replace by 50% dyads, 30% peanuts and 10% sticks:
O.bodies.
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
# PyRunner(
NewtonIntegrat
PeriTriaxContr
stressMask=7,
dynCell=True,
maxStrainRa
maxUnbalanc
relStressTo
doneHook=
label='p3d'
),
# VTKRecorder(
# PyRunner(
# PyRunner(
#PyRunner(
]
'''
def plotAddData():
plot.addData(
iter=
sxx=p3d.
exx=O.
Z=avgNumInter
Zm=avgNumInte
# poros=voxelPoro
unbalanced=
t=O.time,
gWork=
Ep=O.
Edamp=
Ediss=
Ekin=
)
plot.saveDataT
plot.saveDataT
O.trackEnergy=True
# plotting
plot.live=True
plot.plots=
#energy plot
' iter ':(O.energy.
}
def fabric():
fileNomb=
f = open(fileNomb,'w')
f.write('id1 id2 x_cp y_cp z_cp n_x n_y n_z Fn_x Fn_y Fn_z Fs_x Fs_y Fs_z ovp\n')
for i in O.interactions:
if not i.isReal: continue
tacts = i.geom.contactPoint
nmls = i.geom.normal
ovp = i.geom.
Fn = i.phys.normalForce
Fs = i.phys.shearForce
f.write('%-16d %-16d %-16g %-16g %-16g %-16g %-16g %-16g %-16g %-16g %-16g %-16g %-16g %-16g %-16g\n'%(i.id1,
i.
f.close
def balls():
fileCalled=
export.
def strains():
fileNome=
f = open(fileNome,'w')
f.write('b.id velx vely velz rotx roty rotz\n')
for b in O.bodies:
if isinstance(
vels = b.state.vel
rots = b.state.rot()
f.write('%-16d %-16g %-16g %-16g %-16g %-16g %-16g\n'%(b.id, vels[0]
f.close
'''
def Finished():
O.save(
print('Finished')
print(porosity())
O.pause()
O.run()
#plot.plot(
how can I change the particles from circular to ellipse?
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask yihao Zhang for more information if necessary.