Welcome to ask.woodem.org. You may post when you login through your GitHub account.

Error during generation of a cylindrical packed bed of capsules

0 votes
27 views
asked Mar 1 by coderguruz (200 points)
edited Mar 3 by coderguruz

Hello.

I get this error message:

Welcome to Woo ver. 1.0+dfsg1-1
Running script capsules.py
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/wooMain.py", line 367, in runScript
    execfile(script,globals())
  File "capsules.py", line 8, in <module>
    par=[woo.dem.Wall.make(0,axis=2,glAB=((-1,-1),(1,1)))]+woo.triangulated.cylinder(Vector3(0,0,0),Vector3(0,0,0.061),radius=0.030)
AttributeError: 'module' object has no attribute 'triangulated'
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view, F10 both, F8 plot. ]]

when I launch the following script:

import woo.core, woo.dem, woo.utils, math, woo.paraviewscript
from minieigen import *
woo.master.usesApi=10103
S=woo.master.scene=woo.core.Scene(
    fields=[woo.dem.DemField(
        gravity=(0,0,-9.81),
        # add bottom and cylinder walls
        par=[woo.dem.Wall.make(0,axis=2,glAB=((-1,-1),(1,1)))]+woo.triangulated.cylinder(Vector3(0,0,0),Vector3(0,0,0.061),radius=0.030)
    )],
    engines=woo.dem.DemField.minimalEngines(damping=.4)+[woo.dem.CylinderInlet(
        stepPeriod=3000,
        radius=0.030,
        height=0.012,
        node=woo.core.Node((0,0,0.067),((0,1,0),-math.pi/2)),
        massRate=0,
	maxNum=1000,
	maxAttempts=1000,
	materials=[woo.dem.FrictMat(density=1e3,young=1e7,ktDivKn=.2,tanPhi=math.tan(0.1))],
        generator=woo.dem.PsdCapsuleGenerator(psdPts=[(0.00529552,0),(0.00529552,1)],shaftRadiusRatio=(6,6))
    ),

    woo.core.PyRunner('ubf=woo.utils.unbalancedForce(S)\nprint(ubf)\nif S.step>250000: done(S)',400),
])

def done(S):
    S.stop()
    with open('capsules.txt','w') as out:
       for p in S.dem.par:
          if not isinstance(p.shape,woo.dem.Capsule): continue
          a,b,r=p.shape.endPt(0),p.shape.endPt(1),p.shape.radius
          out.write('%g %g %g %g %g %g %g\n'%(a[0],a[1],a[2],b[0],b[1],b[2],r))
    vtk=woo.dem.VtkExport(out='capsules-')
    vtk(S) # trigger manually writing Paraview data files
    # write paraview script and run it
    woo.paraviewscript.write('capsules.py',**woo.paraviewscript.kwFromVtkExport(vtk))
    woo.paraviewscript.launchPV('capsules.py')
S.run()

How could I solve this issue?

Thank you in advance

Please log in or register to answer this question.

...