[Yade-users] [Question #685005]: how to get fabric tensor and micro information?

2019-10-11 Thread ehsan benabbas
New question #685005 on Yade:
https://answers.launchpad.net/yade/+question/685005

Hi,

I'm new with Yade and using it for my Ph.D. work in Geotechnics. I have coded a 
simple triaxial test but don't know how can I get micro-scale information such 
as fabric tensor, contact normal, branch vectors, interparticle forces, 
strains, etc.

My supervisor asked me to provide all of those in 2 days and I have no idea 
what should I do :-(

Would you please tell me how I can get that information? (and also if my code 
has any issue)

This is my code:
*

# encoding: utf-8
# the script demonstrates a simple case of triaxial simulation using 
TriaxialCompressionEngine.

from yade import pack
sp=pack.Spherepack()

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

## box between mn and mx, average radius -+ 1/2(20%) , 2k spheres
sp.makeCloud(minCorner=mn,maxCorner=mx,rRelFuzz=0.2,num=2000)   # it can be 
defined based on porosity instead of num or even use a range of radius instead 
of a fixed radius

## create material #0, which will be used as defult
O.materials.append(FrictMat(young=15e6,poisson=0.4,frictionAngle=radians(30),density=2600,label='spheres'))
 # for particles
O.materials.append(FrictMat(young=15e6,poisson=0.4,frictionAngle=0,density=0,label='frictionless'))
 # for walls # density is 0 because these walls are not exist in real and 
they ae kind of virtual to force particles to be in our virtual box (we want 
walls just to be as boundaries)

## Assign section, copy spheres from the packing into the scene
## use defult material, don't care about that for now
O.bodies.append([sphere(center,rad,material='spheres') for center, rad in sp])  
#assign material to particles
## create walls around the packing
walls=aabbWalls(thickness=1e-10,material='frictionless')# assign 
material to walls  # aabb models a cube boundary for the problem and Walls 
defines that the square will be created as walls ,,, thickness is so small due 
to not existence of walls (walls are virtual)
wallIds=O.bodies.append(walls)  # assign ID to the walls

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,
## define the rest of triaxial parameters here, see in 
pkg/dem/PreProcessor/TriaxialTest.cpp:524 etc, which are assigned in the c++ 
preprocessor actually
sigmaIsoCompaction=-50e3,
sigmaLateralConfinement=-50e3,
max_vel=10,
strainRate=0.01,
label="triax",
)


O.engines=[
ForceResetter(),# reset forces on boundaries in each step
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),  # first 
arugemnt is a radisu which defines a certain lentgh to define collision between 
2 particles, this lentgh consider as a  spherical space or a circle and 
that's why we need a radius here
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],   # interaction 
between 2 particles or a particle and box
[Ip2_FrictMat_FrictMat_FrictPhys()],# FrictPhys is the Linear 
Elastic-Plastic Interaction 
[Law2_ScGeom_FrictPhys_CundallStrack()] # # CundallStrack is the Linear 
Elastic-Plastic Interaction
),

GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
triax,
# you can add TriaxialStateRecorder and such here...
NewtonIntegrato(damping=0.4)
]


from yade import plot
O.engines=O.engines[0:5]+[PyRunner(iterPeriod=20,command='history()',label='recorder')]+O.engines[5:7]
def history():

plot.addData(e11=-triax.strain[0],e22=-triax.strain[1],e33=-triax.strain[2],
s11=-triax.stress(0)[0],
s22=-triax.stress(2)[1],
s33=-triax.stress(4)[2],
i=O.iter)

plot.plots={'i':('e11','e22','e33',Non,'s11','s22','s33')}

O.saveTmp()
plot.plot()

*
Thankyou


-- 
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 #684881]: Introducing viscous forces in a liquid bridge

2019-10-11 Thread Anton Gladky
Question #684881 on Yade changed:
https://answers.launchpad.net/yade/+question/684881

Status: Open => Answered

Anton Gladky proposed the following answer:
I would recommend you to extend an existing law instead of writing a new
one, if it is possible. Thus you can escape the code duplication and
pain of adding new files from scratch.

-- 
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 #684881]: Introducing viscous forces in a liquid bridge

2019-10-11 Thread Bruno Chareyre
Question #684881 on Yade changed:
https://answers.launchpad.net/yade/+question/684881

Bruno Chareyre posted a new comment:
>Where can I get all the theoretical details of
Law2_ScGeom_ImplicitLubricationPhys and references ??

There is paper in preparation, but overall lubrication is lubrication, there 
are plenty papers about it.
See for instance https://link.springer.com/article/10.1007/s10035-015-0560-6

>I don't see viscosity as an input parameter ??

You should.

> two different interaction laws

Capillary forces do not come from an interaction law actually, hence no
issue in principle.

Bruno

-- 
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 #684881]: Introducing viscous forces in a liquid bridge

2019-10-11 Thread Rioual
Question #684881 on Yade changed:
https://answers.launchpad.net/yade/+question/684881

