Re: [Yade-users] [Question #697610]: How to get the acceleration of body

2021-06-21 Thread Leonard
Question #697610 on Yade changed:
https://answers.launchpad.net/yade/+question/697610

Status: Answered => Solved

Leonard confirmed that the question is solved:
Thanks Jérôme Duriez, 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


[Yade-users] [Question #697642]: Many errors with PeriodicFlowEngine

2021-06-21 Thread Zhicheng Gao
New question #697642 on Yade:
https://answers.launchpad.net/yade/+question/697642

After deleting some particles, I encountered a lot of problems in the 
PeriodicFlowEngine. Such as:
(1) GS did not converge in 20k iterations (maybe because the reference pressure 
is 0?);
(2) segmentation fault (core dumped);
(3) Periodicity is broken;
(4) CHOLMOD warning: matrix not positive definite. file: 
../Supernodal/t_cholmod_super_numeric.c line: 911
something went wrong in Cholesky factorization, use LDLt as fallback this time1

For errors (3) and (4),  I have solved it by changing the value of 
PeriodicFlowEngine.duplicateThreshold and the PeriodicFlowEngine.useSolver.

For errors (1) and (2), I spent a lot of time and tried a lot, but I still 
can't solve them. Please help me!

 I have searched for the answers about the PeriodicFlowEngine. I concluded that 
since there is no boundary condition for periodic boundary conditions, the 
PeriodicFlowEngine does not need to set boundary conditions,that is, it does 
not need to set the bndCondIsPressure, bndCondValue, boundaryUseMaxMin. As I 
want to achieve a similar simulation like the paper " A discrete numerical 
model involving partial fluid-solid coupling to describe suffusion effects in 
soils "[1], In short, it is to achieve the fluid flow from top to bottom under 
a certain pressure gradient, and no fluid flows out from the side, and some 
particles are removed during the calculation. So I just need to apply a 
macroscopic pressure gradient by flow.gradP=Vector3(0, i,0), where i is the 
macroscopic pressure gradient. Is that right?
The errors (1) and (2) still exist, this is my simplified code:
##__ First section, generate sample_

from __future__ import print_function
from yade import pack, qt, plot
from math import *

nRead=readParamsFromTable(
## model parameters
num_spheres=100,
targetPorosity= .4,
confiningPressure=-10,
## material parameters
compFricDegree=15,#contact friction during the confining phase
finalFricDegree=30,#contact friction during the deviatoric loading
young=2e8,
poisson=.2,
density=2600,
alphaKr=7.5,
alphaKtw=0,
competaRoll=.22,
finaletaRoll=.22,
etaTwist=0,
normalCohesion=0,
shearCohesion=0,
## fluid parameters
fluidDensity=1000,
dynamicViscosity=.001,
## control parameters
damp=0,
stabilityThreshold=.001,
## output specifications
filename='suffusion',
unknowOk=True
)

from yade.params.table import *

O.periodic=True
O.cell.hSize=Matrix3(1,0,0, 0,1,0, 0,0,1)
# create materials for spheres
#shear strength is the sum of friction and adhesion, so the 
momentRotationLaw=True
O.materials.append(CohFrictMat(alphaKr=alphaKr,alphaKtw=alphaKtw,density=density,etaRoll=competaRoll,etaTwist=etaTwist,frictionAngle=radians(compFricDegree),momentRotationLaw=True,normalCohesion=normalCohesion,poisson=poisson,shearCohesion=shearCohesion,young=young,label='spheres'))

# generate particles packing
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(1,1,1),-1,0.,num_spheres,False, 0.95,seed=1)
sp.toSimulation(material='spheres')

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom6D()],

[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(label='contact',setCohesionNow=False,setCohesionOnNewContacts=False)],

[Law2_ScGeom6D_CohFrictPhys_CohesionMoment(useIncrementalForm=True,always_use_moment_law=True)],
),
PeriodicFlowEngine(dead=1,label="flow"),#introduced as a dead engine 
for the moment, see 2nd section

GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
PeriTriaxController(label='triax',
# specify target values and whether they are strains or stresses
goal=(confiningPressure,confiningPressure,confiningPressure), 
stressMask=7,
# type of servo-control, the strain rate isn't determined, it 
shloud check the unbalanced force
dynCell=True,maxStrainRate=(10,10,10),
# wait until the unbalanced force goes below this value
maxUnbalanced=stabilityThreshold,relStressTol=1e-3,
doneHook='compactionFinished()'
),
NewtonIntegrator(damping=0)
]


import sys
def compactionFinished():
# after sample preparation, save the state
O.save('compactedState'+filename+'.yade.gz')
print('Compacted state saved', 'porosity', porosity())
# next time, called python command
triax.doneHook=''
O.pause()
O.run()
O.wait()


#B. Activate flow engine 
flow.dead=0
flow.defTolerance=-1
flow.meshUpdateInterval=-1
flow.useSolver=0
flow.permeabilityFactor=1
flow.viscosity=10
flow.gradP=Vector3(0,1,0)
flow.duplicateThreshold=0.3 
flow.updateTriangulation=True
O

Re: [Yade-users] [Question #697524]: When I run my code, MatplotlibDeprecationWarning appears

2021-06-21 Thread Zhicheng Gao
Question #697524 on Yade changed:
https://answers.launchpad.net/yade/+question/697524

Status: Answered => Solved

Zhicheng Gao confirmed that the question is solved:
Thank you, Jérôme Duriez ,  the  version used is yade-2021-06-08.git-
4852d56

-- 
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 #697638]: Using thermal engine for a dry granular flow

2021-06-21 Thread Robert Caulk
Question #697638 on Yade changed:
https://answers.launchpad.net/yade/+question/697638

Status: Open => Answered

Robert Caulk proposed the following answer:
Hello,

Yes, here is an example script only using conduction between grains [1].

Cheers,

Robert

[1]https://gitlab.com/yade-
dev/trunk/-/blob/master/examples/ThermalEngine/conductionVerification.py

-- 
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 #697524]: When I run my code, MatplotlibDeprecationWarning appears

2021-06-21 Thread Jérôme Duriez
Question #697524 on Yade changed:
https://answers.launchpad.net/yade/+question/697524

Status: Open => Answered

Jérôme Duriez proposed the following answer:
Hi,

This warning is because we did not yet update (in YADE source code) our
use of a external library, for plotting "YADE" figures. You can safely
ignore it.

(Please specify your YADE version next time, and try to minimalize your
script: the following 4 lines are enough to illustrate the behavior

from yade import plot
 plot.addData(x=0,y=0)
plot.plots={'x':'y'}
plot.plot()
)

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


[Yade-users] [Question #697638]: Using thermal engine for a dry granular flow

2021-06-21 Thread Rioual
New question #697638 on Yade:
https://answers.launchpad.net/yade/+question/697638

Hello,

Is there any possibiility to use thermal engine for a dry granular flow only ?
( modelling only conduction at contacts between moving grains).
>> putting fluid viscosity = 0 ??

Regards,

V. 

-- 
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 #697597]: PeriIsoCompressor.sigma different from getStress()

2021-06-21 Thread Jérôme Duriez
Question #697597 on Yade changed:
https://answers.launchpad.net/yade/+question/697597

Status: Open => Answered

Jérôme Duriez proposed the following answer:
Hi,

What is sure is that you eventually comparing two stress expressions
that are quite different:

- PIC uses some totalForceInVolume [*] expression I'm totally unfamiliar with 
(=> which I can not justify at the moment / ever ?)
- getStress is the classical Love-Weber formula.

Please open an issue about that engine, especially if you think there is
another issue about unbalanced force test (from another discussion)

[*] https://gitlab.com/yade-
dev/trunk/-/blob/4852d56018376a2d1c2f6e3812bf031cc44d645b/pkg/dem/PeriIsoCompressor.cpp#L53
and below

-- 
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 #697597]: PeriIsoCompressor.sigma different from getStress()

2021-06-21 Thread Jan Stránský
Question #697597 on Yade changed:
https://answers.launchpad.net/yade/+question/697597

Jan Stránský posted a new comment:
Hello,

confirming the issue.

If I continue, the PIC mean stress remains constant, while getStress mean 
stress is growing, have a try.
Maybe it is equal for unbalanced force = 0? (just brainstorming)

Also I am not sure is PeriIsoCompressor is maintained or not, have a
look at PeriTriaxController.

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 #697600]: Contact (dilation) angle between particles

2021-06-21 Thread Jan Stránský
Question #697600 on Yade changed:
https://answers.launchpad.net/yade/+question/697600

Status: Open => Needs information

Jan Stránský requested more information:
Hello,

> I hope this is clear for you.

No, sorry, the question is very (and actually more and more) confusing..

How is "contact angle using here means dilation angle (ψ)" from #2
related to "the contact angle described here" from #3?

The #3 definition is really an angle (or vector in 3D) of the
interaction. You have many interactions, access to the data, you can
easily do whatever with the data, e.g. output a distribution.

The #2 definition is some macroscopic dimensionless quantity which is
called angle "by chance" because the value can be interpreted as an
angle in a graph. (similarly to the friction angle).

AFAIK ψ is a ratio of volumetric strain and shear strain.
How would you / do you want to define it for one contact / region (to make a 
distribution)?

>  if there are two particles of the same size ...

any difference from the case of different size?

> ... horizontal ... would be 90 degrees. ... right on top of the other
one ... would be 0 degrees.

How is this clear purely geometric meaning related to dilation angle (ψ)
(volumetric strain / shear strain)?

Please make clear what you want.

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 #697600]: Contact (dilation) angle between particles

2021-06-21 Thread Chien-Cheng Hung
Question #697600 on Yade changed:
https://answers.launchpad.net/yade/+question/697600

Chien-Cheng Hung gave more information on the question:
Just for further clarification.

In 2D, if there are two particles of the same size in contact with each other 
in the horizontal direction, then the contact angle between these two particles 
would be 90 degrees.
Similarly, if the one is right on top of the other one, then the contact angle 
would be 0 degrees.
The contact angle described here is what I want to output as a distribution.
I can imagine it would be a bit tricky for a 3D simulation since there are some 
vector issues...

Chien-Cheng

-- 
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 #697600]: Contact (dilation) angle between particles

2021-06-21 Thread Chien-Cheng Hung
Question #697600 on Yade changed:
https://answers.launchpad.net/yade/+question/697600

Status: Needs information => Open

Chien-Cheng Hung gave more information on the question:
Hi,

The contact angle using here means dilation angle (ψ). The value of ψ=0 
corresponds to the volume that preserves deformation while in shear.
Since the angle of dilation (ψ) controls the amount of plastic volumetric 
strain and macroscopic friction developed during plastic shearing, I would like 
to know how the dilation angle (or contact angle) distribute in the granular 
layer for different PSDs and to see its relation to the volumetric strain and 
macroscopic friction.
I hope this is clear for you.

Cheers,
Chien-Cheng

-- 
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 #697612]: Velocity distribution in paraview

2021-06-21 Thread Leonard
Question #697612 on Yade changed:
https://answers.launchpad.net/yade/+question/697612

Leonard confirmed that the question is solved:
Thanks Karol Brzezinski, 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


Re: [Yade-users] [Question #697612]: Velocity distribution in paraview

2021-06-21 Thread Leonard
Question #697612 on Yade changed:
https://answers.launchpad.net/yade/+question/697612

Status: Answered => Solved

Leonard confirmed that the question is solved:
Hi Karol

Yes! Now I set the paraviw as follow and it works!

Glyph Type = Arrow
Scalars = linVelLen
Vectors = linVelVec

Thanks very much.

Best regards,
Leonard

-- 
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 #697600]: Contact (dilation) angle between particles

2021-06-21 Thread Jérôme Duriez
Question #697600 on Yade changed:
https://answers.launchpad.net/yade/+question/697600

Status: Open => Needs information

Jérôme Duriez requested more information:
As far as I'm concerned, I would need to know what is a contact angle
between particles ?

-- 
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 #697610]: How to get the acceleration of body

2021-06-21 Thread Jérôme Duriez
Question #697610 on Yade changed:
https://answers.launchpad.net/yade/+question/697610

Status: Open => Answered

Jérôme Duriez proposed the following answer:
Hi,

There is no such built-in function, as far as I know. Remember when applying 
your trick that actual acceleration will be
(1+/- NewtonIntegrator.damping) F/m

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