Problem with Cohesive Frictional Contact law

Asked by Przemek

Hi,
I've problem with Cohesive Frictional Contact law. I'm trying to run a simulation but I receive:

<FATAL ERROR> InteractionLoop:178 virtual void yade::InteractionLoop::action(): None of given Law2 functors can handle interaction #23+24, types geom:ScGeom=1 and phys:CohFrictPhys=6 (LawDispatcher::getFunctor2D returned empty functor)

Does the problem with my script or with something else?

#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import division
from __future__ import print_function

import math

from future import standard_library

standard_library.install_aliases()
from yade import plot, pack, timing, qt, export
import time, sys, os, copy
import numpy as np
import gts

# default parameters or from table
readParamsFromTable(
        noTableOk=True, # unknownOk=True,
        young=70e9,
        poisson=0.3,
        density=2700,
        frictionAngle=radians(30),
        normalCohesion=300e6,
        shearCohesion=300e6/sqrt(3),
        intRadius=1.5,
        damping=.4,

        sphereRadius=1e-3,
        length=100e-3,
        width=50e-3,
        thickness=4e-3
)

from yade.params.table import *

if 'description' in list(O.tags.keys()): O.tags['id'] = O.tags['id'] + O.tags['description']

aluminiumId = O.materials.append(
        CohFrictMat(
            young=young,
            poisson=poisson,
            density=density,
            frictionAngle=frictionAngle,
            normalCohesion=normalCohesion,
            shearCohesion=shearCohesion,
            momentRotationLaw=True
        )
)

r = sphereRadius
partI=pack.inAlignedBox((0, 0, -thickness/2-r/2), (width+r, length, thickness/2+r/2))
partII=pack.inAlignedBox((width, 0, -thickness/2-r/2), (length+r, width, thickness/2+r/2))
sample = partI|partII
O.bodies.append(pack.regularHexa(sample,radius=r,gap=0.))

load = []

for b in O.bodies:
    for b in O.bodies:
        if b.state.pos[1] > (length-3*r): # support
            b.state.blockedDOFs = 'xyzXYZ'
            b.shape.color = (0, 1, 1)
        elif b.state.pos[0] > (length-2*r): # load
            load.append(b.id)
            b.state.blockedDOFs = 'z'
            b.shape.color = (0, 1, 1)
        else:
            b.shape.color = (0, 0, 1)
            b.state.blockedDOFs = 'z'

O.dt = PWaveTimeStep()*1e-1

O.engines = [
    ForceResetter(),
    InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=intRadius)]),
    InteractionLoop(
        [Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=intRadius)],
        [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True, setCohesionOnNewContacts=True)],
        [Law2_ScGeom6D_CohFrictPhys_CohesionMoment()],
    ),
    NewtonIntegrator(damping=damping),
    PyRunner(iterPeriod=1, command='updateParameters()'),
    PyRunner(command='addPlotData()', iterPeriod=1),
    #PyRunner(iterPeriod=100, command='recordVTK()')
]

O.step()
print(len(O.interactions))

def updateParameters():
    for i in range(len(load)):
        O.bodies[load[i]].state.vel = Vector3(-100e0, 0, 0)

def addPlotData():
    for b in O.bodies:
        b.shape.color = scalarOnColorScale(b.state.stress[0, 0], -300e6, 300e6)

def recordVTK():
    txtfilename = 'L_shape/L_test' + str(O.iter) + '.txt'
    vtkfilename = 'L_shape/L_test' + str(O.iter) + '.vtk'
    export.textExt(txtfilename, format='x_y_z_r_attrs', attrs=['b.state.oldTemp',
                                                               'b.state.stress[0,0]','b.state.stress[0,1]','b.state.stress[0,2]',
                                                               'b.state.stress[1,1]','b.state.stress[1,2]','b.state.stress[2,2]','O.time'],
                   comment='temperature, S_11, S_12, S_13, S_22, S_23, S_33, Time')
    export.text2vtk(txtfilename, vtkfilename)

qt.View()
#plot.plots={'eps':('sigma')}
#plot.plot()
#O.run()

Kind regards,
Przemek

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,

> Does the problem with my script or with something else?

yes, it is the script

As the error says, in your simulation you have interaction with ScGeom and CohFrictPhys, but not Law2 for this case.
(you only have ScGeom6D and CohFrictPhys)

Cheers
Jan

Revision history for this message
Przemek (przemekn) said :
#2

So, I can't use this model here, yes? I don't see appropriate law in the CFC code...

Revision history for this message
Przemek (przemekn) said (last edit ):
#3

I wondered if I can use this model to simulate fracture... Maybe you can suggest a better model?

Can you help with this problem?

Provide an answer of your own, or ask Przemek for more information if necessary.

To post a message you must log in.