TW=TesselationWrapper()
hi all,
I am using the supercomputer to do some simulations. I want to get the microstrain field, so I did as the document said. which means including this TW=TesselationW
Traceback (most recent call last):
File "/packages/
execfile(
File "microscale.py", line 149, in <module>
TW=
NameError: name 'TesselationWra
unbalanced force: 6.45473797305e-06 mean stress: -99999.9975958
porosity= 0.429910437487
unbalanced force: 7.80668882803e-06 mean stress: -100000.028644
### Compacted state saved ###
porosity= 0.429910437332
#######
here is part of the code related to the TessalationWrapper command.
#######
#######
### DEFINING PARAMETERS ###
#######
from yade import pack, plot
from yade import export
from yade import utils
nRead=readParam
num_spheres=5288,
compFricDegree
key='_
goal_confining
unknownOK=True
)
from yade.params import table
num_spheres=
key=table.key
targetPorosity=0.43
compFricDegree=
finalFricDegree
rate=-15
damp=0.7
target_strain = 0.15
stabilityThresh
young=4e8
mn,mx=Vector3(
O.materials.
O.materials.
walls=aabbWalls
wallIds=
sp=pack.
psdSizes=
psdCumm=
sp.makeCloud(
sp.toSimulation
print "num_spheres= ", len(O.bodies)
O.dt=.5*
print "num_spheres= ", len(O.bodies)
#######
### DEFINING ENGINES ###
#######
triax=TriaxialS
maxMultiplier=
finalMaxMultip
thickness=0,
stressMask=7,
internalCompac
)
newton=
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
GlobalStiffnes
triax,
#VTKRecorder(
#TriaxialState
newton,
#PyRunner(
#PyRunner(
]
#Gl1_Sphere.
#if nRead==0: yade.qt.
#######
#### APPLYING CONFINING PRESSURE ###
#######
triax.goal1=
while 1:
O.run(3000,True)
unb=unbalanced
print 'unbalanced force: ',unb,'mean stress: ',triax.meanStress
if unb<stabilityTh
break
#######
#### REACHING A SPECIFIED POROSITY PRECISELY ###
#######
while triax.porosity>
compFricDegree = 0.95*compFricDegree
setContactFric
print "\r Friction: ",compFricDegree," porosity:
sys.stdout.flush()
O.run(500,1)
triax.wall_
triax.wall_
triax.wall_
triax.wall_
triax.wall_
triax.wall_
setContactFrict
while 1:
O.run(3000,True)
unb=unbalanced
print 'unbalanced force: ',unb,'mean stress: ',triax.meanStress
if unb<stabilityTh
break
print "porosity= ",triax.porosity
triax.goal1=
while 1:
O.run(1000, True)
unb=
print 'unbalanced force:',unb,' mean stress: ',triax.meanStress
if unb<stabilityTh
break
#O.save(
print "### Compacted state saved ###"
print "porosity= ",triax.porosity
re11=-triax.
re22=-triax.
re33=-triax.
#######
##### DEVIATORIC LOADING ###
#######
triax.stressMask = 5
newton=
#now goal2 is the target strain rate
triax.goal2=rate
# we define the lateral stresses during the test, here the same 10kPa as for the initial confinement.
triax.goal1=-100000
triax.goal3=-100000
triax.strainRat
triax.strainRat
#######
def history():
plot.
s11=
s22=
s33=
CN=
FT1=
FT2=
plot.saveDataT
#### loading condition####
def stop_loading():
if -triax.
O.pause()
#### export the displacement filed ####
vtk = export.
def doExport():
#vtk.exportSph
vtk.exportSphe
##### export the strain field ####
TW=TesselationW
TW.triangulate()
TW.computeVolumes()
TW.setState(0)
O.run(100,True)
TW.setState(1)
def strain_export():
TW.setState(1)
TW.defToVtk(
###### export the sress field ####
TW=TesselationW
TW.setState()
TW.computeVolumes()
s=bodyStressTen
for b in O.bodies:
if isinstance(
b.mystress = s[b.id]
vtk = export.
def stress_export():
vtk.exportSphe
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
GlobalStiffnes
triax,
#VTKRecorder(
#TriaxialState
newton,
PyRunner(
PyRunner(
PyRunner(
PyRunner(
PyRunner(
]
O.run(5000000,True)
#######
#plot.plots=
#plot.plot()
#######
I found a similar question, they said the reason may be the older version. But the version of Yade in the supercomputer is:
TCP python prompt on localhost:9000, auth cookie `udseck'
Welcome to Yade 2018.02b
XMLRPC info provider on http://
Running script microscale.py
Is there anyone can give me some suggestions. thanks in advance.
Yong
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Bruno Chareyre
- Solved:
- Last query:
- Last reply: