[Yade-users] [Question #695246]: clumping gridNodes and Ppfacets into a clump

2021-01-28 Thread Hanying Zhang
New question #695246 on Yade:
https://answers.launchpad.net/yade/+question/695246

Hi,

I got problems when clumping nodes and pfacets into a clump. There are several 
ways to creat Pfacets and I tried two of them, both did't work. Here is one way 
I tried. And the error says:

  Traceback (most recent call last):
  File "/usr/bin/yade", line 182, in runScript
execfile(script,globals())
  File "1-29-clump.py", line 32, in 
abc= 
O.bodies.append(pfacet(nodes[0],nodes[1],nodes[2],wire=True,material='pFacetMat',color=color))
  File "/usr/lib/x86_64-linux-gnu/yade/py/yade/gridpfacet.py", line 211, in 
pfacet
GridC1=O.bodies[O.interactions[id1,id2].geom.connectionBody.id]
AttributeError: 'ScGeom' object has no attribute 'connectionBody'

Please help me with it. Thanks!


from yade.gridpfacet import *
from yade import pack, plot
from numpy import *
import math
from yade import utils, qt
import random
from yade import polyhedra_utils, qt


color=[0.,1.,1.]

O.materials.append( CohFrictMat( 
young=3e6,poisson=0.15,density=910e0,frictionAngle=20,normalCohesion=3e100,shearCohesion=3e100,momentRotationLaw=True,label='gridNodeMat'
 ) )#for gridNodes
O.materials.append(FrictMat(young=4e6,poisson=0.3,density=1000,frictionAngle=20,label='pFacetMat'))
 #for pfacet

RNode=0.2
nodes=[]
#up 0123
aa= nodes.append(O.bodies.append( gridNode([-110e-3, 
110e-3,-200e-3],RNode,wire=True,fixed=False,material='gridNodeMat') ))
bb= nodes.append(O.bodies.append( gridNode([ 110e-3, 
110e-3,-200e-3],RNode,wire=True,fixed=False,material='gridNodeMat') ))
cc= nodes.append(O.bodies.append( gridNode([ 
110e-3,-110e-3,-200e-3],RNode,wire=True,fixed=False,material='gridNodeMat') ))
dd= nodes.append(O.bodies.append( 
gridNode([-110e-3,-110e-3,-200e-3],RNode,wire=True,fixed=False,material='gridNodeMat')
 ))

ab= 
O.bodies.append(gridConnection(nodes[0],nodes[1],RNode,wire=True,material='gridNodeMat'))
ac= 
O.bodies.append(gridConnection(nodes[0],nodes[2],RNode,wire=True,material='gridNodeMat'))
ad= 
O.bodies.append(gridConnection(nodes[0],nodes[3],RNode,wire=True,material='gridNodeMat'))
bc= 
O.bodies.append(gridConnection(nodes[1],nodes[2],RNode,wire=True,material='gridNodeMat'))
bd= 
O.bodies.append(gridConnection(nodes[2],nodes[3],RNode,wire=True,material='gridNodeMat'))

abc= 
O.bodies.append(pfacet(nodes[0],nodes[1],nodes[2],wire=True,material='pFacetMat',color=color))
acd= 
O.bodies.append(pfacet(nodes[0],nodes[2],nodes[3],wire=True,material='pFacetMat',color=color))

clump1=O.bodies.appendClumped([\
aa, bb, cc, dd, ab, ac, ad, bc, bd, abc, acd
])

###
Thanks!



-- 
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 #695245]: Error when running on HPC

2021-01-28 Thread Jiannan Wang
New question #695245 on Yade:
https://answers.launchpad.net/yade/+question/695245

Hello,

I'm trying to run Yade on HPC. Our IT helped me set up a singularity under my 
account. It seems to be OK with launching Yade. But when I actually tried to 
run the script same as the one in the thermal coupling example [1] (omitted the 
graphic plot part), the following error occurred after 6000 iterations: 

 ThreadRunner:35 void yade::ThreadRunner::run(): Exception occured:
CGAL ERROR: assertion violation!
Expr: dexp != 2047
File: /usr/include/CGAL/Mpzf.h
Line: 448
Explanation: Creating an Mpzf from infinity or NaN.

I tried to typed printAllVersions(), I got the following: 

```
Yade version   :  2021.01a
Yade features  :  BoostLog PrecisionDouble Odeint VTK OpenMP GTS GUI-Qt5 CGAL 
PFVFLOW PFVFLOW LINSOLV TWOPHASEFLOW SPH FEMLIKE GL2PS LBMFLOW THERMAL 
PARTIALSAT PotentialParticles
Yade config dir:  ~/.yade
Yade precision :  53 bits, 15 decimal places, without mpmath
```

Libraries used :

| library   | cmake | C++ |
| - | - | --- |
| boost | 1.74.0| 1.74.0  |
| cgal  |   | 5.2 |
| cmake | 3.18.4| |
| compiler  | /usr/bin/c++ 10.2.1   | gcc 10.2.1  |
| eigen | 3.3.9 | 3.3.9   |
| freeglut  | 2.8.1 | |
| gl|   | 20190805|
| ipython   | 7.19.0| |
| metis |   | 5.1.0   |
| openblas  |   |  OpenBLAS 0.3.10|
| python| 3.9.1 | 3.9.1   |
| qglviewer |   | 2.6.3   |
| qt|   | 5.15.2  |
| sqlite|   | 3.34.0  |
| suitesparse   | 5.8.1 | 5.8.1   |
| vtk   | 9.0.1 | 9.0.1   |

```
Linux version  :  Ubuntu Hirsute Hippo (development branch)
Architecture   :  amd64
Little endian  :  True
```
I'm wondering where it may go wrong? What is missing from the installation that 
cause this problem. Thank you.

Best 
Jiannan


[1]: 
https://gitlab.com/yade-dev/trunk/-/blob/master/examples/ThermalEngine/thermoHydroMechanical_coupling.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


[Yade-users] Yade 2021.01a is released

2021-01-28 Thread Anton Gladky
Dear Yade users and developers,

As always at the beginning of the year we are releasing
the newer Yade version. A couple of days ago Yade 2021.01a
was released [1]! Thanks all for contributions!

Special thanks to Janek for his contribution and preparing the
release notes! French team thanks for pushing MPI version of the
Yade and other features and fixes!

[1] https://gitlab.com/yade-dev/trunk/-/releases/2021.01a

Best regards

Anton
___
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 #695226]: RungeKuttaCashKarp54Integrator with gridConnections is causing errors

2021-01-28 Thread Bruno Chareyre
Question #695226 on Yade changed:
https://answers.launchpad.net/yade/+question/695226

Bruno Chareyre posted a new comment:
>  It could be that there is a mismatch between what you input at the
interactions scale and what you expect in terms of damping at the
structural scale

I would say the bending viscosity of the interactions should  be a
multiple of ~N/L, do we agree on that?


> https://github.com/rohitkjohnedu/yade_laws .

Problem here is we can't see you changes.
>From the top of my head, you need to do something like:
0. get sources with "git clone"
1. edit sources
2. "git commit -a -m 'that's my change'"
3. git push to gitlab/github whatever

This way we can see what was done specifically in step 1

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 #695226]: RungeKuttaCashKarp54Integrator with gridConnections is causing errors

2021-01-28 Thread Bruno Chareyre
Question #695226 on Yade changed:
https://answers.launchpad.net/yade/+question/695226

Bruno Chareyre posted a new comment:
You are past-the-end of my checklist. :)
RungeKuttaCashKarp54Integrator makes sense then.

Last one maybe: in a working case (small damping), did you find
consistency _at the structural scale_ in terms of damping the
oscillations? It could be that there is a mismatch between what you
input at the interactions scale and what you expect in terms of damping
at the structural scale?

> is similar to forward Euler

Yes and no. It is a 2nd order time centered scheme from Newton's point
of view. Problem is velocities are not known on step, they are know at
mid-steps. So this wonderful scheme for mass-spring systems becomes a
poor 1st order Euler when there are viscous terms. If you take mid-steps
as your frame of reference and you think to what happens to velocities
wrt. visous forces it is plain explicit Euler, you are right.

There are ways to evaluate on-step velocites (something similar to
"velocity Verlet" [1]) which we don't use. It should improve your case,
it needs some changes in the integrator and it needs two calculations of
forces per time iteration.

> the RungeKuttaCashKarp54Integrator is extremely slow.

Because there are even more than  two calculations of forces per time
iteration, I guess?

Do you mean that despite larger timesteps it is still slower?

Bruno

[1] https://en.wikipedia.org/wiki/Verlet_integration

-- 
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 #695226]: RungeKuttaCashKarp54Integrator with gridConnections is causing errors

2021-01-28 Thread Rohit John
Question #695226 on Yade changed:
https://answers.launchpad.net/yade/+question/695226

Rohit John posted a new comment:
Dear Bruno,

> what happens with super-small O.dt? (defining what is "super-small" needs to 
> think about mass-viscosity-stiffness parameters)
- It depends on the damping fraction and the material stiffness. I wrote the 
code such that the damping coefficient is a fraction of the stiffness. (Same 
fraction for normal, shear, twist and bending stiffness in 
Law2_ScGeom6D_CohFrictPhys_CohesionMoment). At small time steps it works, but 
if I want higher damping I must reduce the time step. For one simulation it had 
to be 1e-10.  Even days were not enough to get some useful result.

> are the directions of forces, moment, velocities and spin consistent, with 
> just 2-3 nodes after 2 iterations?
I checked the values and when the damping and dt were badly set, the forces and 
velocities grow exponentially, but when I reduce the dt or damping they "calm 
down". 

>From my understanding the integrator in YADE is similar to forward Euler
which is unstable when there is damping. So I though changing the
integrator might help. Janek Kozicki solution works but the
RungeKuttaCashKarp54Integrator is extremely slow.

If possible could you check could the code found here:
https://github.com/rohitkjohnedu/yade_laws .

Kind regards,
Rohit K. John

-- 
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 #695226]: RungeKuttaCashKarp54Integrator with gridConnections is causing errors

2021-01-28 Thread Rohit John
Question #695226 on Yade changed:
https://answers.launchpad.net/yade/+question/695226

Status: Answered => Solved

Rohit John confirmed that the question is solved:
Thanks Janek Kozicki, 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 #695058]: Bending beams mass computation

2021-01-28 Thread Bruno Chareyre
Question #695058 on Yade changed:
https://answers.launchpad.net/yade/+question/695058

Status: Open => Answered

Bruno Chareyre proposed the following answer:
Here is a fix for your test. :)

 mass computation 
realLength= (O.bodies[n-1].state.pos-O.bodies[0].state.pos).norm()# first 
node to last node of first beam
ana_beam_mass = r**2 * math.pi * realLength * O.bodies[0].material.density
totalActiveMass = sum( [O.bodies[id].state.mass for id in nodesIds] )
print("analytical mass",ana_beam_mass," vs. numerical mass ",totalActiveMass/4)
##

Output:
analytical mass 11.519173063162576  vs. numerical mass  11.519173063162569


Arguably the function "cylinderConnection()" can be confusing. It produces a 
node to to node distance which is less than L/N since it includes the spherical 
caps in L.
OTOH the total mass is defined by neglecting the spherical caps, hence an 
apparent inconsistency.

Another thing is that the cylinderConnections are never dynamic, they
are just folloing the nodes. They turn out to have have a mass because
some constructors define one by default, but it is not actually used
anywhere. So total mass of the beam is the mass of its nodes.

For very short objects it might not be a good idea to neglect the mass
of spherical caps. On the other hand it would be painfull to compare to
beam theory if the mass was not uniformly distributed (currently it is,
with end nodes having 0.5*mass of center nodes, it wouldn't with
spherical caps).

In the end, all this is just pre-processing by some python helper
function. You can easily assign mass per-node the way you like it, and
you could also bend a modified version of cylinderConnection() to your
liking.

HTH
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 #695192]: wall.append(O.bodies.append(pfacet) in triaxial test

2021-01-28 Thread xxxea
Question #695192 on Yade changed:
https://answers.launchpad.net/yade/+question/695192

Status: Needs information => Answered

xxxea proposed the following answer:
Thanks for your patience! I have read the article about Pfacet and I
think it is what I want for wall as to act as soft membrane.And I tried
to clump nodes and pfacs as you suggest but it didn't work. Could you
help me with it?(I have commented on this question earlier) Thanks!
zhanghanying 邮箱:zhanghany...@buaa.edu.cn 签名由 网易邮箱大师 定制 On 01/28/2021
23:55, Bruno Chareyre wrote: Your question #695192 on Yade changed:
https://answers.launchpad.net/yade/+question/695192    Status: Open =>
Needs information Bruno Chareyre requested more information: That's too
many questions for me, sorry. Simple answer: you did not show a problem
with Box's, you showed a problem with Wall's (aabbWalls()) Walls are not
Boxes. :) This being said I would have expected this to work with walls
too. Could you please show the pfacet-box or pfacet-wall problem in a
MWE [1]? Bruno [1] https://www.yade-dem.org/wiki/Howtoask -- To answer
this request for more information, you can either reply to this email or
enter your reply at the following page:
https://answers.launchpad.net/yade/+question/695192 You received this
question notification because you asked the 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 #695192]: wall.append(O.bodies.append(pfacet) in triaxial test

