Re: [Yade-users] [Question #699072]: About the examples/ThermalEngine

2021-11-21 Thread Launchpad Janitor
Question #699072 on Yade changed:
https://answers.launchpad.net/yade/+question/699072

Status: Needs information => Expired

Launchpad Janitor expired the question:
This question was expired because it remained in the 'Needs information'
state without activity for the last 15 days.

-- 
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 #699072]: About the examples/ThermalEngine

2021-11-21 Thread Robert Caulk
Question #699072 on Yade changed:
https://answers.launchpad.net/yade/+question/699072

Status: Expired => Answered

Robert Caulk changed the question status:
Marking as answered to avoid launchpad janitor until OP returns.

-- 
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 #699565]: Obtain the contact number of each particles in the primary fabric (only consider large contact force pairs)

2021-11-21 Thread Karol Brzezinski
Question #699565 on Yade changed:
https://answers.launchpad.net/yade/+question/699565

Status: Open => Answered

Karol Brzezinski proposed the following answer:
Hi Zheng,

I am not sure whether I understand you correctly. From what I
understood, you want to know how many contacts of each particle have a
normal force (amplitude) bigger than the threshold (mean force that you
computed). I propose a modification of your last loop like this:

bodyId_numOfContacts = []
for b in O.bodies:
counter = 0
for ii in b.intrs():
if ii.phys.normalForce.norm() > avgForce:
counter += 1
bodyId_numOfContacts.append([b.id, counter])
bodyId_numOfContacts = np.array(bodyId_numOfContacts)

Cheers,
Karol

-- 
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 #699581]: How to inspect the body one by one in the cloud if I have 2 files YADE separately?

2021-11-21 Thread Defri
New question #699581 on Yade:
https://answers.launchpad.net/yade/+question/699581

Dear all,

I have some confusions:
I would like to use the paraview to inspect the stress of the body (because if 
you see in the graph, that the stress is really big until more than 1 million 
kN/m^2), I wanna know what caused it to happen, but the problem is I made 2 
files separately.
My question is:
  1. Is that the command I need to do is using VTKRecorder only?
  2. If yes, Where I need to put that and how? I made once (not in these files) 
only like I put VTKRecorder(fileName='tes',recorders=['all'],iterPeriod=100) on 
 the last row of O.engines. Is it correct only like that?
  3. On Which row I have to put the command?

###SCRIPT### FILE 1

##Sphere Cylinder pack
from yade import pack,plot,utils,export
import math
from pylab import rand #for sand color
O.trackEnergy=True

O.engines=[ForceResetter(),

InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()]),

InteractionLoop([Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],
   [Ip2_FrictMat_FrictMat_FrictPhys()],
   [Law2_ScGeom_FrictPhys_CundallStrack()]),
   NewtonIntegrator(damping=.3,gravity=[0,0,-9.81])]

O.bodies.append(geom.facetBox((0,-1.7,0),(1.7,0,2),wallMask=4))
O.bodies.append(geom.facetBox((0,1.7,0),(1.7,0,2),wallMask=4))
O.bodies.append(geom.facetBox((-1.7,0,0),(0,1.7,2),wallMask=4))
O.bodies.append(geom.facetBox((1.7,0,0),(0,1.7,2),wallMask=4))

bottom=wall((0,0,-2),axis=2)
O.bodies.append(bottom)
sp=pack.SpherePack()
s=200
dmax=0.00050*s
dmin=0.00025*s
rMean=(dmax+dmin)/4
rRelFuzz=(dmax-dmin)/(dmax+dmin)
nums=1
sp.makeCloud((-1.7,-1.7,-2),(1.7,1.7,1),rMean,rRelFuzz,num=nums)
#sp.makeCloud((-1.7,-1.7,1),(1.7,1.7,5),rMean,rRelFuzz,num=2*nums)

O.materials.append(FrictMat(young=600e6,poisson=.3,density=2700,frictionAngle=radians(17)))
 

sp.toSimulation(color=(0.6+0.15*rand(),0.5+0.15*rand(),0.15+0.15*rand()))

##Define material of the grains
for i in range(9,len(O.bodies)):
b=O.bodies[i]
b.state.blockedDOFs='XYZ'
b.state.vel=(0,0,0)

O.dt=PWaveTimeStep()

globals().update(locals())

O.saveTmp()


After all the bodies dropped under the gravity, in the Terminal, I typed In 
[1]: O.save('YADE/(directory and the name of file)')
Then I load it in this SCRIPT FILE 2:

#O.load('YADE/dennis_yade/drop/Sand_2_41794')
O.load('YADE/dennis_yade/drop/Sand_1_33509')

O.materials.append(FrictMat(young=600e6,poisson=0.3,density=2227,frictionAngle=radians(17),label='boulder'))
k=utils.sphere(center=(0,0,.3),radius=.45,color=[0,1,1],material='boulder')
O.bodies.append(k)
height=10
k.state.vel=(0,0,-(2*9.81*height)**.5)

from yade import pack,plot,utils,export

O.engines=O.engines+[PyRunner(command='stress_rad1()',iterPeriod=5)]

def stress_rad1():
b1=O.bodies[-1]
rad1=.25
rad2=.5
rad3=.75
area1=pi*rad1**2 
area2=pi*(rad2**2-rad1**2) 
area3=pi*(rad3**2-rad2**2)
ForceP=0
StP=0
ForceP1=0
StP1=0
ForceP2=0
StP2=0
for i in O.bodies[8].intrs():
m=O.bodies[i.id2]

dist=(m.state.pos[0]**2+m.state.pos[1]**2+(m.state.pos[2]+2)**2)**.5
if dist<=rad1: #1st area
u=O.interactions[8,m.id]
ForceP=ForceP+abs(u.phys.normalForce[2])
StP=ForceP/area1
if dist>rad1 and dist<=rad2: #2nd area
u1=O.interactions[8,m.id]
ForceP1=ForceP1+abs(u1.phys.normalForce[2])
StP1=ForceP1/area2
if dist>rad2 and dist<=rad3:#3rd area
u2=O.interactions[8,m.id]
ForceP2=ForceP2+abs(u2.phys.normalForce[2])
StP2=ForceP2/area3  
Force=O.forces.f(b1.id)[2]  

plot.addData(FzB=Force,z=b1.state.pos[2],Stress=StP,Stress1=StP1,Stress2=StP2,i=O.iter,t=O.time,velocity=b1.state.vel.norm())

globals().update(locals())

plot.plots={
'i':('FzB',),'t':('Stress','Stress1','Stress2'),}

plot.plot(subPlots=True)


What should I do?

Thank you in advance!

Cheers!!

-- 
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 #699565]: Obtain the contact number of each particles in the primary fabric (only consider large contact force pairs)

2021-11-21 Thread Zheng
Question #699565 on Yade changed:
https://answers.launchpad.net/yade/+question/699565

Status: Answered => Solved

Zheng confirmed that the question is solved:
Thanks Karol Brzezinski, that solved my question.

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