Re: [Yade-users] [Question #692328]: How to export the overlap data

2020-08-13 Thread GUANGYAO LI
Question #692328 on Yade changed:
https://answers.launchpad.net/yade/+question/692328

Status: Answered => Solved

GUANGYAO LI confirmed that the question is solved:
Thanks Jan! I run the O.run() command as you suggested, and the problem
was solved !

Cheers
Guangyao

-- 
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 : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #692328]: How to export the overlap data

2020-08-13 Thread GUANGYAO LI
Question #692328 on Yade changed:
https://answers.launchpad.net/yade/+question/692328

GUANGYAO LI posted a new comment:
Thanks Jérôme!

I will deeply learn the link you provided.

Regards,
Guangyao

-- 
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 : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #692328]: How to export the overlap data

2020-08-13 Thread Jan Stránský
Question #692328 on Yade changed:
https://answers.launchpad.net/yade/+question/692328

Status: Open => Answered

Jan Stránský proposed the following answer:
> I have tried

please be more specific (show the changes)

e.g. uncomment the O.run command:
###
O.run(10,True)
overlaps = [i.geom.penetrationDepth for i in O.interactions]
with open ("overlaps.dat","w") as f:f.writelines(str(o)+"\n" for o in overlaps)
###

cheers
Jan

-- 
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 : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #692328]: How to export the overlap data

2020-08-13 Thread GUANGYAO LI
Question #692328 on Yade changed:
https://answers.launchpad.net/yade/+question/692328

Status: Answered => Open

GUANGYAO LI is still having a problem:
Thanks for the answer Jan!  I still don't know where I should call the
export? I have tried to put the script in other positions, but still got
empty file.

Guangyao

-- 
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 : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #692106]: Output of force chain in Periodic simulation looks very strange

2020-08-13 Thread Launchpad Janitor
Question #692106 on Yade changed:
https://answers.launchpad.net/yade/+question/692106

Status: Open => Expired

Launchpad Janitor expired the question:
This question was expired because it remained in the 'Open' state
without activity for the last 15 days.

-- 
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 : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #692328]: How to export the overlap data

2020-08-13 Thread Jan Stránský
Question #692328 on Yade changed:
https://answers.launchpad.net/yade/+question/692328

Status: Open => Answered

Jan Stránský proposed the following answer:
Tanks for the code.
You are calling the export before any step / run, so the interaction list is 
empty, hence you get empty file
cheers
Jan

-- 
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 : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #692328]: How to export the overlap data

2020-08-13 Thread GUANGYAO LI
Question #692328 on Yade changed:
https://answers.launchpad.net/yade/+question/692328

Status: Answered => Open

GUANGYAO LI is still having a problem:
Great!

Please see the code below. Finally a blank overlaps.dat file was generated.  
Thanks!

Regards,
Guangyao



from yade import pack
from numpy import arange
import itertools
import random
import yade.plot

## corners of the initial packing
mn,mx=Vector3(0,0,0),Vector3(0.03,0.03,0.03)

## create material #0, which will be used as default
id_Mat=O.materials.append(FrictMat(young=7e7,poisson=.4,frictionAngle=radians(5.8),density=2650,label='spheres'))
O.materials.append(FrictMat(young=7e10,poisson=.4,frictionAngle=0,density=26500,label='frictionless'))
Mat=O.materials[id_Mat]
#create assembly of spheres:
sp=pack.SpherePack()
sp.makeCloud(mn,mx,num=14000,rMean=.0005,rRelFuzz=0.0,periodic=False)#,
#sp.makeCloud(mn,mx,num=14000,psdSizes=psdSizes,psdCumm=psdCumm,distributeMass=True)#,distributeMass=True
O.bodies.append([sphere(center,rad,material='spheres') for center,rad in sp])
print(len(sp),' particles generated.')
#sp.toSimulation()


## create walls around the packing
walls=aabbWalls(material='frictionless')
wallIds=O.bodies.append(walls)

from yade import qt
qt.Controller()
qt.View()


## hope that we got the ids right?!
triax=TriaxialCompressionEngine(
wall_bottom_id=wallIds[2],
wall_top_id=wallIds[3],
wall_left_id=wallIds[0],
wall_right_id=wallIds[1],
wall_back_id=wallIds[4],
wall_front_id=wallIds[5],
internalCompaction=False,
autoCompressionActivation=False,
#autoStopSimulation=True,
autoUnload=False,
updatePorosity=True,
sigmaIsoCompaction=-10e3,
sigmaLateralConfinement=-10e3,
strainRate=0.02,
frictionAngleDegree=5.8,
StabilityCriterion = 0.001,
max_vel=1,
)

recorder=TriaxialStateRecorder(
iterPeriod=20,
file="./WallStresses-clumps",
truncate=1
)
#recorder=VTKRecorder(iterPeriod=20,
#file="./positions",
#)


O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
GlobalStiffnessTimeStepper(timestepSafetyCoefficient=0.2),
triax,
recorder,
# you can add TriaxialStateRecorder and such here…
NewtonIntegrator(damping=.001),
VTKRecorder(fileName='parclm-',iterPeriod=1,recorders=['spheres'])
]
O.stopAtIter=200020
#O.run(10,True)
overlaps = [i.geom.penetrationDepth for i in O.interactions]
with open ("overlaps.dat","w") as f:f.writelines(str(o)+"\n" for o in overlaps)

