periodic boundary in axial direction for particles in cylinder pipe
Hi.
I would like to set up the periodic boundary condition for cylinder pipe. I read some test cases given in examples folder. But most of them are in a box. I try to set up a test case as,
#!/usr/bin/python
# -*- coding: utf-8 -*-
from yade import pack,ymport,
import array as arr
import numpy as np
import math
import random
import os
import errno
dp = 1e3
O.periodic=True
# Add material
O.materials.
# Parameters, which will be passed into facets creators
kwMeshes=
oriBody = Quaternion(
# Cylinder
O.bodies.
# Pack
sp=pack.
sp.makeCloud(
predicate = pack.inCylinder
sp = pack.filterSphe
for c,r in sp:
O.bodies.
# Make a wall
O.bodies.
# Compute the number of particles
n=-1
for b in O.bodies:
if isinstance(
n=n+1
print(n)
# Set the velocity for particles
for b in O.bodies:
if isinstance(
v1=random.
v2=random.
v3=random.
b.state.
O.engines=[
# SubdomainBalanc
ForceResetter(),
InsertionSortC
# Represent the geometry of a contact point between twoSpheres
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
NewtonIntegrat
qt.SnapshotEng
PyRunner(
]
# O.dt=5.e-6
O.dt=PWaveTimeS
O.run(1,True)
# we must open the view explicitly (limitation of the qt.SnapshotEngine)
qt.View()
# this function is called when the simulation is finished
def finish():
# snapshot is label of qt.SnapshotEngine
# the 'snapshots' attribute contains list of all saved files
makeVideo(
O.pause()
#O.run(10000,True)
#from yade import timing
#timing.stats()
#quit()
But it gave a strange result.
Could you please figure out what is wrong?
FYI, I used the yade 2018.02b, python 2.7.17 and ubuntu 18.04.
Thank you.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Son Tung Dang
- Solved:
- Last query:
- Last reply: