Welcome to ask.woodem.org. You may post when you login through your GitHub account.

Change contact model

0 votes
56 views
asked Feb 27 by Student74 (220 points)

Hi, 

I am simulating a cylinder filled with spherocylinders, by periodically generating batches of spherocylinders using the PsdCapsuleGenerator with CylinderInlet. Woo.dem.DemField.minimalEngines is used, for which a standard damping factor has to be given. So if I understand it correctly, the linear contact model is used with numerical damping in this case. Now how could I change this contact model in the code so that a more physically plausible model is used for calculating the forces during the simulation? For example, how would I use the Hertzian model? And what would be the best choice for a contact model for this kind of simulation?

For completeness, the code that I'm using is the following:

import woo.core, woo.dem, woo.utils, math, woo.paraviewscript
from minieigen import *
woo.master.usesApi=10103
S=woo.master.scene=woo.core.Scene(
    fields=[woo.dem.DemField(
        gravity=(0,0,-9.81),
        # add bottom and cylinder walls
        par=[woo.dem.Wall.make(0,axis=2,glAB=((-1,-1),(1,1)))]+woo.triangulated.cylinder(Vector3(0,0,0),Vector3(0,0,0.061),radius=0.0105)
    )],
    engines=woo.dem.DemField.minimalEngines(damping=.4)+[woo.dem.CylinderInlet(
        stepPeriod=3000,
        radius=0.0105,
        height=0.061,
        node=woo.core.Node((0,0,0),((0,1,0),-math.pi/2)),
        massRate=0,
        materials=[woo.utils.defaultMaterial()],
        generator=woo.dem.PsdCapsuleGenerator(psdPts=[(0.00529552,0),(0.00529552,1)],shaftRadiusRatio=(6,6))
    ),
#    woo.core.PyRunner('ubf=woo.utils.unbalancedForce(S)\nprint(ubf)\nif ubf<.05 and S.step>1000: done(S)',400),
    woo.core.PyRunner('ubf=woo.utils.unbalancedForce(S)\nprint(ubf)\nif S.step>150000: done(S)',400),
])
S.saveTmp()

 

Thanks a lot in advance!

1 Answer

0 votes
answered Mar 2 by eudoxos (46,530 points)
Hi, I can only reply from phone briefly. The user-friendly way is to set minimalEngines(model=woo.models.ContactModelSelector(...)) which encapsulates the complexity like setting all functors consistently etc. See examples/concrete-uniax.py and other examples. Or the FallingHorse preprocessor, which uses it as sell. The models are described in theory section if the documentation https://woodem.org/theory/contact/index.html . HTH, Vaclav
...