Making video of pfacet clump: clump falling apart
Hello all,
I am trying to make a video of a rotating pfacet clump. However, when the pfacet clump starts rotating it seems to be falling apart in the 3D view. According to Bruno Chareyre [1] #17 :
"Note: there is a display problem which makes it look as if the clumped objects were splitting appart. It goes back to normal when you pause the simulation. Nothing to worry about. (reason is: the cylinders are not dynamic objects and there orientation is not used anywhere in the code, so it is not updated at runtime - only when 3D view is refreshed orientation is recomputed for display)."
So all I have to do is pause the simulation. But I want to use the snapshot engine to make a video. If I pause it then the simulation no longer executes. So is there a way I can make a video in which the pfacet does not fall apart.
Kind regards,
Rohit K. John
[1] https:/
# -------
14 36 24 GtsSurface GtsFace GtsEdge GtsVertex
0.5 0.5 0.5
0.5 0.5 -0.5
0.5 -0.5 0.5
0.5 -0.5 -0.5
-0.5 0.5 0.5
-0.5 0.5 -0.5
-0.5 -0.5 0.5
-0.5 -0.5 -0.5
0.5 0.0 0.0
0.0 -0.5 0.0
0.0 0.0 0.5
-0.5 0.0 0.0
0.0 0.5 0.0
0.0 0.0 -0.5
6 8
2 6
1 2
8 7
3 4
5 6
3 7
1 3
8 4
7 5
5 1
4 2
9 3
2 9
4 9
1 9
10 7
4 10
8 10
3 10
11 3
5 11
7 11
1 11
12 6
7 12
8 12
5 12
13 2
5 13
6 13
1 13
14 8
2 14
6 14
4 14
7 21 23
7 17 20
6 25 28
9 33 36
8 13 16
3 29 32
12 14 15
5 15 13
3 16 14
9 18 19
4 19 17
5 20 18
11 22 24
10 23 22
8 24 21
4 26 27
1 27 25
10 28 26
6 30 31
2 31 29
11 32 30
2 34 35
1 35 33
12 36 34
# -------
#------
from yade.gridpfacet import *
from yade import geom, utils, qt
from yade import plot
import sys, os
sys.path.
# -------
# -------
target_young = 50e9
target_density = 1000
target_poisson = 0.3
target_friction = radians(30)
p_radius = 5e-2
# -------
target_int_mat = 'pfacet_int_mat'
target_ext_mat = 'pfacet_ext_mat'
O.materials.append(
FrictMat(
young = target_young,
poisson = target_poisson,
density = target_density,
label = target_ext_mat,
)
)
O.materials.append(
CohFrictMat(
young = target_young,
poisson = target_poisson,
density = target_density,
label = target_int_mat,
)
)
# -------
O.engines = [
]),
)
]
# -------
# -------
(
pnode,
pcyl,
pfacet
) = gtsPFacet(
'cube.gts',
radius = p_radius,
shift = (0,0,0),
scale = 1,
wire = False,
fixed = False,
color = [0.1,0.5,0.1],
materialNodes = 'pfacet_int_mat',
material = 'pfacet_ext_mat',
)
target_ids = pnode + pcyl + pfacet
for i in pcyl:
O.bodies[
target_clump_ID = O.bodies.
O.bodies[
O.bodies[
print(target_
# -------
sp1 = sphere([ 0.7, 0.25, 0], 5e-2, material = target_ext_mat)
sp2 = sphere([-0.7, -0.25, 0], 5e-2, material = target_ext_mat)
sp1_ID = O.bodies.
sp2_ID = O.bodies.
O.bodies[
O.bodies[
# -------
ids = target_clump_ID
O.engines += [
NewtonInteg
qt.
PyRunner(
]
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.dt = 2e-7#utils.
O.saveTmp()
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Bruno Chareyre
- Solved:
- Last query:
- Last reply: