← Back to team overview

yade-users team mailing list archive

[Question #706183]: RuntimeError: TriaxialStressController with JCFpmMat

 

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

Hi,
I am trying to simulate Triaxial testing using JCFpmMat. The code is a slightly modified version of https://gitlab.com/yade-dev/trunk/-/issues/46. I am getting the same Runtime error as mentioned in the post. 

I referred to the questions https://answers.launchpad.net/yade/+question/676746 and https://answers.launchpad.net/yade/+question/676382 and did not find the solution.

I understand that is a known bug. I just want to confirm whether the bug is fixed or if it is still open. 

Thank you,

##############################################
MWE
###############################################
from __future__ import print_function
from yade import pack

young_mat1=24e9
poisson_mat1=0.1
density_mat1=2600
tens_mat1 = 10e6
friction_mat1 = 30.0
cohes_mat1 = 10e6
specimenLength= 0.104
sphereRadius=5.0e-3
rRelFuzz_ = 0.0
spheresInCell_ = 2000

intRadius=1.5
dtSafety=.7
damping=0.4

conf_stress =1e6 


## corners of the initial packing
mn, mx = Vector3(0, 0, 0), Vector3(specimenLength, specimenLength, specimenLength)
pred_ = pack.inAlignedBox(mn,mx)
sp=pack.randomDensePack(pred_,radius=sphereRadius, rRelFuzz = rRelFuzz_,returnSpherePack=False, seed=110)

#Define material properties
mat1 = O.materials.append(JCFpmMat(type=1,density=density_mat1,young=young_mat1,poisson=poisson_mat1,frictionAngle=radians(friction_mat1),tensileStrength=tens_mat1,cohesion=cohes_mat1,label='mat1'))
wall_mat = O.materials.append(FrictMat(young=young_mat1,poisson=0.5,frictionAngle=0,density=0,label='wall_mat'))

## create walls around the packing and add to the simulation
walls = aabbWalls([mn,mx],thickness=0,material=wall_mat)
wallIds = O.bodies.append(walls)

#Add spheres to the simulation
O.bodies.append(sp)
for b_ in O.bodies: 
        b_.mat = O.materials["mat1"]

#Define triaxial engine
triax=TriaxialStressController(
        thickness = 0,
        stressMask = 7,
        internalCompaction=False,
)


O.engines = [
        ForceResetter(),
        InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=intRadius,label='is2aabb'), 
                                Bo1_Box_Aabb()],verletDist=0.05*sphereRadius),
        InteractionLoop(
                [Ig2_Sphere_Sphere_ScGeom6D(interactionDetectionFactor=intRadius,label='ss2sc'),
                Ig2_Box_Sphere_ScGeom()],
                [Ip2_FrictMat_FrictMat_FrictPhys(),
                Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1,label='interactionPhys')],
                [Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(recordCracks=True,Key='JCFpmMat_Triax',label='interactionLaw'),
                Law2_ScGeom_FrictPhys_CundallStrack()],),
        GlobalStiffnessTimeStepper(active=True, timeStepUpdateInterval=100, timestepSafetyCoefficient=dtSafety),
        triax,
        NewtonIntegrator(damping=0.4)
        ]
triax.goal1=triax.goal2=triax.goal3= conf_stress
O.step()

##################################################
ERROR MESSAGE
##################################################
Welcome to Yade 2022.01a 
Using python version: 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0]
TCP python prompt on localhost:9000, auth cookie `yksdce'
XMLRPC info provider on http://localhost:21000
Running script JCFPM_traixial_Yade_launchpad.py
Traceback (most recent call last):
  File "/usr/bin/yade", line 343, in runScript
    execfile(script,globals())
  File "/usr/lib/python3/dist-packages/past/builtins/misc.py", line 87, in execfile
    exec_(code, myglobals, mylocals)
  File "JCFPM_traixial_Yade_launchpad.py", line 68, in <module>
    O.step()
RuntimeError: Body #0: Body::material type JCFpmMat doesn't correspond to Body::state type State (should be JCFpmState instead).
######################################################

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