Question #269576 on Yade changed: https://answers.launchpad.net/yade/+question/269576
Jan Stránský proposed the following answer: Hello, I define all my objects with JCFpmMat and i don't find the mistake. This is not true :-) The reasons are: - you did not put any material to O.materials - you did not specify material for facetCylinder if you do not specify material to particles, lastly appended material to O.materials is used. As there is none in your simulation, default material (of FrictMat type) is created and used. a note to the script: def sphereMat(): return JCFpmMat(type=1,density=DENS,young=YOUNG,poisson = > ALPHA,frictionAngle=radians(FRICT),tensileStrength=TENS,cohesion=COH) > def wallMat(): return JCFpmMat(type=0,density=DENS, > young=YOUNG,frictionAngle=radians(0)) > this is very bad practise in my opinion, your function returns always new material instance. Use sphereMat = JCFpmMat(...) wallMat = JCFpmMat(...) for mat in (sphereMat,wallMat): O.materials.append(mat) # then wallMat will be used if material is not specified > O.bodies.append(ymport.text(PACKING+'.spheres',scale=1., > shift=Vector3(0,0,0))) > O.reset() > O.bodies.append(geom.facetCylinder(center=(xinf+X/ > 5.,yinf-0.9*r,Z/2.),radius=r,height=Z,orientation=Quaternion((1, 0, 0), > 0),segmentsNumber=20,wire=False)) # bas gauche > O.bodies.append(geom.facetCylinder(center=(0.8*X, > yinf-0.9*r,Z/2.),radius=r,height=Z,orientation=Quaternion((1, 0, 0), > 0),segmentsNumber=20,wire=False)) # bas droite > piston=O.bodies.append(geom.facetCylinder(center=(0.5*X,Y+ > r,Z/2.),radius=r,height=Z,dynamic=False,orientation=Quaternion((1, 0, 0), > 0),segmentsNumber=20,wire=False)) # haut For the sake of clarity, if you use more materials, I would specify what material you are using (but it's up to you :-) O.bodies.append(geom.facetCylinder(...,material=wallMat)) # or any other JCFpmMat instance cheers Jan 2015-07-24 11:41 GMT+02:00 Yor1 <question269...@answers.launchpad.net>: > Question #269576 on Yade changed: > https://answers.launchpad.net/yade/+question/269576 > > Yor1 posted a new comment: > Hello, > I integrate in the interaction loop the interaction between the facet (the > piston) and the sphere ( the beam). > But i obtain an error message:"Undefined or ambiguous IPhys dispatch for > types FrictMat and JCFpmMat". > I define all my objects with JCFpmMat and i don't find the mistake. > > PACKING='poutre400_notch' > OUT=PACKING+'_flexion_3_points' > > #### Simulation Control > DAMP=0.4 # numerical damping > saveData=100 # data record interval > iterMax=200000 # maximum number of iteration (to be adjusted) > saveVTK=10000 # Vtk files record interval > > > ### Creation de modele ### > X=15 > Y=3 > Z=2 > r=1 > xinf=0 > yinf=0 > zinf=0 > > xsup=15 > ysup=3 > zsup=2 > > #### Material microproperties -> Lac du Bonnet granite (cf. A DEM model > for soft and hard rock, Scholtes & Donze, JMPS 2013) > intR=1.5 > DENS=4000 > YOUNG=65e9 > FRICT=10 > ALPHA=0.4 > TENS=8e6 > COH=160e6 > #### material definition > def sphereMat(): return JCFpmMat(type=1,density=DENS,young=YOUNG,poisson = > ALPHA,frictionAngle=radians(FRICT),tensileStrength=TENS,cohesion=COH) > def wallMat(): return > JCFpmMat(type=0,density=DENS,young=YOUNG,frictionAngle=radians(0)) > > O.bodies.append(ymport.text(PACKING+'.spheres',scale=1.,shift=Vector3(0,0,0))) > > O.reset() > > O.bodies.append(geom.facetCylinder(center=(xinf+X/5.,yinf-0.9*r,Z/2.),radius=r,height=Z,orientation=Quaternion((1, > 0, 0), 0),segmentsNumber=20,wire=False)) # bas gauche > O.bodies.append(geom.facetCylinder(center=(0.8*X,yinf-0.9*r,Z/2.),radius=r,height=Z,orientation=Quaternion((1, > 0, 0), 0),segmentsNumber=20,wire=False)) # bas droite > piston=O.bodies.append(geom.facetCylinder(center=(0.5*X,Y+r,Z/2.),radius=r,height=Z,dynamic=False,orientation=Quaternion((1, > 0, 0), 0),segmentsNumber=20,wire=False)) # haut > > #### now we construct the surrounding walls with right dimensions > ### walls > #mn,mx=Vector3(xinf,yinf,zinf),Vector3(xsup,ysup,zsup) > > #walls=utils.aabbWalls(oversizeFactor=1.5,extrema=(mn,mx),thickness=min(X,Y,Z)/100.,material=wallMat) > #wallIds=O.bodies.append(walls) > ### packing > > O.bodies.append(ymport.text(PACKING+'.spheres',scale=1.,shift=Vector3(0,0,0),material=sphereMat)) > > > ### set a color to the spheres > for o in O.bodies: > if isinstance(o.shape,Sphere): > o.shape.color=(0.7,0.5,0.3) > > > #---------------- ENGINES DEFINED HERE > > ##### simulation piston's movement > > for i in range(0,len(piston)): > O.bodies[piston[i]].state.vel[1]=-1 > > ##### simulation of movement of beam's grains > O.engines=[ > ForceResetter(), > > InsertionSortCollider([Bo1_Box_Aabb(),Bo1_Sphere_Aabb(aabbEnlargeFactor=intR,label='Saabb'),Bo1_Facet_Aabb()]), > InteractionLoop( > > [Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=intR,label='SSgeom'),Ig2_Facet_Sphere_ScGeom()], > > [Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1,label='interactionPhys')], > > [Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(recordCracks=True,Key=OUT,label='interactionLaw')] > ), > > #ForceEngine(ids=wallIds, force=Vector3(0,-100,0)), > > GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=10,timestepSafetyCoefficient=0.4, > defaultDt=0.1*utils.PWaveTimeStep()), > NewtonIntegrator(damping=DAMP,label="newton"), > > PyRunner(iterPeriod=int(saveData),initRun=True,command='recorder()',label='data'), > > VTKRecorder(iterPeriod=int(saveVTK),initRun=True,fileName=OUT+'-',recorders=['spheres','jcfpm','cracks'],Key=OUT,label='vtk') > ] > > -- > You received this question notification because you are a member of > yade-users, which is an answer contact for Yade. > > _______________________________________________ > Mailing list: https://launchpad.net/~yade-users > Post to : yade-users@lists.launchpad.net > Unsubscribe : https://launchpad.net/~yade-users > More help : https://help.launchpad.net/ListHelp > -- You received this question notification because you are a member of yade-users, which is an answer contact for Yade. _______________________________________________ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp