Concrete CpmMat CpmPhys

Asked by Arthur Mercier

Hi,

I use Yade Bzr2811 and I'd like to model a concrete beam. I tried to put in the CpmMat and CpmPhys. There is no problem when I compil, I mean no error occurs. But when I try to run it, Yade closes automatically. Here is my script, it works with Frictmat and FrictPhys in comment:

"import numpy, plot, pack, geom
rad,num=.1,15; dist=1.9999*rad

# create rectangular box from facets
O.bodies.append(geom.facetBox((.5,-.5,.25),(.5,.5,.5),wallMask=63))
O.bodies.append(geom.facetBox((5,-.5,.25),(.5,.5,.5),wallMask=63))
# one arm
O.bodies.append([utils.sphere((x,.1,0),rad,wire=True) for x in numpy.arange(0,55*rad,dist)])

O.dt=.03*utils.PWaveTimeStep()

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
 InteractionLoop(
  #[Ig2_Sphere_Sphere_L6Geom(distFactor=-1),Ig2_Facet_Sphere_L3Geom()],
  #[Ip2_FrictMat_FrictMat_FrictPhys()],
  #[Law2_L6Geom_FrictPhys_Linear(charLen=1),Law2_L3Geom_FrictPhys_ElPerfPl()]),
  [Ig2_Sphere_Sphere_Dem3DofGeom(),Ig2_Facet_Sphere_Dem3DofGeom()],
  [Ip2_CpmMat_CpmMat_CpmPhys()],
  [Law2_Dem3DofGeom_CpmPhys_Cpm()]),
 GravityEngine(gravity=(0,-20,0)),
 ForceEngine(force=(0,-5000,0),ids=[38]),
 NewtonIntegrator(damping=0.1),
]

O.saveTmp()"

Where is my mistake?

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Arthur Mercier
Solved:
Last query:
Last reply:
Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#1

You also get this message I guess?

"Undefined or ambiguous IPhys dispatch for types FrictMat and FrictMat."

Ip2_CpmMat_CpmMat_CpmPhys needs CpmMat, but your simulation has bodies
with FrictPhys properties.
You need to define bodies with the correct physics type.

Revision history for this message
Arthur Mercier (mercier-arthur) said :
#2

Non I didn't have this message "Undefined or ambiguous IPhys dispatch for types FrictMat and FrictMat."

Ok so I define "material=CpmMat" for each body. Just before it closes, it's written:
"5731 FATAL yade.Law2_Dem3DofGeom_CpmPhys_Cpm /home/arthur/yade/yade/pkg/dem/ConcretePM.cpp:206 go: Verification '!isnan(epsCrackOnset)' failed!
6678 FATAL yade.Law2_Dem3DofGeom_CpmPhys_Cpm /home/arthur/yade/yade/pkg/dem/ConcretePM.cpp:206 go: in interaction #7+#24
terminate called without an active exception"

So I tried to define the CpmMat by "myself", so here is my new script:

"import numpy, plot, pack, geom
# radius, number and distance of spheres
rad,num=.1,15; dist=1.9999*rad

idConcrete=O.materials.append(CpmMat(G_over_E='nan',density=4800,poisson=0.25,young=10e9,dmgRateExp=0,dmgTau=-1,epsCrackOnset='nan',isoPrestress=0,neverDamage=False,plRateExp=0,plTau=-1,relDuctility='nan',sigmaT='nan'))

len(O.materials)

# create rectangular box from facets
O.bodies.append(geom.facetBox((.5,-.5,.25),(.5,.5,.5),wallMask=63,material="idConcrete"))
O.bodies.append(geom.facetBox((5,-.5,.25),(.5,.5,.5),wallMask=63,material="idConcrete"))
# one arm
O.bodies.append([utils.sphere((x,.1,0),rad,wire=True,material="idConcrete") for x in numpy.arange(0,55*rad,dist)])

O.dt=.03*utils.PWaveTimeStep()

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
 InteractionLoop(
  #[Ig2_Sphere_Sphere_L6Geom(distFactor=-1),Ig2_Facet_Sphere_L3Geom()],
  #[Ip2_FrictMat_FrictMat_FrictPhys()],
  #[Law2_L6Geom_FrictPhys_Linear(charLen=1),Law2_L3Geom_FrictPhys_ElPerfPl()]),
  [Ig2_Sphere_Sphere_Dem3DofGeom(),Ig2_Facet_Sphere_Dem3DofGeom()],
  #[Ig2_Sphere_Sphere_Dem3DofGeom(),Ig2_Facet_Sphere_Dem3DofGeom()],
  [Ip2_CpmMat_CpmMat_CpmPhys()],
  [Law2_Dem3DofGeom_CpmPhys_Cpm()]),
 GravityEngine(gravity=(0,-20,0)),
 ForceEngine(force=(0,0,0),ids=[38]),
 NewtonIntegrator(damping=0.1),
]

O.saveTmp()"

I think I made a mistake but I don't know where, it's like if the material isn't define, so I have a lot of problems after that, but the first error message is:
"idConcrete=O.materials.append(CpmMat(G_over_E='nan',density=4800,poisson=0.25,young=10e9,dmgRateExp=0,dmgTau=-1,epsCrackOnset='nan',isoPrestress=0,neverDamage=False,plRateExp=0,plTau=-1,relDuctility='nan',sigmaT='nan'))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)

/home/arthur/yade/build/lib/yade-new/py/yade/__init__.pyc in <module>()
----> 1
      2
      3
      4
      5

TypeError: No registered converter was able to produce a C++ rvalue of type double from this Python object of type str"

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#3

Try giving values to the mechanical parameters:

idConcrete=O.materials.append(CpmMat(G_over_E='nan',density=4800,poisson=0.25,young=10e9,dmgRateExp=0,dmgTau=-1,epsCrackOnset='nan',isoPrestress=0,neverDamage=False,plRateExp=0,plTau=-1,relDuctility='nan',sigmaT='nan'))

Revision history for this message
Arthur Mercier (mercier-arthur) said :
#4

When I define material for Spheres and Facets

"O.bodies.append(geom.facetBox((.5,-.5,.25),(.5,.5,.5),wallMask=63,material=CpmMat))
O.bodies.append(geom.facetBox((5,-.5,.25),(.5,.5,.5),wallMask=63,material=CpmMat))
O.bodies.append([utils.sphere((x,.1,0),rad,wire=True,material=CpmMat) for x in numpy.arange(0,55*rad,dist)])",

It works and the values (G_over_E='nan',density=4800,poisson=0.25,young=10e9,dmgRateExp=0,dmgTau=-1,epsCrackOnset='nan',isoPrestress=0,neverDamage=False,plRateExp=0,plTau=-1,relDuctility='nan',sigmaT='nan') are given automatically, but it closes automatically. That's why I tried to create by hand, the same material to check where the problem is.

Revision history for this message
Jan Stránský (honzik) said :
#5

Hi Arthur,

assign some value to 'nans', e.g.

idConcrete=O.materials.append(CpmMat(G_over_E=0.2,density=4800,poisson=0.25,young=10e9,dmgRateExp=0,dmgTau=-1,epsCrackOnset=1e-4,isoPrestress=0,neverDamage=False,plRateExp=0,plTau=-1,relDuctility=30,sigmaT=3e6))

if you define only CpmMat, all bodies should be made of this last defined material, so you don't need to declare
material="idConcrete"
for each particle

good luck
Jan

______________________________________________________________
> Od: "Arthur Mercier" <email address hidden>
> Komu: <email address hidden>
> Datum: 26.04.2011 18:11
> Předmět: Re: [Yade-users] [Question #154219]: Concrete CpmMat CpmPhys
>
>Question #154219 on Yade changed:
>https://answers.launchpad.net/yade/+question/154219
>
> Status: Answered => Open
>
>Arthur Mercier is still having a problem:
>Non I didn't have this message "Undefined or ambiguous IPhys dispatch
>for types FrictMat and FrictMat."
>
>Ok so I define "material=CpmMat" for each body. Just before it closes, it's written:
>"5731 FATAL yade.Law2_Dem3DofGeom_CpmPhys_Cpm /home/arthur/yade/yade/pkg/dem/ConcretePM.cpp:206 go: Verification '!isnan(epsCrackOnset)' failed!
>6678 FATAL yade.Law2_Dem3DofGeom_CpmPhys_Cpm /home/arthur/yade/yade/pkg/dem/ConcretePM.cpp:206 go: in interaction #7+#24
>terminate called without an active exception"
>
>So I tried to define the CpmMat by "myself", so here is my new script:
>
>"import numpy, plot, pack, geom
># radius, number and distance of spheres
>rad,num=.1,15; dist=1.9999*rad
>
>idConcrete=O.materials.append(CpmMat(G_over_E='nan',density=4800,poisson=0.25,young=10e9,dmgRateExp=0,dmgTau=-1,epsCrackOnset='nan',isoPrestress=0,neverDamage=False,plRateExp=0,plTau=-1,relDuctility='nan',sigmaT='nan'))
>
>len(O.materials)
>
># create rectangular box from facets
>O.bodies.append(geom.facetBox((.5,-.5,.25),(.5,.5,.5),wallMask=63,material="idConcrete"))
>O.bodies.append(geom.facetBox((5,-.5,.25),(.5,.5,.5),wallMask=63,material="idConcrete"))
># one arm
>O.bodies.append([utils.sphere((x,.1,0),rad,wire=True,material="idConcrete") for x in numpy.arange(0,55*rad,dist)])
>
>O.dt=.03*utils.PWaveTimeStep()
>
>
>O.engines=[
> ForceResetter(),
> InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
> InteractionLoop(
> #[Ig2_Sphere_Sphere_L6Geom(distFactor=-1),Ig2_Facet_Sphere_L3Geom()],
> #[Ip2_FrictMat_FrictMat_FrictPhys()],
> #[Law2_L6Geom_FrictPhys_Linear(charLen=1),Law2_L3Geom_FrictPhys_ElPerfPl()]),
> [Ig2_Sphere_Sphere_Dem3DofGeom(),Ig2_Facet_Sphere_Dem3DofGeom()],
> #[Ig2_Sphere_Sphere_Dem3DofGeom(),Ig2_Facet_Sphere_Dem3DofGeom()],
> [Ip2_CpmMat_CpmMat_CpmPhys()],
> [Law2_Dem3DofGeom_CpmPhys_Cpm()]),
> GravityEngine(gravity=(0,-20,0)),
> ForceEngine(force=(0,0,0),ids=[38]),
> NewtonIntegrator(damping=0.1),
>]
>
>O.saveTmp()"
>
>I think I made a mistake but I don't know where, it's like if the material isn't define, so I have a lot of problems after that, but the first error message is:
>"idConcrete=O.materials.append(CpmMat(G_over_E='nan',density=4800,poisson=0.25,young=10e9,dmgRateExp=0,dmgTau=-1,epsCrackOnset='nan',isoPrestress=0,neverDamage=False,plRateExp=0,plTau=-1,relDuctility='nan',sigmaT='nan'))
>---------------------------------------------------------------------------
>TypeError Traceback (most recent call last)
>
>/home/arthur/yade/build/lib/yade-new/py/yade/__init__.pyc in <module>()
>----> 1
> 2
> 3
> 4
> 5
>
>TypeError: No registered converter was able to produce a C++ rvalue of
>type double from this Python object of type str"
>
>--
>You received this question notification because you are a member of
>yade-users, which is an answer contact for Yade.
>
>_______________________________________________
>Mailing list: https://launchpad.net/~yade-users
>Post to : <email address hidden>
>Unsubscribe : https://launchpad.net/~yade-users
>More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Jan Stránský (honzik) said :
#6

Hi Arthur

The NaN values are default ("given automatically") and the user is supposed to set real values to them (nan values are checked and if they are really nans, '!isnan(epsCrackOnset)' check fails resulting into
5731 FATAL yade.Law2_Dem3DofGeom_CpmPhys_Cpm /home/arthur/yade/yade/pkg/dem/ConcretePM.cpp:206 go: Verification '!isnan(epsCrackOnset)' failed!

Jan

______________________________________________________________
> Od: "Arthur Mercier" <email address hidden>
> Komu: <email address hidden>
> Datum: 26.04.2011 19:04
> Předmět: Re: [Yade-users] [Question #154219]: Concrete CpmMat CpmPhys
>
>Question #154219 on Yade changed:
>https://answers.launchpad.net/yade/+question/154219
>
> Status: Answered => Open
>
>Arthur Mercier is still having a problem:
>When I define material for Spheres and Facets
>
>"O.bodies.append(geom.facetBox((.5,-.5,.25),(.5,.5,.5),wallMask=63,material=CpmMat))
>O.bodies.append(geom.facetBox((5,-.5,.25),(.5,.5,.5),wallMask=63,material=CpmMat))
>O.bodies.append([utils.sphere((x,.1,0),rad,wire=True,material=CpmMat) for x in numpy.arange(0,55*rad,dist)])",
>
>It works and the values
>(G_over_E='nan',density=4800,poisson=0.25,young=10e9,dmgRateExp=0,dmgTau=-1,epsCrackOnset='nan',isoPrestress=0,neverDamage=False,plRateExp=0,plTau=-1,relDuctility='nan',sigmaT='nan')
>are given automatically, but it closes automatically. That's why I tried
>to create by hand, the same material to check where the problem is.
>
>--
>You received this question notification because you are a member of
>yade-users, which is an answer contact for Yade.
>
>_______________________________________________
>Mailing list: https://launchpad.net/~yade-users
>Post to : <email address hidden>
>Unsubscribe : https://launchpad.net/~yade-users
>More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Arthur Mercier (mercier-arthur) said :
#7

Ok it's done. I didn't expect it was to the user to set real values to "nan".
Thank you for quick and good answers

Revision history for this message
Yade Guide (yade-guide) said :
#8

Hello there! As an automated assistant, I've scanned through a few relevant threads and compiled their essence for your perusal here. Feel free to explore more by clicking on the provided links.

Title: "YADE appears error in the Ubuntu 16.04"
The user encountered an assertion error when running a script and model code due to a difference in Eigen library versions between Ubuntu 16.04 and 14.04 after upgrading YADE from 1.07.0 to 1.20.0. Jan Stránský's suggestion resolved the issue. The problem has been fixed in the GitHub version, and users can either compile Yade from source or wait for the new Yade package to be added to Ubuntu.
https://answers.launchpad.net/yade/+question/403514

Title: "Uniaxial compression simulation disappeared suddenly in Yade"
The user faced issues with YADE simulation including errors related to velocity attribute in TranslationEngine, incorrect usage of ids attribute, and unnecessary interaction loops. They were advised to follow the method described in the YADE documentation for imposing controlled motions and to read the user manual part of the doc to resolve these issues.
https://answers.launchpad.net/yade/+question/403669

Title: "confused about ForceEngine"
The user faced issues with simulating gravity on a sphere in Yade after 300,000 iterations. They resolved the issue by replacing 'subscribedBodies' with 'ids'. However, they encountered an error when trying to apply a function 'myFunction()' within O.engines to apply a force along the z-axis starting at iteration 30,000.
https://answers.launchpad.net/yade/+question/152878