-- 
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 : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #692328]: How to export the overlap data

2020-08-13 Thread Jan Stránský
Question #692328 on Yade changed:
https://answers.launchpad.net/yade/+question/692328

Jan Stránský proposed the following answer:
> but it seems that the above script does not work

please provide the code and what exactly "does not work" mean (errors?
no output? output different than expected?...?)

> I really need to learn the general method of exporting data.

there is no "general" method.
The essential part is to GET the data.
Exporting is easy, but very much depends on what data it is.
You can use pure python (like in my code) or some "predefined" methods, e.g. 
using plot.addData and plot.saveDataTxt [1], VTK export [2,3], "plain text" 
export [4,5] . 

cheers
Jan

[1] https://yade-dem.org/doc/user.html#tracking-variables
[2] https://yade-dem.org/doc/yade.export.html#yade.export.VTKExporter
[3] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.VTKRecorder
[4] https://yade-dem.org/doc/yade.export.html#yade.export.text
[5] https://yade-dem.org/doc/yade.export.html#yade.export.textExt

-- 
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 : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #692328]: How to export the overlap data

2020-08-13 Thread GUANGYAO LI
Question #692328 on Yade changed:
https://answers.launchpad.net/yade/+question/692328

GUANGYAO LI gave more information on the question:
Actually, I have run another case using the TriaxialCompressionEngine,
but it seems that the above script does not work.  So I think I really
need to learn the general method of exporting data.

Guangyao

-- 
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 : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #692328]: How to export the overlap data

2020-08-13 Thread Jérôme Duriez
Question #692328 on Yade changed:
https://answers.launchpad.net/yade/+question/692328

Status: Open => Answered

Jérôme Duriez proposed the following answer:
The doc should help, https://yade-dem.org/doc/tutorial-data-mining.html
in particular

-- 
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 : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #692351]: Plate for three point bending load application

2020-08-13 Thread Jan Stránský
Question #692351 on Yade changed:
https://answers.launchpad.net/yade/+question/692351

Jan Stránský proposed the following answer:
> Is there a way to create a rectangular notch in the middle with nearly
smoother boundary?

not really I am afraid.. You can modify the surface e.g. by changing
size of the boundary particles to form a smoother surface, but then the
notch is different from the rest of the specimen..

It will always be a tradeoff between physical accuracy, resources etc.
E.g. you can use half-sized particles to make the surface "twice smoother" (in 
the limit of infinitesimally small particles, the surface is smooth), but the 
computation time increase...

cheers
Jan

-- 
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 : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #692328]: How to export the overlap data

2020-08-13 Thread GUANGYAO LI
Question #692328 on Yade changed:
https://answers.launchpad.net/yade/+question/692328

Status: Answered => Open

GUANGYAO LI is still having a problem:
Hi Jan,

Thanks! This script works well in this case. However, I am new to YADE,
and I still do not know the general method to export the  data I need. I
mean maybe next time I would like to export other variables. So could
you please give me some more suggestions on that?

Regards,
Guangyao

-- 
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 : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #692326]: random algorithm of makecloud

2020-08-13 Thread GUANGYAO LI
Question #692326 on Yade changed:
https://answers.launchpad.net/yade/+question/692326

Status: Answered => Solved

GUANGYAO LI confirmed that the question is solved:
Hi Jan,

Many thanks for your prompt reply!  That helps me a lot!

Best regards,
Guangyao

-- 
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 : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #692351]: Plate for three point bending load application

2020-08-13 Thread chanaka Udaya
Question #692351 on Yade changed:
https://answers.launchpad.net/yade/+question/692351

chanaka Udaya posted a new comment:
Dear Dr. Jan,

yes  I can use a box.many thanks!

>>Using randomDensePack, the surface is unrealistically rough anyway..

That's the problem. initially I wanted to prepare sample with radius
expansion method. and I have used 6 walls to create the beam with radius
expansion method. But, to have a rectangular notch with 3mm width in the
middle was difficult. notch was irregular shape.

the procedure as follows,
After creation of the beam using radius expansion method. I have exported 
particle positions and radius  in to a separate file. Next, imported into the 
new file with particle location and radius and appended in to the new 
simulation using yade.ymport function.Afterwards created a bounding box with 
3mm with and 50mm height and 50m length.  the particles which have their 
centrod inside the bounding box , deleted to obtain the notch.

Is there a way to create a  rectangular notch in the middle with nearly
smoother boundary?

Thanks
Chanaka

-- 
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 : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #692351]: Plate for three point bending load application

2020-08-13 Thread Jan Stránský
Question #692351 on Yade changed:
https://answers.launchpad.net/yade/+question/692351

Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,
you can use two facets to form a rectangle.
Or a box instead of facets.
Is this what you are looking for?

> Now I need to use a single plate instead of this facet cylinder

what is the reason for this need? I don't expect much difference.. Using
randomDensePack, the surface is unrealistically rough anyway..

cheers
Jan

-- 
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 : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp