yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #05878
Re: [Question #194918]: change blockedDOFs of utils.box
Question #194918 on Yade changed:
https://answers.launchpad.net/yade/+question/194918
Christian Jakob posted a new comment:
#!/usr/bin/python
# -*- coding: utf-8 -*-
shear_modulus = 1e7
poisson_ratio = 0.15
young_modulus = 2*shear_modulus*(1+poisson_ratio)
friction_coeff = 2
angle = math.atan(friction_coeff)
rho_p = 2650 #density of particles
id_WallMat=O.materials.append(FrictMat(young=young_modulus,poisson=poisson_ratio,frictionAngle=angle))
id_SphereMat=O.materials.append(FrictMat(young=young_modulus,poisson=poisson_ratio,density=rho_p,frictionAngle=angle))
WallMat=O.materials[id_WallMat]
SphereMat=O.materials[id_SphereMat]
## create bodies:
O.bodies.append(utils.sphere([0,0,0], material=SphereMat, radius=.4))
id_box = O.bodies.append(utils.box((0,0,0),(1,1,0),material=WallMat))
# DEFINE MATERIALS AND ENGINES
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_MindlinCapillaryPhys(label='ContactModel')],
[Law2_ScGeom_MindlinPhys_Mindlin(neverErase=True,label='Mindlin')]
),
GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=1,timestepSafetyCoefficient=0.8, defaultDt=0.3*utils.PWaveTimeStep()),
NewtonIntegrator(damping=0.7,label='integrator')
]
# END DEFINE MATERIALS AND ENGINES :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
O.run(1,True)
O.bodies[id_box].blockDOFs='zXYZ'
O.run(1,True)
--
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.