← 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: Open => Answered

anna effeindzourou proposed the following answer:
Hi,
Looking at your script, seems like you did not change the material for the
first gridConnections you have.

HTH,
Anna

2016-03-10 8:07 GMT+11:00 Cong Xu
<question287915@xxxxxxxxxxxxxxxxxxxxx>:

> Question #287915 on Yade changed:
> https://answers.launchpad.net/yade/+question/287915
>
>     Status: Answered => Open
>
> Cong Xu is still having a problem:
> Thank you, Klaus and Anna.
>
> Like you said, I change the GridConnection material to PfacetMat, and
> set the setCohesionOnNewContacts flag to False. But the error
> 'Segmentation fault' still occurs.
>
> This is the script,
>
> # -*- 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='gridNodeMat') )
> O.bodies.append( gridConnection(2,3,r,color=color,material='gridNodeMat') )
> O.bodies.append( gridConnection(2,1,r,color=color,material='gridNodeMat') )
> O.bodies.append( gridConnection(2,0,r,color=color,material='gridNodeMat') )
> O.bodies.append( gridConnection(3,1,r,color=color,material='gridNodeMat') )
> 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()
>
> Best regards,
>
> Cong
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

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