2021-01-28 Thread Bruno Chareyre
Question #695192 on Yade changed:
https://answers.launchpad.net/yade/+question/695192

Status: Open => Needs information

Bruno Chareyre requested more information:
That's too many questions for me, sorry.
Simple answer: you did not show a problem with Box's, you showed a problem with 
Wall's (aabbWalls())
Walls are not Boxes. :)
This being said I would have expected this to work with walls too.

Could you please show the pfacet-box or pfacet-wall problem in a MWE
[1]?

Bruno

[1] https://www.yade-dem.org/wiki/Howtoask

-- 
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 #695192]: wall.append(O.bodies.append(pfacet) in triaxial test

2021-01-28 Thread Hanying Zhang
Question #695192 on Yade changed:
https://answers.launchpad.net/yade/+question/695192

Hanying Zhang gave more information on the question:
And the error says:

  File "1-28.py", line 124, in 
ab= 
O.bodies.append(gridConnection(aa,bb,RNode,wire=True,material='gridNodeMat'))
  File "/usr/lib/x86_64-linux-gnu/yade/py/yade/gridpfacet.py", line 109, in 
gridConnection
sph1=O.bodies[id1] ; sph2=O.bodies[id2]
ArgumentError: Python argument types in
BodyContainer.__getitem__(BodyContainer, NoneType)
did not match C++ signature:
__getitem__(pyBodyContainer {lvalue}, int)

Thanks!

-- 
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 #695192]: wall.append(O.bodies.append(pfacet) in triaxial test

2021-01-28 Thread Hanying Zhang
Question #695192 on Yade changed:
https://answers.launchpad.net/yade/+question/695192

Hanying Zhang gave more information on the question:
I got problems when clumping nodes and pfacets into a clump. There are
several ways to creat Pfacets and I tried two of them, both did't work.
Here is one way I tried. Please help me with it. Thanks!


nodes=[]
#up
aa= nodes.append(O.bodies.append( gridNode([-110e-3, 
110e-3,-200e-3],RNode,wire=True,fixed=False,material='gridNodeMat') ))
bb=nodes.append(O.bodies.append( gridNode([ 110e-3, 
110e-3,-200e-3],RNode,wire=True,fixed=False,material='gridNodeMat') ))
cc= nodes.append(O.bodies.append( gridNode([ 
110e-3,-110e-3,-200e-3],RNode,wire=True,fixed=False,material='gridNodeMat') ))
dd= nodes.append(O.bodies.append( 
gridNode([-110e-3,-110e-3,-200e-3],RNode,wire=True,fixed=False,material='gridNodeMat')
 ))

ab= 
O.bodies.append(gridConnection(aa,bb,RNode,wire=True,material='gridNodeMat'))
ac= 
O.bodies.append(gridConnection(aa,cc,RNode,wire=True,material='gridNodeMat'))
ad= 
O.bodies.append(gridConnection(aa,dd,RNode,wire=True,material='gridNodeMat'))
bc= 
O.bodies.append(gridConnection(bb,cc,RNode,wire=True,material='gridNodeMat'))
bd= 
O.bodies.append(gridConnection(bb,dd,RNode,wire=True,material='gridNodeMat'))

abc= 
O.bodies.append(pfacet(aa,bb,cc,wire=True,material='pFacetMat',color=color))
acd= 
O.bodies.append(pfacet(aa,cc,dd,wire=True,material='pFacetMat',color=color))

clump1=O.bodies.appendClumped([\
aa, bb, cc, dd, ab, ac, ad, bc, bd, abc, acd
])

###
Thanks!

-- 
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 #695226]: RungeKuttaCashKarp54Integrator with gridConnections is causing errors

2021-01-28 Thread Bruno Chareyre
Question #695226 on Yade changed:
https://answers.launchpad.net/yade/+question/695226

Bruno Chareyre requested more information:
> I added viscous damping to the source code of
Law2_ScGeom6D_CohFrictPhys_CohesionMoment, this caused the
NewtonIntegrator to be unstable

