The NewtonIntegrator does not apply angular motion for aspherical bodies
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Yade |
New
|
Undecided
|
Unassigned |
Bug Description
I've tried several ways to impose an initial angular velocity on a free polyhedron but they do not work well as commented in the script and below. Please help me with this. Thanks!
Here are things I've observed: [In the code below, I simulate 2 polyhedrons, poly1 is free and has an initial velocity while poly2 is fixed.]
If I directly use state.angVel or utils.setBodyAn
A work around is to use angMom.
## using: "b.state.angMom"
Mom=b1.
# Modify accordingly, to modify a specific angular velocity. e.g., to get an initial angVel=
Mom[0]=Mom[0]*5.
Mom[1]=Mom[1]*6.
Mom[2]=Mom[2]*7.
O.bodies[
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# ENGINES
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
NewtonIntegrat
]
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# POLYHEDRAL PARTICLES
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
from yade import polyhedra_utils
m = PolyhedraMat()
m.density = 2000 #kg/m^3
m.young = 150e6 #Pa
m.poisson = .4
m.frictionAngle = 3.0 #rad
edge=0.025
vertices=[(-edge, -edge, -edge),
(-edge, edge, -edge),
( edge, -edge, -edge),
( edge, edge, -edge),
(-edge, -edge, edge),
(-edge, edge, edge),
( edge, -edge, edge),
( edge, edge, edge)]
# Free
b1 = polyhedra_
b1.state.pos = (0,0,0)
O.bodies.append(b1)
# Fixed
b2 = polyhedra_
b2.state.pos = (4.*edge,0,0)
O.bodies.append(b2)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# INITIAL VELOCITY
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Initial translational velocity
O.bodies[
# Initial angular velocity
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
##Directly assigning the angular velocity- Not imposing initial angular velocity- No rotation for the free one but the fixed one will rotate
#O.bodies[
#O.bodies[
## using: "utils.
utils.setBodyAn
utils.setBodyAn
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
from yade import qt
v=qt.View()
O.dt=1.0e-8
O.saveTmp()
Please use https:/ /gitlab. com/yade- dev/trunk/ issues for bug reporting.
I move this from https:/ /bugs.launchpad .net/yade/ +bug/1832235 to https:/ /gitlab. com/yade- dev/trunk/ issues/ 84