New question #700587 on Yade:
https://answers.launchpad.net/yade/+question/700587

Hello,everyone!

What I want to do is to simulate the triaxial compression failure of rock under 
seepage conditions.But when I run the following script,it runs very slowly ( 
iter:3.0/s).I wonder if this is normal?
ps:My model is a 0.05 * 0.05 * 0.05 cube with about 5000 particles.

------------------------------------------------
from yade import pack, ymport, plot, utils, export, timing
from builtins import range
import numpy as np

rate=-0.01
damp=0.4
stabilityThreshold=0.001
key='_triax_base_'
young=20e9
name='JCFPM_triax'
compFricDegree=30
poisson=0.1

mn,mx=Vector3(0,0,0),Vector3(0.05,0.05,0.05)
O.materials.append(JCFpmMat(type=1,density=2640,young=young,poisson=poisson,tensileStrength=1e7,cohesion=2e7,frictionAngle=radians(60),label='sphere'))
O.materials.append(JCFpmMat(type=1,frictionAngle=0,density=0,label='wall'))
walls=aabbWalls([mn,mx],thickness=0,material='wall')
wallIds=O.bodies.append(walls)

O.bodies.append(ymport.text('packing-JCFPM.spheres',scale=1,shift=Vector3(0,0,0),material='sphere',color=(0.6,0.5,0.15)))
### (The model imported here is a cube of about 5000 particles generated by 
Randomdensepack)

triax=TriaxialStressController(
 maxMultiplier=1.+2e7/young,
 finalMaxMultiplier=1.+2e6/young,
 thickness = 0,
 stressMask = 7,
 internalCompaction=True,
)
newton=NewtonIntegrator(damping=damp)
def recorder():
 yade.plot.addData(
 i=O.iter,
 e11=-triax.strain[0],e22=-triax.strain[1],e33=-triax.strain[2],
 s11=-triax.stress(triax.wall_right_id)[0],#0+边界id为right
 s22=-triax.stress(triax.wall_top_id)[1],#1+边界id为top
 s33=-triax.stress(triax.wall_front_id)[2],#2+边界id为front
 P=triax.porosity,
 #meanS=-triax.meanStress[2]
 ev=triax.volumetricStrain,
 numberTc=interactionLaw.nbTensCracks,
 numberSc=interactionLaw.nbShearCracks,
 unb=unbalancedForce()
)
 plot.saveDataTxt('triax_JCFPM_HM_Wy=10.0Mpa,Sy=2.0MPa')

def stop_condition():
 if abs(triax.strain[2]) > 0.015:
  O.pause()
  presentcohesive_count = 0
  for i in O.interactions:
          if hasattr(i.phys, 'isCohesive'):
               if i.phys.isCohesive == 1:
                   presentcohesive_count+=1
  print('the number of cohesive bond now is:',presentcohesive_count)

O.engines=[
 ForceResetter(),
 
InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=1.3,label='is2aabb'),Bo1_Box_Aabb()]),
 InteractionLoop(
  
[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=1.3,label='ss2sc'),Ig2_Box_Sphere_ScGeom()],
  [Ip2_JCFpmMat_JCFpmMat_JCFpmPhys()],
  
[Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(recordCracks=True,Key='triax_JCFPM_HM',label='interactionLaw')]
 ),
 
GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
 triax,
 #TriaxialStateRecorder(iterPeriod=100,file='WallStresses'+key),
 newton,
 FlowEngine(dead=1,label='flow'),
 
PyRunner(iterPeriod=int(1000),initRun=True,command='recorder()',label='data',dead=0),
 PyRunner(iterPeriod=1000,command='stop_condition()',dead=0),

]

O.step()
ss2sc.interactionDetectionFactor=-1
is2aabb.aabbEnlargeFactor=-1

triax.goal1=triax.goal2=triax.goal3=-10e6
while 1:
 O.run(1000,1)
 unb=unbalancedForce()
 print('unbalanced force:',unb,'mean stres:',triax.meanStress)
 if unb<stabilityThreshold and abs(-10000000-triax.meanStress)/10000000<0.001:
  break

flow.dead=0
flow.meshUpdateInterval=2
flow.useSolver=4
flow.permeabilityFactor=1
flow.viscosity=1
flow.bndCondIsPressure=[0,0,0,0,1,1]
flow.bndCondValue=[0,0,0,0,2e6,0]

triax.internalCompaction=False
triax.stressMask=3
triax.goal1=-1e7
triax.goal2=-1e7
triax.goal3=rate

plot.plots={'e33':('s33',None,'unb'),'i':('numberTc','numberSc',None,'s33')}
plot.plot()
O.run()
----------------------------------------------------------

Thanks for help!

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to