Quick note:
We can't really try since we don't have your specific damping model. You could 
push to a gitlab branch at some point if you want someone to be able to try the 
script with relevant code version.


Maybe you did that already, but before trying another integrator (or higher 
number precision ;) ), I would go through this checkList:
- what happens with super-small O.dt? (defining what is "super-small" needs to 
think about mass-viscosity-stiffness parameters)
- are the directions of forces, moment, velocities and spin consistent, with 
just 2-3 nodes after 2 iterations?

Cheers
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 #695226]: RungeKuttaCashKarp54Integrator with gridConnections is causing errors

2021-01-28 Thread Janek Kozicki
Question #695226 on Yade changed:
https://answers.launchpad.net/yade/+question/695226

Status: Open => Answered

Janek Kozicki proposed the following answer:
See: https://gitlab.com/yade-dev/trunk/-/issues/171 it is not fixed. You
can try the workaround mentioned in that issue, use flag dead=True.

-- 
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 #695226]: RungeKuttaCashKarp54Integrator with gridConnections is causing errors

2021-01-28 Thread Rohit John
Question #695226 on Yade changed:
https://answers.launchpad.net/yade/+question/695226

Description changed to:
Hello,

I want to use the RungeKuttaCashKarp54Integrator engine in a simulation
with cylinderConnections. I added viscous damping to the source code of
Law2_ScGeom6D_CohFrictPhys_CohesionMoment, this caused the
NewtonIntegrator to be unstable (The objects are exploding). I concluded
this may be because of the integration scheme and opted to use
RungeKuttaCashKarp54Integrator. However when I try to run the simulation
with RungeKuttaCashKarp54Integrator, I get "RuntimeError: No
IGeomDispatcher in engines or inside InteractionLoop".

The minimum working code is given below. Please help me to fix the issue

Kind regards,
Rohit John

##
# encoding: utf-8
"An example showing bending beams."

from yade.gridpfacet import *

 Parameter 
L=10.   # length of the beam
n=12# number of nodes used to generate the beam
r=L/50. # radius of the beam element

 Engines 
integrator=RungeKuttaCashKarp54Integrator([
ForceResetter(),
GeneralIntegratorInsertionSortCollider([Bo1_GridConnection_Aabb()]),
InteractionLoop(
[Ig2_GridNode_GridNode_GridNodeGeom6D()],

[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=False)],
[Law2_ScGeom6D_CohFrictPhys_CohesionMoment()]
),
GravityEngine(gravity=Vector3(0,0,-9.81)),
])

#Tolerances can be set for the optimum accuracy
integrator.rel_err=1e-6;
integrator.abs_err=1e-6;

O.engines=[integrator,
]

 Create materials and set different properties 
O.materials.append(CohFrictMat(young=1e6,poisson=0.3,density=1e1,frictionAngle=radians(10),normalCohesion=1e40,shearCohesion=1e40,momentRotationLaw=True,label='mat1'))

 Vertices 
vertices1=[]

for i in range(0,n):
  vertices1.append( [i*L/n,0,0] )


 Create cylinder connections 
nodesIds=[]
cylIds=[]
cylinderConnection(vertices1,r,nodesIds,cylIds,color=[1,0,0],highlight=False,intMaterial='mat1')


 Set boundary conditions 
for i in range(0,1):
   O.bodies[nodesIds[i*n]].dynamic=False


 Set a time step 
O.dt=1e-05

 Allows to reload the simulation 
O.saveTmp()

-- 
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 #695226]: RungeKuttaCashKarp54Integrator with gridConnections is causing errors

2021-01-28 Thread Rohit John
New question #695226 on Yade:
https://answers.launchpad.net/yade/+question/695226

Hello,

I want to use the RungeKuttaCashKarp54Integrator engine in a simulation with 
cylinderConnections. I added damping to the source code of 
Law2_ScGeom6D_CohFrictPhys_CohesionMoment, this caused the NewtonIntegrator to 
be unstable (The objects are exploding). I concluded this may be because of the 
integration scheme and opted to use RungeKuttaCashKarp54Integrator. However 
when I try to run the simulation with RungeKuttaCashKarp54Integrator, I get 
"RuntimeError: No IGeomDispatcher in engines or inside InteractionLoop". 

The minimum working code is given below. Please help me to fix the issue

Kind regards,
Rohit John

