FuncG in ConcretePM.cpp

Asked by Hicham BENNIOU

Hi everyone,

This question is a bit particular because only Vaclav Smilauer or a person familiar with the code can answer.
I was comparing the model described in Smilauer's Thesis [1] to the code ConcretePM.cpp [2], in line 158 I read that funcG returns:

1.-(epsCrackOnset/kappaD)*exp(-(kappaD-epsCrackOnset)/epsFracture)

Or, in the Thesis, page 38 I read that funcG is:

1.-(epsFracture/kappa)*exp(-(kappa-epsCrackOnset)/epsFracture)

knowing that kappaD = max (epsilonN) and epsFracture=30*epsCrackOnset , I'm a bit confused here.

Any explanation would be welcome

Thanks !

[1] http://beta.arcig.cz/~eudoxos/smilauer2010-phd-thesis.pdf
[2] https://github.com/hbenniou/trunk/blob/master/pkg/dem/ConcretePM.cpp

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

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

Hello Hicham,
when kappa==epsCrackOnset (eps_0), the damage should be 0, so there is a
misprint in the thesis and the code is correct.
cheers
Jan

2013/12/2 Hicham BENNIOU <email address hidden>

> Question #240167 on Yade changed:
> https://answers.launchpad.net/yade/+question/240167
>
> Description changed to:
> Hi everyone,
>
> This question is a bit particular because only Vaclav Smilauer or a person
> familiar with the code can answer.
> I was comparing the model described in Smilauer's Thesis [1] to the code
> ConcretePM.cpp [2], in line 158 I read that funcG returns:
>
> 1.-(epsCrackOnset/kappaD)*exp(-(kappaD-epsCrackOnset)/epsFracture)
>
> Or, in the Thesis, page 38 I read that funcG is:
>
> 1.-(epsFracture/kappa)*exp(-(kappa-epsCrackOnset)/epsFracture)
>
> knowing that kappaD = max (epsilonN) and epsFracture=30*epsCrackOnset ,
> I'm a bit confused here.
>
> Any explanation would be welcome
>
> Thanks !
>
> [1] http://beta.arcig.cz/~eudoxos/smilauer2010-phd-thesis.pdf
> [2] https://github.com/hbenniou/trunk/blob/master/pkg/dem/ConcretePM.cpp
>
> --
> 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
Hicham BENNIOU (benniou-hicham-deactivatedaccount) said :
#2

Thanks Jan Stránský, that solved my question.

Revision history for this message
Hicham BENNIOU (benniou-hicham-deactivatedaccount) said :
#3

Hello,

Bringing this subject again cause I don't want to flood the forum with topics.

Is it possible to use Law2_ScGeom_CpmPhys_cpm() with TriaxialStressController() ? I'm trying to run a script I wrote using this constitutive law with this engine but i'm getting a lot of errors.

thanks !

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

Hi Hicham,
please attach the errors you are getting and also a minimal working script
if it is not too long.
thanks
Jan

2013/12/4 Hicham BENNIOU <email address hidden>

> Question #240167 on Yade changed:
> https://answers.launchpad.net/yade/+question/240167
>
> Status: Solved => Open
>
> Hicham BENNIOU is still having a problem:
> Hello,
>
> Bringing this subject again cause I don't want to flood the forum with
> topics.
>
> Is it possible to use Law2_ScGeom_CpmPhys_cpm() with
> TriaxialStressController() ? I'm trying to run a script I wrote using
> this constitutive law with this engine but i'm getting a lot of errors.
>
> thanks !
>
> --
> 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
Bruno Chareyre (bruno-chareyre) said :
#5

Hicham, please open a new question if it is unrelated.

B

Revision history for this message
Hicham BENNIOU (benniou-hicham-deactivatedaccount) said :
#6

Here is the script :

from yade import pack, qt, plot

# Vars definition
specimenLength = 15.0
spheresInCell = 2000
sphereRadius= 3.5e-3
intRadius = 1.5 #Interaction Radius

sigmaT=3.5e6,
epsCrackOnset=1e-4,
relDuctility=30,
isoPrestress=-50000000, #isotropic confinment

strainRateTension=0.5,
strainRateCompression=.5,

youngConcrete = 24e9
youngWalls = 0.5

poissonConcrete = 0.2
poissonWalls = 0.5

frictionAngleConcrete = atan(0.8)
frictionAngleWalls = 0

densityConcrete = 4800
densityWalls = 0

damping=0.4

#Create walls around the packing of spheres
min = Vector3(-.5*specimenLength,-.5*specimenLength,-.5*specimenLength)
max = Vector3(.5*specimenLength,.5*specimenLength,.5*specimenLength)

