Concrete CpmMat CpmPhys

Asked by Arthur Mercier on 2011-04-25

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:
2011-04-27
Last query:
2011-04-27
Last reply:
2011-04-26

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.

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"

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'))

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.

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
>

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
>

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