yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #29212
Re: [Question #706183]: RuntimeError: TriaxialStressController with JCFpmMat
Question #706183 on Yade changed:
https://answers.launchpad.net/yade/+question/706183
Status: Open => Answered
Jan Stránský proposed the following answer:
Hello,
the error message basically says that the body state instances are somehow wrong.
The problem is that if you change material from FrictMat (default material assigned in the script) to JCFpmMat, the previously "auto-created" State remains, but particles with JCFpmMat assumes state to be of JCFpmState type.
Solution:
1) you know the material in advance, assign it directly at particle creation.
No need of
b_.mat = O.materials["mat1"]
because particles have already correct material.
Just change the order of your commands:
###
mat1 = ...
sp=pack.randomDensePack(..., material=mat1)
O.bodies.append(sp)
###
2) more general approach, manually changing both material and state instance:
###
for b_ in O.bodies:
b_.mat = O.materials["mat1"]
b_.state = JCFpmState()
###
Cheers
Jan
--
You received this question notification because your team yade-users is
an answer contact for Yade.