Walls =aabbWalls([min,max], thickness = 0)
wallIds = O.bodies.append(Walls)

#Definig Concrete material and packing spheres
concreteId=O.materials.append(CpmMat(young=youngConcrete,frictionAngle=frictionAngleConcrete,poisson=poissonConcrete,density=densityConcrete,sigmaT=sigmaT,relDuctility=relDuctility,epsCrackOnset=epsCrackOnset,isoPrestress=isoPrestress))
sp=pack.randomDensePack(pack.inAlignedBox(min,max),spheresInCell=spheresInCell,radius=sphereRadius,returnSpherePack=True)
sp.toSimulation(material=concreteId)

# Defining Engines
TriaxEngine = TriaxialStressController(
      maxMultiplier=1.+2e4/youngConcrete,
      finalMaxMultiplier=1.+2e3/youngConcrete,
      thickness = 0,
      stressMask = 7, # 7=111, 1->x, 1->y and 1->z, which means stress is controlled on xyz
      internalCompaction=True,
)

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()],verletDist=.05*sphereRadius),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=intRadius),Ig2_Box_Sphere_ScGeom()],
  [Ip2_CpmMat_CpmMat_CpmPhys()],
  [Law2_ScGeom_CpmPhys_Cpm()],
 ),

 TriaxEngine,
 GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
 PyRunner(iterPeriod=10,initRun=True,command='history()'),
 TriaxialStateRecorder(iterPeriod=100,file='~/Bureau/WallStresses'),

 NewtonIntegrator(damping=damping,gravity=(0.,0.,-10.)),
]

# record and plot data

def history():
  plot.addData(e11=TriaxEngine.strain[0], e22=TriaxEngine.strain[1], e33=TriaxEngine.strain[2],
  ev=-TriaxEngine.strain[0]-TriaxEngine.strain[1]-TriaxEngine.strain[2],
  s11=TriaxEngine.stress(TriaxEngine.wall_right_id)[0],
  s22=TriaxEngine.stress(TriaxEngine.wall_top_id)[1],
  s33=TriaxEngine.stress(TriaxEngine.wall_front_id)[2],
  i=O.iter
 )

O.run(10000)

plot.plots={'e22':('s11','s22','s33','ev')}
plot.plot()

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

Hi Hicham,

the first problem is in material parameters definition. If you use comma at
the end of line, the variable is tuple instead of float. If you want to
pass it to CpmMat constructor, it expects number but gets tuple and raise
the error.

you can try in IPython
a = 1.4,
a.__class__.__name__ # returns 'tuple'
a = 1.4 # without comma
a.__class__.__name__ # returns 'float'

so use
sigmaT = 3.5e6
instead of
sigmaT = 3.5e6,

and the same also for all other material parameters

cheers
Jan

2013/12/4 Hicham BENNIOU <email address hidden>