##
# encoding: utf-8
"An example showing bending beams."

from yade.gridpfacet import *

 Parameter 
L=10.   # length of the beam
n=12# number of nodes used to generate the beam
r=L/50. # radius of the beam element

 Engines 
integrator=RungeKuttaCashKarp54Integrator([
ForceResetter(),
GeneralIntegratorInsertionSortCollider([Bo1_GridConnection_Aabb()]),
InteractionLoop(
[Ig2_GridNode_GridNode_GridNodeGeom6D()],

[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=False)],
[Law2_ScGeom6D_CohFrictPhys_CohesionMoment()]
),
GravityEngine(gravity=Vector3(0,0,-9.81)),
])

#Tolerances can be set for the optimum accuracy
integrator.rel_err=1e-6;
integrator.abs_err=1e-6;

O.engines=[integrator,
]

 Create materials and set different properties 
O.materials.append(CohFrictMat(young=1e6,poisson=0.3,density=1e1,frictionAngle=radians(10),normalCohesion=1e40,shearCohesion=1e40,momentRotationLaw=True,label='mat1'))

 Vertices 
vertices1=[]

for i in range(0,n):
  vertices1.append( [i*L/n,0,0] )


 Create cylinder connections 
nodesIds=[]
cylIds=[]
cylinderConnection(vertices1,r,nodesIds,cylIds,color=[1,0,0],highlight=False,intMaterial='mat1')


 Set boundary conditions 
for i in range(0,1):
   O.bodies[nodesIds[i*n]].dynamic=False


 Set a time step 
O.dt=1e-05

 Allows to reload the simulation 
O.saveTmp()

-- 
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 #694548]: Unexpected PFacet Collision Physics

2021-01-28 Thread Launchpad Janitor
Question #694548 on Yade changed:
https://answers.launchpad.net/yade/+question/694548

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 #695058]: Bending beams mass computation

2021-01-28 Thread Paul Pircher
Question #695058 on Yade changed:
https://answers.launchpad.net/yade/+question/695058

Status: Answered => Open

Paul Pircher is still having a problem:
Hello,
thanks for you thoughts and sorry for the late reply. 
I tried several things to see how the mass is computed. It turns out there 
might be even more confusion.

If only nodes are added to the simulation, none of them have any mass at all 
(0.0kg).
As soon as CylinderConnections are added the nodes and the cylinders receive a 
mass, that is "incorrectly" computed as shown above. 

The point that they overlap is a good one. This might be the reason for
a higher mass in the simulation, but as you already have shown this
doesn't lead to a valid result either.

I found a paper that deals with those connections in yade [1]. 
In there it is told that "The mass of the cylinder element is lumped into its 
two nodes."
Which would explain the higher masses of the nodes, but on the other hand would 
mean that the cylinders don't have any mass at all. 
Did I intrepret that correctly? 
Is the paper acutally refering to this exact yade-functions or did they use 
something else? 
Since they used nodes and cylinder connections I thought this might be the same 
approach.

Would you mind sharing your thoughts on that?

Thanks for your help and best regards,
Paul

[1]
https://www.researchgate.net/publication/282996677_A_general_method_for_modelling_deformable_structures_in_DEM

-- 
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 #695192]: wall.append(O.bodies.append(pfacet) in triaxial test

2021-01-28 Thread Hanying Zhang
Question #695192 on Yade changed:
https://answers.launchpad.net/yade/+question/695192

Status: Answered => Open

Hanying Zhang is still having a problem:
>Sure of that? Any example script?

Just replace PFacet code with:
walls=aabbWalls([mi,ma],thickness=0,material='walls')
wallIds=O.bodies.append(walls)
(try script below)

>I would expect 4 nodes / 2 facets for a rectangle, but whatever the
numbers you can clump them all together in one body, hence the nodes
won't be repeated.

4 nodes / 2 facets for a rectangle.
a box has 8 vertices and 6 sides(12 Pfacets).
hence 8 nodes would be repeated?

Can I just add force on Pfacets?

Thanks!
#
#run and you can see cylinders go through wall like there is not a wall

from yade.gridpfacet import *
from yade import pack, plot
#from random import random as r
import numpy as np
from numpy import *
import math
from yade import utils, qt
import random
from yade import polyhedra_utils, qt

#parameters

