← Back to team overview

yade-users team mailing list archive

Re: [Question #287915]: Cylinder-Pfacet contact

 

Question #287915 on Yade changed:
https://answers.launchpad.net/yade/+question/287915

    Status: Answered => Open

Cong Xu is still having a problem:
Hi Anna,

Did you mean to change the gridconnection material in the wall? I tried that, it still didn't work...
BTW, my Yade version is 1.20.0-72-bbff50f~trusty.

Thank you.

Cong

Here is the new one:

# -*- coding: utf-8
from yade import qt,plot
from yade.gridpfacet import *

##################
### PARAMETERS ###
##################
phi=20.
E=3.*1e8
color=[255./255.,102./255.,0./255.]
r=0.005
r2=0.01


################
### ENGINES  ###
################
O.engines=[
	ForceResetter(),
	InsertionSortCollider([
		Bo1_GridConnection_Aabb(),
		Bo1_PFacet_Aabb(),
	]),
	InteractionLoop([
		Ig2_GridNode_GridNode_GridNodeGeom6D(),
		Ig2_GridConnection_GridConnection_GridCoGridCoGeom(),
		Ig2_GridConnection_PFacet_ScGeom(),
    ],
    [
        Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=False),
		Ip2_FrictMat_FrictMat_FrictPhys()
	],
	[
        Law2_ScGeom6D_CohFrictPhys_CohesionMoment(),
		Law2_ScGeom_FrictPhys_CundallStrack(),
		Law2_GridCoGridCoGeom_FrictPhys_CundallStrack()
	]
	),
	NewtonIntegrator(gravity=(0,-9.81,0),damping=0.0,label='newton'),
]


################
### MATERIAL ###
################
O.materials.append( CohFrictMat( young=E,poisson=0.3,density=2650,frictionAngle=radians(phi),normalCohesion=3e100,shearCohesion=3e100,momentRotationLaw=True,label='gridNodeMat' ) )  # material to create the gridConnections
O.materials.append( FrictMat( young=E,poisson=0.3,density=2650,frictionAngle=radians(phi),label='pFacetMat' ) )  # material for general interactions


########################################
### GENERATE THE WALL AND THE cylinder ###
########################################

# FIXED WALL
O.bodies.append( gridNode([-0.25,-0.22,-.25],r,wire=False,fixed=True,material='gridNodeMat',color=color) )
O.bodies.append( gridNode([.5,0.,-.25],r,wire=False,fixed=True,material='gridNodeMat',color=color) )
O.bodies.append( gridNode([-.25,-0.22,.25],r,wire=False,fixed=True,material='gridNodeMat',color=color) )
O.bodies.append( gridNode([.5,0.,.25],r,wire=False,fixed=True,material='gridNodeMat',color=color) )
O.bodies.append( gridConnection(0,1,r,color=color,material='pFacetMat') )
O.bodies.append( gridConnection(2,3,r,color=color,material='pFacetMat') )
O.bodies.append( gridConnection(2,1,r,color=color,material='pFacetMat') )
O.bodies.append( gridConnection(2,0,r,color=color,material='pFacetMat') )
O.bodies.append( gridConnection(3,1,r,color=color,material='pFacetMat') )
O.bodies.append( pfacet(2,1,0,wire=False,material='pFacetMat',color=color) )
O.bodies.append( pfacet(2,3,1,wire=False,material='pFacetMat',color=color) )

# cylinder

O.bodies.append( gridNode([0,0,-0.25],r2,wire=False,fixed=False,material='gridNodeMat',color=color) )
O.bodies.append( gridNode([0,0,0.25],r2,wire=False,fixed=False,material='gridNodeMat',color=color) )
O.bodies.append( gridConnection(11,12,r2,color=color,material='pFacetMat') )

O.dt=1e-6
O.saveTmp()

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.