> Question #240167 on Yade changed:
> https://answers.launchpad.net/yade/+question/240167
>
> Status: Answered => Open
>
> Hicham BENNIOU is still having a problem:
> Here is the script :
>
> from yade import pack, qt, plot
>
> # Vars definition
> specimenLength = 15.0
> spheresInCell = 2000
> sphereRadius= 3.5e-3
> intRadius = 1.5 #Interaction Radius
>
> sigmaT=3.5e6,
> epsCrackOnset=1e-4,
> relDuctility=30,
> isoPrestress=-50000000, #isotropic confinment
>
> strainRateTension=0.5,
> strainRateCompression=.5,
>
> youngConcrete = 24e9
> youngWalls = 0.5
>
> poissonConcrete = 0.2
> poissonWalls = 0.5
>
> frictionAngleConcrete = atan(0.8)
> frictionAngleWalls = 0
>
> densityConcrete = 4800
> densityWalls = 0
>
> damping=0.4
>
> #Create walls around the packing of spheres
> min = Vector3(-.5*specimenLength,-.5*specimenLength,-.5*specimenLength)
> max = Vector3(.5*specimenLength,.5*specimenLength,.5*specimenLength)
>
> Walls =aabbWalls([min,max], thickness = 0)
> wallIds = O.bodies.append(Walls)
>
> #Definig Concrete material and packing spheres
>
> concreteId=O.materials.append(CpmMat(young=youngConcrete,frictionAngle=frictionAngleConcrete,poisson=poissonConcrete,density=densityConcrete,sigmaT=sigmaT,relDuctility=relDuctility,epsCrackOnset=epsCrackOnset,isoPrestress=isoPrestress))
>
> sp=pack.randomDensePack(pack.inAlignedBox(min,max),spheresInCell=spheresInCell,radius=sphereRadius,returnSpherePack=True)
> sp.toSimulation(material=concreteId)
>
> # Defining Engines
> TriaxEngine = TriaxialStressController(
> maxMultiplier=1.+2e4/youngConcrete,
> finalMaxMultiplier=1.+2e3/youngConcrete,
> thickness = 0,
> stressMask = 7, # 7=111, 1->x, 1->y and 1->z, which means stress is
> controlled on xyz
> internalCompaction=True,
> )
>
> O.engines=[
> ForceResetter(),
>
> InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()],verletDist=.05*sphereRadius),
> InteractionLoop(
>
> [Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=intRadius),Ig2_Box_Sphere_ScGeom()],
> [Ip2_CpmMat_CpmMat_CpmPhys()],
> [Law2_ScGeom_CpmPhys_Cpm()],
> ),
>
> TriaxEngine,
>
> GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
> PyRunner(iterPeriod=10,initRun=True,command='history()'),
> TriaxialStateRecorder(iterPeriod=100,file='~/Bureau/WallStresses'),
>
> NewtonIntegrator(damping=damping,gravity=(0.,0.,-10.)),
> ]
>
> # record and plot data
>
> def history():
> plot.addData(e11=TriaxEngine.strain[0], e22=TriaxEngine.strain[1],
> e33=TriaxEngine.strain[2],
>
> ev=-TriaxEngine.strain[0]-TriaxEngine.strain[1]-TriaxEngine.strain[2],
> s11=TriaxEngine.stress(TriaxEngine.wall_right_id)[0],
> s22=TriaxEngine.stress(TriaxEngine.wall_top_id)[1],
> s33=TriaxEngine.stress(TriaxEngine.wall_front_id)[2],
> i=O.iter
> )
>
> O.run(10000)
>
> plot.plots={'e22':('s11','s22','s33','ev')}
> plot.plot()
>
> --
> 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
Hicham BENNIOU (benniou-hicham-deactivatedaccount) said :
#8

Thanks Jan,

It still generates this error :

sp=pack.randomDensePack(pack.inAlignedBox((-.5*specimenLength,-.5*specimenLength,-.5*specimenLength),(.5*specimenLength,.5*specimenLength,.5*specimenLength)),spheresInCell=spheresInCell,radius=sphereRadius,returnSpherePack=True)
  File "~/Yade/build/lib/x86_64-linux-gnu/yade-2013-11-20.git-11c208a/py/yade/pack.py", line 474, in randomDensePack
    if wantPeri: sp.cellFill(Vector3(fullDim[0],fullDim[1],fullDim[2]))
MemoryError

This is weird especially because I use the same line that generates this error in another script and it works fine :
sp=pack.randomDensePack(pack.inAlignedBox(min,max),spheresInCell=spheresInCell,radius=sphereRadius,returnSpherePack=True)

Any Ideas ?

Hicham

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

Hi Hicham,
check if not only the line, but also specimenLength and sphereRadius values
are the same (or similar). According to MemoryError I would say that
the specimenLength/sphereRadius ratio is much higher in the error prone
simulation than that you used before, resulting in too many particles
exceeding memory capacity.
cheers
Jan

2013/12/4 Hicham BENNIOU <email address hidden>

> Question #240167 on Yade changed:
> https://answers.launchpad.net/yade/+question/240167
>
> Status: Answered => Open
>
> Hicham BENNIOU is still having a problem:
> Thanks Jan,
>
> It still generates this error :
>
>
> sp=pack.randomDensePack(pack.inAlignedBox((-.5*specimenLength,-.5*specimenLength,-.5*specimenLength),(.5*specimenLength,.5*specimenLength,.5*specimenLength)),spheresInCell=spheresInCell,radius=sphereRadius,returnSpherePack=True)
> File
> "~/Yade/build/lib/x86_64-linux-gnu/yade-2013-11-20.git-11c208a/py/yade/pack.py",
> line 474, in randomDensePack
> if wantPeri: sp.cellFill(Vector3(fullDim[0],fullDim[1],fullDim[2]))
> MemoryError
>
> This is weird especially because I use the same line that generates this
> error in another script and it works fine :
>
> sp=pack.randomDensePack(pack.inAlignedBox(min,max),spheresInCell=spheresInCell,radius=sphereRadius,returnSpherePack=True)
>
> Any Ideas ?
>
> Hicham
>
> --
> 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
Václav Šmilauer (eudoxos) said :
#10

Hey, seeing this thread late, I want to apologize for the typo in the thesis. Good job spotting that! Cheers, v.

Can you help with this problem?

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

To post a message you must log in.