← Back to team overview

yade-users team mailing list archive

Re: [Question #701845]: Has ZeroInitForce been implemented?

 

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

    Status: Open => Answered

Jérôme Duriez proposed the following answer:
Why not checking directly ? In a actual MWE fashion for more fun:

O.materials.append(CohFrictMat(normalCohesion = 10,isCohesive=True,fragile=False)) # note a different behavior with normalCohesion = 0 (?)
O.bodies.append([sphere((0,0,z),1,fixed=True) for z in [0,1.8]])
O.engines = [
    ForceResetter(),
    InsertionSortCollider([Bo1_Sphere_Aabb()]),
    InteractionLoop([Ig2_Sphere_Sphere_ScGeom6D()], [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=False)],[Law2_ScGeom6D_CohFrictPhys_CohesionMoment(useIncrementalForm=True,always_use_moment_law=True)]),
    NewtonIntegrator(damping=.2)
    ]

O.step()
cont = O.interactions[0,1]
print('\nBefore tricking unp, normal contact force is',cont.phys.normalForce)
cont.phys.unp = cont.geom.penetrationDepth
O.step()
print('After, normal contact force is',cont.phys.normalForce,'\n')

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