Using paraview to do the post processing of cpm material

Asked by liukeqi

Hi,
  I am attempting to use paraview to do some post processing of a model using cpm material.

  I have some confusion as following.

[1] I want to output some results that can indicate the damage condition of the model. So which information should I be concerned, such as ‘cmpDamage’, ‘cmpStress’ or ‘forceN’? What the specific meaning of cpmDamage and cmpStress are?

[2] I used the paraview to display the data set ‘spheres‘ and chosen cpmDamage following the 'Coloring' button. But the paraview appear error information such as ‘Warning: Range [1,10] invalid for log scaling. Changing to [0,0]. The cpmDamage information did not save, why?
If I chosen cpmStress, it appears 'Warning: Range [0,9.31449e-05] invalid for log scaling. Changing to [9.31449e-06,9.31449e-05].'. Can not paraview display the negative values?

[3] Can the paraview output the orientation distribution of sphere? If it can, How to do it?

[4] Can you give me some post processing example of cpm material?

Thank you.
Liu keqi

The following is my code.
**********************************************************
#!/usr/bin/python # This is server.py file
import string
from yade import plot,qt
from yade.pack import *
from yade import pack, plot

O.materials.append(CpmMat(young=160e9,density=4800,frictionAngle=atan(0.8),poisson=0.1,sigmaT=12e8,epsCrackOnset=0.4e-4,relDuctility=500))

initSize=0.4

sp=pack.randomPeriPack(radius=0.0175,initSize=Vector3(initSize,initSize,initSize),rRelFuzz=0.7)
O.periodic=True
sp.toSimulation()

O.dt=1e-7

plot.plots={'ey':('sy',)}
def plotAddData():
 plot.addData(
  sy=p3d.stress[1],
  ey=p3d.strain[1],
  ex=p3d.strain[0]
 )

EnlargeFactor=1.5
EnlargeFactor=1.0
O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=EnlargeFactor,label='bo1s')]),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=EnlargeFactor,label='ig2ss')],
  [Ip2_CpmMat_CpmMat_CpmPhys()],[Law2_ScGeom_CpmPhys_Cpm()]),
 NewtonIntegrator(),
 Peri3dController(

       nSteps=4000,
       doneHook='print "Simulation with Peri3dController finished."; O.pause()',
       label='p3d'
       ),
 PyRunner(command='plotAddData()',iterPeriod=1),
 VTKRecorder(fileName='3d-vtk-',recorders=['all','cpm'],iterPeriod=1000),
]

p3d.stressMask=0b100001
p3d.goal=(0,-0.008,0,0,0,0)
O.step()
bo1s.aabbEnlargeFactor=ig2ss.interactionDetectionFactor=1.
O.run(); O.wait()

plot.plot(subPlots=False)

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello Liu​,

[1] I want to output some results that can indicate the damage condition of
> the model. So which information should I be concerned, such as
> ‘cmpDamage’, ‘cmpStress’ or ‘forceN’? What the specific meaning of
> cpmDamage and cmpStress are?

please be more specific what "damage condition" should be. Damage state and
its "amount"?

cpmDamage is not actual model damage, but ratio of actual tensile bond
strength to original tensile bond strength. If it is a sphere property, it
is average from all original bonds.

cpmStress is particle stress tensor [1]. The result should be (not tested
however) the same as utils.bodyStressTensors, differing by factor 0.62
(usual packing fraction with randomDensePack)

[2] I used the paraview to display the data set ‘spheres‘ and chosen
> cpmDamage following the 'Coloring' button. But the paraview appear error
> information such as ‘Warning: Range [1,10] invalid for log scaling.
> Changing to [0,0]. The cpmDamage information did not save, why?
> If I chosen cpmStress, it appears 'Warning: Range [0,9.31449e-05] invalid
> for log scaling. Changing to [9.31449e-06,9.31449e-05].'. Can not paraview
> display the negative values?

I could not reproduce this. Data are saved ok and colored in paraview, too.
It looks like a problem in your paraview session, especially "log scaling"
message.. Paraview has no problem with negative values, logarithm of course
does :-)

[3] Can the paraview output the orientation distribution of sphere? If it
> can, How to do it?

Please be more specific on "orientation distribution of sphere" (I have no
idea what should it be..).

[4] Can you give me some post processing example of cpm material?

try yade/examples/concrete/uniax.py [2] with VTKRecorder, using [3], color
spheres by cpmDamage in range [0,1] and not using log scales in paraview.

cheers
Jan

[1] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.CpmState.stress
[2] https://github.com/yade/trunk/blob/master/examples/concrete/uniax.py
[3] https://yade-dem.org/doc/user.html#rendering-spherical-particles-glyphs

Revision history for this message
liukeqi (891979456-h) said :
#2

Hello, Jan

Sorry for the late reply.

>Can the paraview output the orientation distribution of sphere? If it
>can, How to do it?

>Please be more specific on "orientation distribution of sphere" (I have no
>idea what should it be..).

Actually I read the paper[1] that used YADE platform to simulate the behavior of concrete. I want to output the Fig.10 “Initial distribution of the interaction link’s orientations in the numerical sample” in this paper. That is the "orientation distribution of sphere".

And I also want to know how to use paraview to output figure that similar to Figure 19(b), which using degree of thickness to represent the magnitude of force rather than using different color.

[1]http://ac.els-cdn.com/S0958946511000096/1-s2.0-S0958946511000096-main.pdf?_tid=bf70406a-abdc-11e6-b9bd-00000aacb35f&acdnat=1479287707_626fadda39ad91a98a53d80670341a0c

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

Hi Liu,

to plot orientation of **interactions**, have a look at
yade/examples/concrete/interaction-histogram.py [1] (first you need to run
uniax.py)

To plot force chain in paraview, have a look at [2]. Alternatively you can
use different software like python matplotlib to plot 2d force chain.

cheers
Jan

[1]
https://github.com/yade/trunk/blob/master/examples/concrete/interaction-histogram.py
[2]
https://github.com/yade/trunk/blob/master/doc/sphinx/user.rst#rendering-interactions-as-force-chain

2016-11-16 10:27 GMT+01:00 liukeqi <email address hidden>:

> Question #404012 on Yade changed:
> https://answers.launchpad.net/yade/+question/404012
>
> Status: Answered => Open
>
> liukeqi is still having a problem:
> Hello, Jan
>
> Sorry for the late reply.
>
> >Can the paraview output the orientation distribution of sphere? If it
> >can, How to do it?
>
> >Please be more specific on "orientation distribution of sphere" (I have no
> >idea what should it be..).
>
> Actually I read the paper[1] that used YADE platform to simulate the
> behavior of concrete. I want to output the Fig.10 “Initial distribution
> of the interaction link’s orientations in the numerical sample” in this
> paper. That is the "orientation distribution of sphere".
>
> And I also want to know how to use paraview to output figure that
> similar to Figure 19(b), which using degree of thickness to represent
> the magnitude of force rather than using different color.
>
> [1]http://ac.els-
> cdn.com/S0958946511000096/1-s2.0-S0958946511000096-main.pdf?_tid
> =bf70406a-abdc-11e6-b9bd-
> 00000aacb35f&acdnat=1479287707_626fadda39ad91a98a53d80670341a0c
>
> --
> You received this question notification because your team yade-users 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
liukeqi (891979456-h) said :
#4

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