Status: Answered => Open

Rioual is still having a problem:
Hi Bruno,

That's a very interesting option; the previous theory of viscous contribution 
of bridges (evoked above) was derived 
indeed from Reynolds equation of lubrication. 
Where can I get all the theoretical details of  
Law2_ScGeom_ImplicitLubricationPhys and references ??
I don't see viscosity as an input parameter ??
Aren't there any technical difficulties with YADE dealing with two different 
interaction laws for the same
 couple of particles ??

All the best,

Fr.

-- 
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 #684944]: After restricting DOFs, restricted movement still occurs

2019-10-11 Thread Jan Stránský
Question #684944 on Yade changed:
https://answers.launchpad.net/yade/+question/684944

Status: Open => Needs information

Jan Stránský requested more information:
What is the output or state.ori, angVel etc. as I posted above?
Is it possible that the rotation is some artifact of perspective projection or 
something like that?
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 #684944]: After restricting DOFs, restricted movement still occurs

2019-10-11 Thread Xue
Question #684944 on Yade changed:
https://answers.launchpad.net/yade/+question/684944

Status: Needs information => Open

Xue gave more information on the question:
Hello Jan, thank you again for your patience! 
As you said, I saw the rotation of the plate in the 3D View of the 
qt.Controller(), which happened at about 0.39 of the height of the plate.

-- 
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 #684944]: After restricting DOFs, restricted movement still occurs

2019-10-11 Thread Jan Stránský
Question #684944 on Yade changed:
https://answers.launchpad.net/yade/+question/684944

Status: Open => Needs information

Jan Stránský requested more information:
Hello,
I have tried your code, but could not reproduce the problem
###
b = O.bodies[-1]
print b.state.angVel # always Vector3(0,0,0)
print b.state.angMom # always Vector3(0,0,0)
print b.state.ori # always Quaternion((1,0,0),0)
###
tells it does not rotate..

> the plate still rotates.

What does it mean / how do you know it? numerical evidence? visual evidence?
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 #684944]: After restricting DOFs, restricted movement still occurs

2019-10-11 Thread Xue
Question #684944 on Yade changed:
https://answers.launchpad.net/yade/+question/684944

Status: Answered => Open

Xue is still having a problem:
Hello, Jan. 
Thank you very much for your answer and for your willingness to try my code. 
As you said, the ldpltheight starts with more than 0.5 (gravitational settling 
of particles), and there is no limit to the DOF. But when the ldpltheight < 
0.5, the plate is generated and then the particles are compressed under 500N 
load (as shown by a==1~2). At this stage, I limit the DOF of the plate other 
than z-axis translation (corresponding to a==3). But after a period of time, 
the plate still rotates, and that's my problem.
If you want to try my code, you can increase the time step to 5E-5.
Thanks again!!!

-- 
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 #684881]: Introducing viscous forces in a liquid bridge

2019-10-11 Thread Bruno Chareyre
Question #684881 on Yade changed:
https://answers.launchpad.net/yade/+question/684881

Status: Open => Answered

Bruno Chareyre proposed the following answer:
Hi,
There is probably no need to get both capillary force and viscous force from a 
single model.
The viscous (lubrication) forces are given by 
Law2_ScGeom_ImplicitLubricationPhys.
Bruno

-- 
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 #684881]: Introducing viscous forces in a liquid bridge

2019-10-11 Thread Rioual
Question #684881 on Yade changed:
https://answers.launchpad.net/yade/+question/684881

Rioual posted a new comment:
Hello Jerome,

Yes, ViscElCapMat is more precisely a viscoelastic model of contact
(very usual) added to a capillary force so this is not what I wanted to
model: adding the viscous contribution of the liquid bridge between two
particles. So I probably would need a new constitutive law as you
suggest...

Thanks,

Fr.

-- 
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 #684944]: After restricting DOFs, restricted movement still occurs

2019-10-11 Thread Jan Stránský
Question #684944 on Yade changed:
https://answers.launchpad.net/yade/+question/684944

Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

> I limit the degree of freedom of the plate except for the z-axis
motion.

before posting a question, please try to verify these easily verifiable 
statements.
I have tried your code (with some debug prints in Compact function):
###
def Compact():
 global a
 print "a",a
 if a == 1:
  ldpltheight=max([b.state.pos[2]+b.shape.radius for b in O.bodies if 
isinstance(b.shape,Sphere)])
  print "ldpltheight",ldpltheight
  ...
###
ldpltheight stays 0.6964 for very long time. It is >0.5, so the function 
returns, leaving a=1 and the code does not reach the blockedDOFs setting..
So actually you do not limit the degree of freedom..

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 #684929]: Interaction between clumps

2019-10-11 Thread xuq
Question #684929 on Yade changed:
https://answers.launchpad.net/yade/+question/684929

Status: Answered => Solved

xuq confirmed that the question is solved:
Thanks Robert Caulk, that solved my question.

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