File: helix.py

package info (click to toggle)
yade 2025.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,308 kB
  • sloc: cpp: 93,298; python: 50,409; sh: 577; makefile: 162
file content (22 lines) | stat: -rw-r--r-- 726 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# -*- encoding=utf-8 -*-
# script for testing InterpolatingHelixEngine: sphere going in a sphere-like motion around bar
O.bodies.append([box([0, 0, 0], [.005, .005, 1], fixed=True), sphere([0, .1, -1], .04, fixed=False)])
O.engines = [
        ForceResetter(),
        InterpolatingHelixEngine(
                ids=[1],
                times=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100],
                angularVelocities=[1, 2, 3, 4, 5, 3, 1, -1, -3, 0],
                rotationAxis=[0, 0, 1],
                zeroPoint=[0, 0, 0],
                wrap=True,
                slope=.003,
                label='spiral'
        ),
        NewtonIntegrator()
]
O.dt = 4e-6
O.saveTmp('initial')
from yade import qt

qt.Controller()