#mi,ma = (-100e-3,-100e-3,-200e-3),(100e-3,100e-3,200e-3)
mi,ma = (-10e-3,-10e-3,-20e-3),(10e-3,10e-3,20e-3)

color=[0.,1.,1.]

 Parameter 
young=4.0e6
poisson=3
density=1e3
stabilityThreshold=0.01
#=meterials
O.materials.append(FrictMat(young=4.0e6,poisson=.3,frictionAngle=30,density=2630e0,label='sphereMat'))#for
 sphere

O.materials.append(FrictMat(young=3e9,poisson=.15,frictionAngle=20,density=910e+0,label='extcylMat'))#for
 sphere-cylinder
O.materials.append(CohFrictMat(young=3e9,poisson=.15,density=910e0,frictionAngle=20,normalCohesion=1e40,shearCohesion=1e40,momentRotationLaw=True,label='intcylMat'))#for
 cylinder-cylinder

O.materials.append( CohFrictMat( 
young=3e6,poisson=0.15,density=910e0,frictionAngle=20,normalCohesion=3e100,shearCohesion=3e100,momentRotationLaw=True,label='gridNodeMat'
 ) )#for gridNodes
#O.materials.append(CohFrictMat(young=3e9,poisson=.15,density=910e6,frictionAngle=20,normalCohesion=1e40,shearCohesion=1e40,momentRotationLaw=True,label='gridNodeMat'))#for
 gridNodes
O.materials.append(FrictMat(young=4e6,poisson=0.3,density=1000,frictionAngle=20,label='pFacetMat'))
 #for pfacet

O.materials.append(FrictMat(young=young,poisson=0.5,frictionAngle=0,density=2630,label='walls'))



triax=TriaxialStressController(

maxMultiplier=1.+2e4/young, # spheres growing factor (fast growth)
finalMaxMultiplier=1.+2e3/young, # spheres growing factor (slow growth)
thickness = 0,

stressMask = 0,
max_vel = 3.7e-7,
wall_front_activated=True,
wall_back_activated=True,
wall_top_activated=True,
wall_bottom_activated=True,
wall_left_activated=True,
wall_right_activated=True,

internalCompaction=False, # If true the confining pressure is generated 
by growing particles
)

#==Engines=
O.engines=[
ForceResetter(),
InsertionSortCollider([
Bo1_Sphere_Aabb(),
Bo1_GridConnection_Aabb(),
Bo1_PFacet_Aabb(),
Bo1_Box_Aabb(),
Bo1_Wall_Aabb()
]),
InteractionLoop([
Ig2_Sphere_Sphere_ScGeom(),
Ig2_Box_Sphere_ScGeom(),
Ig2_GridNode_GridNode_GridNodeGeom6D(),
Ig2_Sphere_GridConnection_ScGridCoGeom(),
Ig2_GridConnection_GridConnection_GridCoGridCoGeom(),
Ig2_GridConnection_PFacet_ScGeom(),
Ig2_PFacet_PFacet_ScGeom(),
Ig2_Sphere_PFacet_ScGridCoGeom(),
Ig2_Wall_PFacet_ScGeom(),
Ig2_Wall_Sphere_ScGeom()
],
[

Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=False),
   # internal cylinder physics
Ip2_FrictMat_FrictMat_FrictPhys(),  # physics for external 
interactions, i.e., cylinder-cylinder, sphere-sphere, cylinder-sphere

Ip2_FrictMat_CpmMat_FrictPhys(),
],
[
Law2_ScGeom_FrictPhys_CundallStrack(),  # contact law for 
sphere-sphere
Law2_ScGridCoGeom_FrictPhys_CundallStrack(),# contact law 
for cylinder-sphere
Law2_ScGeom6D_CohFrictPhys_CohesionMoment(),# contact law 
for "internal" cylinder forces
Law2_GridCoGridCoGeom_FrictPhys_CundallStrack(),# 
contact law for cylinder-cylinder interaction
#Law2_GridCoGridCoGeom_CohFrictPhys_CundallStrack(),
Law2_ScGeom_CpmPhys_Cpm(),
]
),
GlobalStiffnessTimeStepper(timestepSafetyCoefficient=0.1,label='ts'), 
triax,
NewtonIntegrator(gravity=(0,0,20),damping=0.5,label='newton'),
]

triax.goal1=triax.goal2=triax.goal3=-0.9
walls=aabbWalls([mi,ma],thickness=0,material='walls')
wallIds=O.bodies.append(walls)
#=