← Back to team overview

yade-users team mailing list archive

[Question #315039]: How to reset contact properties?

 

New question #315039 on Yade:
https://answers.launchpad.net/yade/+question/315039

What I am trying to do is to use a particular contact model with N properties, in which I have a deposition simulation that has 2 of the properties = 0, save as .xml and then have a new script to load the previous .xml and then reset the 2 properties from 0 to a random number that I want. After the reset, I am doing other things to the conglomerate (such as removing particles from particular locations or whatever).

## DEPOSITION SCRIPT

from yade import pack
from yade import plot
from yade import export

## create materials for spheres
O.materials.append(JCFpmMat(young=1e6,poisson=1.,frictionAngle=radians(26.56),density=2650,tensileStrength=.1e3,cohesion=1e3,label='spheres'))

## generate packing
(random packing, script not included)

## create materials for walls
O.materials.append(JCFpmMat(young=1e6,poisson=1.,frictionAngle=radians(0),density=0,tensileStrength=0,cohesion=0,label='wall'))

(other stuff not included, non contact model related, script not included)

O.engines=[
	ForceResetter(),
	InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
	InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=intRadius,label='bo1s'),Bo1_Facet_Aabb()]),
   	InteractionLoop(
      		[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=intRadius,label='ig2ss'),Ig2_Facet_Sphere_ScGeom()],         
      		[Ip2_JCFpmMat_JCFpmMat_JCFpmPhys()],
     		[Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM()], 
   	),
	PyRunner(command='fabric()',iterPeriod=1000),
	NewtonIntegrator(damping=.7,gravity=(0.,-9.81,0.)),
	PyRunner(command='balls()',iterPeriod=1000),
	PyRunner(command='plotAddData()',iterPeriod=100),
	VTKRecorder(fileName='3d-vtk-',recorders=['all'],iterPeriod=1000),
	PyRunner(command='strains()',iterPeriod=1000)
]
O.dt=.5*utils.PWaveTimeStep()


RESET SCRIPT:

same thing, with O.load(deposition.xml)
(same stuff that is not included)
O.engines again
O.dt again

How to I reset my JCFpmMat() to have tensileStrength and cohesion any other number than zero?

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