Re: [Yade-users] [Question #684008]: aabb walls don't move after apply a force

2019-09-22 Thread Robert Caulk
Question #684008 on Yade changed:
https://answers.launchpad.net/yade/+question/684008

Status: Open => Answered

Robert Caulk proposed the following answer:
Whether you meant to or not, python is reading a $\mu$ character in that
line. Try retyping it to make sure you aren't inadvertently adding any
special characters.

-- 
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


Re: [Yade-users] [Question #684008]: aabb walls don't move after apply a force

2019-09-18 Thread Anqi H
Question #684008 on Yade changed:
https://answers.launchpad.net/yade/+question/684008

Status: Answered => Open

Anqi H is still having a problem:
Hi Jan,

Thank you for the catch. I've uncommented the code that defined
blockedDOFs, but now I've got very different error messages when I run
the simulations. It seems like it does not recognize a character in the
line 'upper_wall.state.blockedDOFs = 'zXY'', but this line of code
doesn't have any issues in the old yade install.

ValueError: cannot convert float NaN to integer
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/IPython/core/ultratb.py", line 1267, in 
__call__
self.handler((etype, evalue, etb))
  File "/usr/lib/python3/dist-packages/IPython/core/ultratb.py", line 1256, in 
handler
ostream.write(self.text(etype, evalue, etb))
UnicodeEncodeError: 'latin-1' codec can't encode character '\u03bc' in position 
2659: ordinal not in range(256)

Original exception was:
Traceback (most recent call last):
  File 
"/usr/local/yadeFoam/install/lib/x86_64-linux-gnu/yade-2019-08-28.git-430b5a3/py/yade/qt/__init__.py",
 line 199, in refreshEvent
self.refreshValues()
  File 
"/usr/local/yadeFoam/install/lib/x86_64-linux-gnu/yade-2019-08-28.git-430b5a3/py/yade/qt/__init__.py",
 line 272, in refreshValues
s=int(t); ms=int(t*1000)%1000; us=int(t*100)%1000; 
ns=int(t*10)%1000

-- 
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


Re: [Yade-users] [Question #684008]: aabb walls don't move after apply a force

2019-09-18 Thread Jan Stránský
Question #684008 on Yade changed:
https://answers.launchpad.net/yade/+question/684008

Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

the same as in [1]:
"please provide a script which is ... minimal = if the problem is moving the 
wall, a script with one wall should be enough"

hint: print(upper_wall.state.blockedDOFs)

cheers
Jan

[1] https://answers.launchpad.net/yade/+question/682676

-- 
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


[Yade-users] [Question #684008]: aabb walls don't move after apply a force

2019-09-18 Thread Anqi H
New question #684008 on Yade:
https://answers.launchpad.net/yade/+question/684008

Hi everyone,

I recently installed yade-2019-08-28.git-430b5a3 and found the script that 
worked with the old yade (apt install yade) is not working with the updated 
version. Specifically, a force is applied on an aabb wall, but the wall 
position does not change and the velocity shows to be zero. I have attached my 
script below, would anyone be able to help me have a look? Thank you.

# !/usr/bin/python
# -*- coding: utf-8 -*-

from yade import utils
from yade import pack
from yade import plot
from yade import qt
from yade import export

# input parameter
Young = 57e8 # 100Gpa
FrictAng = atan(0.5)
Density = 2650
Poisson = 0.28
Cohesion = 38e6 # pa
TensileStr = 38e6 # pa

#define rock and wall
rock = 
JCFpmMat(young=Young,frictionAngle=FrictAng,density=Density,poisson=Poisson,tensileStrength=TensileStr,cohesion=Cohesion)
wall = 
JCFpmMat(young=2.06e11,frictionAngle=radians(30),density=7800,poisson=0.3,tensileStrength=0,cohesion=0)

for Mat in (rock,wall):
 O.materials.append(Mat)

# regularOrth packing of the rock
rock_pred = pack.inAlignedBox((0,0,0),(.02,.03,.02))
assembly = pack.regularOrtho(rock_pred,radius=0.0002,gap=0,material=rock)
r_assembly=O.bodies.append(assembly)

# aabbWalls
wall = 
O.bodies.append(utils.aabbWalls(material=wall,thickness=0.000,color=(1,1,1)))


# set velocity for bottom/upper wall
bottom_wall = O.bodies[wall[2]]
#bottom_wall.state.blockedDOFs = 'zXY'
bottom_wall.state.mass = 1

upper_wall = O.bodies[wall[3]]
#upper_wall.state.blockedDOFs = 'zXY'
upper_wall.state.mass = 1

O.forces.setPermF(upper_wall.id, (0,-1,0)) 
O.forces.setPermF(bottom_wall.id, (0,1,0))


def addPlot():
 print (str(upper_wall.state.pos[1]))
 print ('wall velocity'+str(upper_wall.state.vel))
 O.forces.setPermF(upper_wall.id, (0,-1,0))

###
# ENGINES
###

O.engines=[
 ForceResetter(),
 # enlarge interaction radius between spheres 
 
InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=1.25,label='bo1s'),Bo1_Box_Aabb()]),
 InteractionLoop(
  
[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=1.25,label='ig2s'),Ig2_Box_Sphere_ScGeom()],
  [Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1)],
  
[Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(recordCracks=True,label='lawFunctor')]
 ),
 # VTKRecorder(fileName='post/uniCom-',recorders=['all'],iterPeriod=50),
 
GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=5,timestepSafetyCoefficient=0.8,defaultDt=PWaveTimeStep()),
 NewtonIntegrator(damping=0.3,gravity=(0,0,0)),
 #call addPlot() every 20 steps
 PyRunner(command='addPlot()', realPeriod=20)
]
O.trackEnergy=True
O.step()

bo1s.aabbEnlargeFactor=1
ig2s.interactionDetectionFactor=1

#set an optimal timestep
O.dt = utils.PWaveTimeStep()
O.usesTimeStepper = True


-- 
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