yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #21090
Re: [Question #685279]: Error in using TriaxialStressController
Question #685279 on Yade changed:
https://answers.launchpad.net/yade/+question/685279
Status: Answered => Open
ehsan benabbas is still having a problem:
Hi Jan
Thank you for your answers. I determined young and even changed the
porosity to avoid getting overlap warnings for packing, now my code is
as below with no warning or error in output except "AttributeError: No
such attribute:", and no graph or data shows up.
**********************************
Output:
ehsan@ehsan:~/Desktop/mycodes/3axtst$ /home/ehsan/yade/install/bin/yade-2019-08-08.git-775ae74 3axtst.py
Welcome to Yade 2019-08-08.git-775ae74
Using python version: 3.6.8 (default, Oct 7 2019, 12:59:55)
[GCC 8.3.0]
TCP python prompt on localhost:9000, auth cookie `csasde'
XMLRPC info provider on http://localhost:21000
Running script 3axtst.py
Traceback (most recent call last):
File "/home/ehsan/yade/install/bin/yade-2019-08-08.git-775ae74", line 336, in runScript
execfile(script,globals())
File "/usr/lib/python3/dist-packages/past/builtins/misc.py", line 82, in execfile
exec_(code, myglobals, mylocals)
File "3axtst.py", line 32, in <module>
internalCompaction=False,
AttributeError: No such attribute: goal.
[[ ^L clears screen, ^U kills line. F12 controller, F11 3D view (press "h" in 3D view for help), F10 both, F9 generator, F8 plot. ]]
In [1]:
**********************************
My code:
import numpy as np
import math
from yade import pack, plot, qt, export, utils
from datetime import datetime
young=15e6
poisson=0.4
sigmaIso=-50e3
sp=pack.SpherePack()
mn, mx=Vector3(0,0,0), Vector3(10,10,10)
sp.makeCloud(minCorner=mn,maxCorner=mx,rRelFuzz=0.2,num=2000,porosity=0.7)
O.materials.append(FrictMat(young=15e6,poisson=0.4,frictionAngle=radians(30),density=2600,label='spheres'))
O.materials.append(FrictMat(young=15e6,poisson=0.4,frictionAngle=0,density=0,label='frictionless'))
O.bodies.append([sphere(center,rad,material='spheres') for center, rad
in sp])
walls=aabbWalls(thickness=1e-10,material='frictionless')
wallIds=O.bodies.append(walls)
#################################################
######### Triaxial Test #########
triax=TriaxialStressController(
maxMultiplier=1.+2e4/young, # spheres growing factor (fast growth)
finalMaxMultiplier=1.+2e3/young, # spheres growing factor (slow growth)
thickness = 0,
goal=(sigmaIso,sigmaIso,sigmaIso),stressMask=7,
internalCompaction=False,
)
######################################################
######### DEVIATORIC LOADING #########
triax.stressMask = 3
triax.goal1 = sigmaIso
triax.goal2 = sigmaIso
triax.goal3 = -0.2
newton.damping=0.4
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
triax,
NewtonIntegrator(damping=0.4),
PyRunner(iterPeriod=20,command='history()',label='recorder'),
PyRunner(command='checkUnbalanced()',realPeriod=2)
]
O.dt=.5*PWaveTimeStep()
qt.View()
def history():
plot.addData(unbalanced=unbalancedForce(),i=O.iter,**O.energy,
e11=-triax.strain[0], e22=-triax.strain[1], e33=-triax.strain[2],
s11=-triax.stress(0)[0], s22=-triax.stress(2)[1], s33=-triax.stress(4)[2],
Etot=O.energy.total())
def checkUnbalanced():
if unbalancedForce()<.05:
O.pause()
plot.saveDataTxt('bbb.txt.bz2')
plot.plots={'i':('unbalanced'),'i ':('s11','s22','s33'),' i':('e11','e22','e33'),'e22':('s22')}
plot.labels={'unbalanced':'$F_{UB}$' , 's11':'$\sigma_{11}$' , 's22':'$\sigma_{22}$' , 's33':'$\sigma_{33}$' , 'e11':'$\epsilon_{11}$' , 'e22':'$\epsilon_{22}$' , 'e33':'$\epsilon_{33}$'}
Gl1_Sphere.stripes=True
plot.plot()
O.saveTmp()
O.run(5000,True)
plot.saveDataTxt('results')
*************************************
Thank you for your help.
--
You received this question notification because your team yade-users is
an answer contact for Yade.