74
74
# using spheres 7mm of diameter
75
75
concreteId=O.materials.append(CpmMat(young=young,frictionAngle=frictionAngle,poisson=poisson,density=4800,sigmaT=sigmaT,relDuctility=relDuctility,epsCrackOnset=epsCrackOnset,isoPrestress=isoPrestress))
77
spheres=pack.randomDensePack(pack.inHyperboloid((0,0,-.5*specimenLength),(0,0,.5*specimenLength),.25*specimenLength,.17*specimenLength),spheresInCell=2000,radius=sphereRadius,memoizeDb='/tmp/triaxPackCache.sqlite',material=concreteId)
78
#spheres=pack.randomDensePack(pack.inAlignedBox((-.25*specimenLength,-.25*specimenLength,-.5*specimenLength),(.25*specimenLength,.25*specimenLength,.5*specimenLength)),spheresInCell=2000,radius=sphereRadius,memoizeDb='/tmp/triaxPackCache.sqlite')
79
O.bodies.append(spheres)
78
sp=pack.randomDensePack(pack.inHyperboloid((0,0,-.5*specimenLength),(0,0,.5*specimenLength),.25*specimenLength,.17*specimenLength),spheresInCell=2000,radius=sphereRadius,memoizeDb='/tmp/triaxPackCache.sqlite',returnSpherePack=True)
79
#sp=pack.randomDensePack(pack.inAlignedBox((-.25*specimenLength,-.25*specimenLength,-.5*specimenLength),(.25*specimenLength,.25*specimenLength,.5*specimenLength)),spheresInCell=2000,radius=sphereRadius,memoizeDb='/tmp/triaxPackCache.sqlite',returnSpherePack=True)
80
sp.toSimulation(material=concreteId)
80
81
bb=uniaxialTestFeatures()
81
82
negIds,posIds,axis,crossSectionArea=bb['negIds'],bb['posIds'],bb['axis'],bb['area']
82
83
O.dt=dtSafety*PWaveTimeStep()
130
131
O.step(); # to create initial contacts
131
132
# now reset the interaction radius and go ahead
132
133
ss2sc.interactionDetectionFactor=1.
133
is2aabb.aabbEnlargeFactor=-1.
134
is2aabb.aabbEnlargeFactor=1.
143
144
if extremum==0: return
144
145
# uncomment to get graph for the very first time stopIfDamaged() is called
145
146
#eudoxos.estimatePoissonYoung(principalAxis=axis,stress=strainer.avgStress,plot=True,cutoff=0.3)
146
print O.tags['id'],mode,strainer.strain,sigma[-1]
147
147
import sys; sys.stdout.flush()
148
148
if abs(sigma[-1]/extremum)<minMaxRatio or abs(strainer.strain)>(5e-3 if isoPrestress==0 else 5e-2):
149
149
if mode=='tension' and doModes & 2: # only if compression is enabled
163
163
title=O.tags['description'] if 'description' in O.tags.keys() else O.tags['params']
164
164
print 'gnuplot',plot.saveGnuplot(O.tags['id'],title=title)
167
#sys.exit(0) # results in some threading exception
169
169
def addPlotData():
170
170
yade.plot.addData({'t':O.time,'i':O.iter,'eps':strainer.strain,'sigma':strainer.avgStress+isoPrestress,