[Yade-users] [Question #683336]: Yade-OpenFoam-coupling delete the particles outside the fluid cells

2019-08-26 Thread Anqi H
New question #683336 on Yade:
https://answers.launchpad.net/yade/+question/683336

Hi everyone, 

I'm trying to simulate fluid flow in a porous media between two parallel 
plates. The plates were made up of spheres in an FCC structure, the porous 
media is a sphere cylinder pack deformed under compressive stress from the two 
plates. With Yade-OpenFoam, the script worked fine until a particle lost 
cohesive bonds and floats outside the fluid cells due to the pressure gradient 
at inlet/outlet, the process would hang and return a message that a particle is 
not found in FOAM. I was wondering if it would be possible to ignore or delete 
the particles that are outside the fluid cells so that the process continues? 


Thank you.

-- 
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 #683336]: Yade-OpenFoam-coupling delete the particles outside the fluid cells

2019-08-26 Thread Deepak
Question #683336 on Yade changed:
https://answers.launchpad.net/yade/+question/683336

Status: Open => Answered

Deepak proposed the following answer:
Hello,

Yes it is possible, although what kind of boundary conditions are used in the 
fluid problem? 
One way to do this would be to add a PyRunner function. 

In the function :

* check for particles that has lost the cohesion, exclude these ids. 
* reset the fluidCoupling.setNumParticles, with the number of cohesive bonds, 
*  put the ids of the particles you want in fluidCoupling.setIdList 

The PyRunner should be set before the fluidCoupling engine, let me know
if this works.

-- 
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 #683336]: Yade-OpenFoam-coupling delete the particles outside the fluid cells

2019-08-26 Thread Deepak
Question #683336 on Yade changed:
https://answers.launchpad.net/yade/+question/683336

Deepak proposed the following answer:
Also, could you share a simple script (and the name of the openfoam
solver), so I can test this?

-- 
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 #683176]: how to use clump to make a desired shape

2019-08-26 Thread Bettina Suhr
Question #683176 on Yade changed:
https://answers.launchpad.net/yade/+question/683176

Status: Open => Answered

Bettina Suhr proposed the following answer:
Dear lip,

You might want to check the “trunk/examples/clumps” folder , for
examples how clumps are defined.

Regarding your question 2: read the replaceByClumps-example.py example.
Here, makeCloud() is used to generate spheres, which are than replaced
by clumps.

Regards,
Bettina

-- 
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 #683336]: Yade-OpenFoam-coupling delete the particles outside the fluid cells

2019-08-26 Thread Anqi H
Question #683336 on Yade changed:
https://answers.launchpad.net/yade/+question/683336

Anqi H posted a new comment:
Hi Deepak, thank you for your message. I'm not too sure how to put the
pyrunner before the fluidcoupling engine, I was also wondering how to
reset the aabbEnlargeFactor after the first iteration. When I was
working with just Yade, I reset this parameter after O.step and then use
the gui to run the rest of the simulation.

This is my yade script

from __future__ import print_function
import sys
from yadeimport import *
from yade.utils import *
from yade import ymport

initMPI()   #Initialize the mpi environment, always 
required.
fluidCoupling = yade.FoamCoupling(); #Initialize the engine
fluidCoupling.getRank();#part of Initialization.


#example of spheres in shear flow : two-way point force coupling
class simulation():

  def __init__(self):

O.periodic = True;

#proppant properties
FrictAng_p = 0.9
Density_p = 2650
Young_p = 100e6
TensileStr_p=3000
Cohesion_p=3000

proppant =
JCFpmMat(type=2,young=Young_p,frictionAngle=FrictAng_p,density=Density_p,tensileStrength=TensileStr_p,cohesion=Cohesion_p,label='proppant')

O.materials.append(proppant)

proppant_assembly =
O.bodies.append(ymport.textExt('new_prop.txt','x_y_z_r',shift=Vector3(0,0,0),scale=1,material=proppant,color=(1.00,0.67,0.50)))

for b in proppant_assembly:
  if O.bodies[b].state.pos[0] < 0:
O.bodies.erase(b)

sphereIDs = [b.id for b in O.bodies if type(b.shape)==Sphere and
b.material.label=='proppant']

#coupling engine settings

fluidCoupling.setNumParticles(len(sphereIDs))
fluidCoupling.setIdList(sphereIDs)
fluidCoupling.isGaussianInterp=False;  #use pimpleFoamYade for 
gaussianInterp

# Integrator
newton=NewtonIntegrator(damping=0.0, gravity = (0.0 ,0.0, 0.0))
 # add small damping in case of stability issues.. ~ 0.1 max, also note : 
If gravity is needed, set it in constant/g dir.

O.engines=[
  ForceResetter(),
  InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=1.2, 
label="bols"),Bo1_Facet_Aabb()], allowBiggerThanPeriod=True),
  InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=1.2, 
label="ig2s"),Ig2_Facet_Sphere_ScGeom()],
[Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1)],

[Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(recordCracks=True,label='lawFunctor')]
  ),
  GlobalStiffnessTimeStepper(timestepSafetyCoefficient=0.7, label = "ts"),
fluidCoupling, #to be called after timestepper
PyRunner(command='sim.printMessage()', iterPeriod= 1000, 
label='outputMessage'),
  newton,
#PyRunner(command='sim.deletePar()',iterPeriod=50, label='checkPar'),

VTKRecorder(fileName='yadep/3d-vtk-',recorders=['spheres','colors'],iterPeriod=1000)
]

if O.iter>1:
  bo1s.aabbEnlargeFactor = 1
  ig2s.interactionDetectionFactor = 1
  print('---reset aabbEnlargeFactor--')

  def printMessage(self):

 print("YADE-ITER = " + str(O.iter) +" 
**")
 if O.iter == 4000:
 maxVel = 0.05
 for b in O.bodies:
 if type(b.shape)==Sphere:
 bodyVel = abs(b.state.vel.norm())
 if bodyVel > maxVel:
 raise ValueError("Body velocity exceeds imposed shear 
velocity by ", abs(bodyVel-maxVel))

  def deletePar(self):
print("**YADE-ITER = " + str(O.iter) +" **")
for b in proppant_assembly:
  if O.bodies[b].state.pos[0]>0.02:
print('delete id '+str(b))
O.bodies.erase(b)
fluidCoupling.setNumParticles(len(sphereIDs))
fluidCoupling.setIdList(sphereIDs)


  def irun(self,num):
  O.run(num,1)


if __name__=="__main__":
sim = simulation()
sim.irun(5000)
# print("body id = ", O.bodies[34].id)
fluidCoupling.killMPI()

import builtins
builtins.sim=sim


proppant.txt
0.00643783930395 0.0153571235196 0.00996462421737 0.000296398704259
0.0063978094014 0.0151208968385 0.00923970556825 0.000295898392322
0.00806594949045 0.0152558278563 0.00630458365066 0.00029536865027
0.00773116324663 0.0151764265584 0.0076636891438 0.000295015488902
0.00896207660218 0.0153221567143 0.0091664883318 0.000294397456509

-- 
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 #683336]: Yade-OpenFoam-coupling delete the particles outside the fluid cells

2019-08-26 Thread Anqi H
Question #683336 on Yade changed:
https://answers.launchpad.net/yade/+question/683336

Status: Answered => Solved

Anqi H confirmed that the question is solved:
blockMeshDict:

FoamFile
{
version 2.0;
format  ascii;
class   dictionary;
object  blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(
(-0.002 0.0132 -0.002)
(0.022 0.0132 -0.002) 
(0.022 0.0174 -0.002) 
(-0.002 0.0174 -0.002)
(-0.002 0.0132 0.022)
(0.022 0.0132 0.022)
(0.022 0.0174 0.022)
(-0.002 0.0174 0.022)
);

blocks
(
hex (0 1 2 3 4 5 6 7) (12 3 12) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
top
{
type wall;
faces
(
(3 7 6 2)
);
}


bottom
{
type wall;
faces
(
(1 5 4 0)
);
}


inlet
{
type patch;
faces
(
(0 4 7 3)
);
}


outlet
{
type patch;
faces
(
(2  6 5 1)
);
}


front_back
{
type empty;
faces
(
(0 3 2 1)
(4 5 6 7)
);
}


);

mergePatchPairs
(
);

0/p
FoamFile
{
version 2.0;
format  ascii;
class   volScalarField;
object  p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions  [0 2 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{

inlet
{
type fixedValue;
value uniform 64;
}

outlet
{
type fixedValue;
value uniform 0;
}

top
{
type zeroGradient;
}

bottom
{
type zeroGradient;
}

front_back
{
type empty;
}

}

fvSolutions
solvers
{
p
{

solver  PCG;
preconditionerDIC;
tolerance   1e-06;
relTol  0;
}

pFinal
{
$p;
relTol  0;
}

U
{ 

solver  PBiCG;
preconditionerDILU;
tolerance   1e-05;
relTol  0;
}
}

PISO
{
nCorrectors 2;
nNonOrthogonalCorrectors 0;
pRefCell0;
pRefValue   0;
}

-- 
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 #683336]: Yade-OpenFoam-coupling delete the particles outside the fluid cells

2019-08-26 Thread Anqi H
Question #683336 on Yade changed:
https://answers.launchpad.net/yade/+question/683336

Status: Solved => Open

Anqi H is still having a problem:
FoamFile
{
version 2.0;
format  ascii;
class   volVectorField;
object  U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions  [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
inlet
{
type zeroGradient;
}

outlet
{
type zeroGradient;
}

top
{
type fixedValue;
value uniform (0 0 0);
}

bottom
{
type fixedValue;
value uniform (0 0 0);
}

front_back
{
type empty;
}


}

-- 
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 #682290]: the correct use of collider.avoidSelfInteractionMask ?

2019-08-26 Thread Luc OGER
Question #682290 on Yade changed:
https://answers.launchpad.net/yade/+question/682290

Luc OGER gave more information on the question:
Strange behaviour :
2 UBUNTU 19 environments on two differents machines:
the same compiler option and the same yade-2019-08-26 
result 
--on an old machine (cpu family : 6
model   : 42
model name  : Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
stepping: 7
microcode   : 0x2f
cpu MHz : 1725.371
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm 
constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid 
aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr 
pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm 
epb pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt 
dtherm ida arat pln pts md_clear flush_l1d)
the mask seems too work

--- on the new machine (cpu family  : 6
model   : 94
model name  : Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
stepping: 3
microcode   : 0xcc
cpu MHz : 800.039) the 
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb 
rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology 
nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl 
vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe 
popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch 
cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi 
flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms 
invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 
xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear 
flush_l1d)
the result are similar to the bad previous series : full or no interactions??
this confirm the processor coompilation problem as suggested by Janek

-- 
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 #683375]: uncertainty in the shear behavior of material

2019-08-26 Thread Alireza Sadeghi
New question #683375 on Yade:
https://answers.launchpad.net/yade/+question/683375

Hello All,

I was encountered to a problem in my dem modeling. I want to simulate the bulk 
behavior of material. Due to reach this goal, I have to choose a number of 
particles which could represent the bulk behavior as similar as experiment. I 
did two type of simulation.
in the first one, I put the particles in the box and the the box faces compress 
the paricles, after in the x and y direction, stress remain constant and in the 
z direction, we increase stress and plot the strain-stress in z direction. Due 
to initial conditions (randomness of initial position of particles) we will 
reach to different results in each realization. The code is as below:

from yade import utils, plot
from yade import pack, qt
from datetime import datetime
from yade import export

O.periodic=True
O.cell.refSize=(2e-1,2e-1,2e-1)

O.materials.append(CohFrictMat(normalCohesion= 1e20, shearCohesion= 1e20, 
isCohesive= True, young=6.81e8, density=1377.5, poisson=0.3, frictionAngle= 
0.31, fragile=False, label='Coke'))

nums=['t']

mats=['Coke']

coke=(5e-3,3000)

nums=pack.SpherePack()

nums.makeCloud((0,0,0),(2e-1,2e-1,2e-1),rMean=coke[0],rRelFuzz=0,num=coke[1])

O.bodies.append([utils.sphere(c,r,material=mats[0],color=(0,0,1)) for c,r in 
nums])

sigmaIso=-1e5

O.engines=[
 ForceResetter(),

 InsertionSortCollider([Bo1_Sphere_Aabb()]),
 InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
 ),

 PeriTriaxController(label='triax',
goal=(sigmaIso,sigmaIso,sigmaIso),stressMask=7,
dynCell=True,maxStrainRate=(1,1,1),
maxUnbalanced=.01,relStressTol=1e-3,
doneHook='compactionFinished()'
 ),
 NewtonIntegrator(damping=0.4),
 PyRunner(command='history()',iterPeriod=1000,label='recorder'),
]

O.dt=1e-6

O.saveTmp()

def compactionFinished():

O.cell.trsf=Matrix3.Identity
triax.goal=(sigmaIso,sigmaIso,-0.5)
triax.stressMask=3
triax.maxStrainRate=(0.1,0.1,0.1)
triax.doneHook='triaxFinished()'
triax.maxUnbalanced=1
dataOld = plot.data
plot.saveDataTxt('RVE3000-iso_part-e5-5.txt')
plot.data = {}
plot.plot()




def history():
plot.addData(unbalanced=unbalancedForce(),
sxx=-triax.stress[0],syy=-triax.stress[1],szz=-triax.stress[2],
exx=-triax.strain[0],eyy=-triax.strain[1],ezz=-triax.strain[2],
sxz=-0.5*(triax.stress[2]+triax.stress[0]), 
ev=(triax.strain[2]+triax.strain[1]+triax.strain[0]),
q=-(triax.stress[2]-triax.stress[1]), 
p=-(triax.stress[2]+triax.stress[1]+triax.stress[0])/3 ,
D=(triax.stress[2]-triax.stress[1])/sigmaIso,

R=3*(triax.stress[2]-triax.stress[1])/(triax.stress[2]+triax.stress[1]+triax.stress[0]+1e-2),
por=porosity(),i=O.iter,)

print 'porosity:', porosity()
print 'iteration', O.iter

O.run(800,True)

plot.saveDataTxt('RVE3000-dev_part-e5-5.txt')
plot.plots={'ezz':('szz')}
plot.plot()

def triaxFinished():
print 'Compaction finished'
O.pause()


In the second one, I made the sample first with the code below:

from yade import utils, plot
from yade import pack, qt
from datetime import datetime
from yade import export

O.periodic=True
O.cell.refSize=(2e-1,2e-1,2e-1)

O.materials.append(CohFrictMat(normalCohesion= 1e20, shearCohesion= 1e20, 
isCohesive= True, young=6.81e8, density=1377.5, poisson=0.3, frictionAngle= 
0.31, fragile=False, label='Coke'))

nums=['t']

mats=['Coke']

coke=(5e-3,3000)

nums=pack.SpherePack()

nums.makeCloud((0,0,0),(2e-1,2e-1,2e-1),rMean=coke[0],rRelFuzz=0,num=coke[1])

O.bodies.append([utils.sphere(c,r,material=mats[0],color=(0,0,1)) for c,r in 
nums])

sigmaIso=-1e5

O.engines=[
 ForceResetter(),

 InsertionSortCollider([Bo1_Sphere_Aabb()]),
 InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
 ),

 PeriTriaxController(label='triax',
goal=(sigmaIso,sigmaIso,sigmaIso),stressMask=7,
dynCell=True,maxStrainRate=(1,1,1),
maxUnbalanced=.01,relStressTol=1e-3,
doneHook='compactionFinished()'
 ),
 NewtonIntegrator(damping=0.4),
 PyRunner(command='history()',iterPeriod=1000,label='recorder'),
]


O.dt=1e-6

O.saveTmp()


def compactionFinished():
print 'Finished'
O.pause()
plot.saveDataTxt('Uncertainty-Pre-compact3000.txt')
plot.data = {}
O.save('Pre-compact3000.yade')

O.run(150,True)


and after that, I compress the sample of "Pre-compact3000.yade" in the z 
direction and plot the stress-strain in the z direction with code below:

from yade import utils, plot
from yade 

[Yade-users] [Question #683380]: define bond strength

2019-08-26 Thread Leonard
New question #683380 on Yade:
https://answers.launchpad.net/yade/+question/683380

Hi,
I am using CohFrictMat to investigate the bond effect, starting from very 
simple assembly, for example: two sands bonded by two cements, fix one sand and 
give a constant velocity on another sand. Here is the script running on Yade 
2018.02b, ubuntu 18.04.

from yade import pack, plot

cement = 
CohFrictMat(young=30e9,poisson=0.3,frictionAngle=radians(30),density=2650.0,normalCohesion=1e10,
 shearCohesion=1e9,label='cement')
O.materials.append(cement)

s1=utils.sphere((0,0,0),radius=1,color=[1,1,1],fixed=True,material='cement')
s2=utils.sphere((0,0,2),radius=1,color=[1,1,1],material='cement')
s3=utils.sphere((0,sqrt(0.44),1),radius=0.2,color=[0,0.8,0],material='cement')
s4=utils.sphere((0,-sqrt(0.44),1),radius=0.2,color=[0,0.8,0],material='cement')

O.bodies.append(s1)
O.bodies.append(s2)
O.bodies.append(s3)
O.bodies.append(s4)

s2.state.blockedDOFs='z'
s2.state.vel = Vector3(0,0,-1e1)

Gl1_Sphere.quality=3

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom6D()],
[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow = 
True,setCohesionOnNewContacts = True)],
[Law2_ScGeom6D_CohFrictPhys_CohesionMoment()]
),
NewtonIntegrator(damping=0.4),
PyRunner(iterPeriod=100,command='addPlotData()',label='plotData'),
]
## run for one step to generate interactions
O.step()

def addPlotData():
plot.addData(i=O.iter,
 displacement=1.8-O.bodies[1].state.pos[2],
 force_sand=O.forces.f(1)[2],
 normalForce_cement=O.interactions[1,2].phys.normalForce.norm(),
 shearForce_cement=O.interactions[1,2].phys.shearForce.norm(),
 normalAdhesion=O.interactions[1,2].phys.normalAdhesion,
 shearAdhesion=O.interactions[1,2].phys.shearAdhesion)

plot.plots={'displacement':('force_sand',),
'i':('normalAdhesion'),
'i ':('shearAdhesion'),
'normalForce_cement':('shearForce_cement'),}

plot.plot()

My questions are:

1. Which parameters in Yade define the bond strength (normal strength/ shear 
strength)?
To my best understanding, one contact bond fails when the normal/ shear force 
exceeds the corresponding strength, I reviewed some answered questions and 
found that it may be related to cohesion which is defined in CohFrictMat, and 
may be related to interactions.phys.normalAdhesion/ shearAdhesion, so I am 
confused about which parameters define the bond strength.

2. How can we control the value of O.interactions.phys.normalAdhesion/ 
shearAdhesion?
In this simulation, when I change the value of normalCohesion and/or 
shearCohesion in CohFrictMat, the force of sand can reach different values at 
the moment when the two cement spheres are ejected away, it is reasonable since 
the two cements with higher cohesion can lead to higher stiffness of the 
assembly. However, when I change the normalCohesion and/or shearCohesion in 
CohFrictMat, there is no change for the normalAdhesion / shearAdhesion, Does it 
mean that there is no relationship between normalCohesion in CohFrictMat and 
normalAdhesion in O.interactions.phys? If so, how can we control the 
interactions.phys.normalAdhesion/ shearAdhesion?

3.I want to assign cohesion to all existing contacts not only in current 
time-step, but alse in steps as long as the cement particles contact to sand 
particles, is it right to set both "setCohesionNow" and 
"setCohesionOnNewContacts" to True?

4. In the graph"normalForce_cement--shearForce_cement", why there are two 
lines? I thought at the moment when the cement particles are ejected away, the 
normal force and shear force would quickly drop to zero like the other three 
graphs.

Many thanks!
Leonard (Aoxi)


-- 
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 #683384]: After deletion of particles, why the output of particle number remains unchanged

2019-08-26 Thread zheng
New question #683384 on Yade:
https://answers.launchpad.net/yade/+question/683384

Hi all,

In my case, I want to simulate the progressive loss of fine particles in the 
soil assembly, the code for this case is attached as follows. After running 
1000 steps, we can see the fines indeed get lost from the visualization. 
However, when using command "len(O.bodies)" in the terminal, we get the 
particle number remains unchanged. i.e. n=400. How can I monitor and output the 
instaneous particle number during simulation? Thanks very much!

Best,
Zheng

# the code as follows  

from yade import pack,plot,qt,export
import matplotlib.pyplot as plt
import numpy as np
import random

#O.materials.append(FrictMat(young=6.e8,poisson=.8,frictionAngle=.0))
O.materials.append(CohFrictMat(young=1e9,poisson=.8,frictionAngle=.0,normalCohesion=1e6,shearCohesion=1e6,momentRotationLaw=False,etaRoll=.1,label='spheres'))

sigmaIso=-1e5
sp = pack.SpherePack()
size =0.24
sp.makeCloud(minCorner=(0,0,.05),maxCorner=(size,size,.05),rMean=.005,rRelFuzz=.4,num=400,periodic=True,seed=1)
 # initial 400
#sp.makeCloud(minCorner=(0,0,.05),maxCorner=(size,size,.05),psdSizes=[0.006,0.0068,0.0072,0.0084,0.0092,0.01,0.0108,0.0116,0.0124,0.0132,0.014],
 psdCumm=[0,0.1,0.2, 
0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0],periodic=True,seed=1,distributeMass=False)#num=400,
# if minCorner[k]=maxCorner[k] for one coordinate, it means 2D case;
sp.toSimulation()
O.cell.hSize = Matrix3(size,0,0, 0,size,0, 0,0,.1) # used for periodic 
boundaries.
#print len(O.bodies)
for p in O.bodies:
   p.state.blockedDOFs = 'zXY' # a sphere can be made to move only in xy plane
   p.state.mass = 2650 * 0.1 * pi * p.shape.radius**2 # 0.1 = thickness of 
cylindrical particle
   inertia = 0.5 * p.state.mass * p.shape.radius**2
   p.state.inertia = (.5*inertia,.5*inertia,inertia)

O.dt = utils.PWaveTimeStep()
print O.dt

O.engines = [
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb()]),
   InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom6D()],
  [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys()],
  [Law2_ScGeom6D_CohFrictPhys_CohesionMoment(always_use_moment_law=False)]
   ),
   PeriTriaxController(
  dynCell=True,
  goal=(sigmaIso,sigmaIso,0),
  stressMask=3,
  relStressTol=.001,
  maxUnbalanced=.001,
  maxStrainRate=(.5,.5,.0),
  doneHook='shear()',# function to run when finished
  label='biax'
   ),
   NewtonIntegrator(damping=.1),
   PyRunner(command='delByNum()',iterPeriod=100),
   PyRunner(command='addPlotData()',iterPeriod=100),
   #PyRunner(command='deleteFines()',iterPeriod=100),
   #PyRunner(command='delBelowPerc()',iterPeriod=1),
   #PyRunner(command='print ')
]

plot.live=True
plot.plots={'iter':('sxx','syy'),'iter_':('exx','eyy'),'iter':('poros')}

def addPlotData():
   plot.addData(
iter=O.iter,iter_=O.iter,
sxx=biax.stress[0],syy=biax.stress[1],
exx=biax.strain[0],eyy=biax.strain[1],
Z=avgNumInteractions(),
Zm=avgNumInteractions(skipFree=True),
poro=porosity(),
unbalanced=utils.unbalancedForce(),
t=O.time
   )
   
plot.saveDataTxt('results',vars=('t','exx','eyy','sxx','syy','Z','Zm','poro'))

"""
# delete fines by percent
def delBelowPerc():
   bodyRadius=[]
   for b in O.bodies:
 if b.shape.radius<=0.005:
 #if isinstance(b.shape,Sphere):
  bodyRadius.append([b,b.shape.radius])
   bodyRadius.sort(key=lambda x:x[1])
   if len(bodyRadius)>1:
maxRad=np.percentile(bodyRadius,10)
for b in bodyRadius:
 if b[0].shape.radius<=maxRad:
  O.bodies.erase(b[0].id)
"""

def delByNum():
   setContactFriction(0.5)   
   bodyRadius=[]
   for b in O.bodies:
 if b.shape.radius<=0.005: # define fine particles
 #if isinstance(b.shape,Sphere):
  bodyRadius.append([b,b.shape.radius])
   bodyRadius.sort(key=lambda x:x[1])
   l=len(bodyRadius) # how many fine particles
   perc=0.1
   delNum=int(l*perc) # how many number to be deleted
   list=random.sample(bodyRadius,delNum) # list to be deleted   
   for b in list:
O.bodies.erase(b[0].id) 
   print 'delete fines'   
   #biax.doneHook='shear()' 

"""
def deleteFines():
   #new added here by Zheng 0422
   bodiesToBeDeleted=[]
   for b in O.bodies:
if b.shape.radius<=0.004:
 bodiesToBeDeleted.append(b)
   for b in bodiesToBeDeleted:
O.bodies.erase(b.id)
   #new added here by Zheng 0422

def term0():
   print getStress()
   biax.goal=(-10,-10,0)
   biax.doneHook='term()'

def term1(): # delete a determined percent of fines after consolidation and 
then reconsolidation
   bodyRadius=[]
   for b in O.bodies:
 if b.shape.radius<=0.005: # define fine particles
 #if isinstance(b.shape,Sphere):
  bodyRadius.append([b,b.shape.radius])
   bodyRadius.sort(key=lambda x:x[1])
   l=len(bodyRadius) # how many fine particles
   perc=0.3
   delNum=int(l*perc) # how many number to be deleted
   list=random.sample(bodyRadius,delNum) # list to be deleted   
   for b in list:
O.bod

[Yade-users] [Question #683385]: stressMask meaning in class PeriTriaxController

2019-08-26 Thread Rong Zhao
New question #683385 on Yade:
https://answers.launchpad.net/yade/+question/683385

I want to know how stressMask in in class PeriTriaxController control stress or 
strain along three axis. 

I guess  I should convert the value of stressMask to the value of binary system 
first, then I can decide which axis direction is controlled by stress via 1 or 
strain via 0. 

Take  doc/sphinx/tutorial/06-periodic-triaxial-test.py as a example, the 
stressMask = 7, the coresponding binary is 111, so both three axis directions 
is controled by stress. 
I am not sure wherther I understand the stressMask's meaning right? 
Could you give me a detail explanation and whether there is a possible range 
(0~7) for the choice of the value of  stressMask in class PeriTriaxController.

Thank you very much!

-- 
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 #683388]: How to clump spheres and facet obtained from stl format

2019-08-26 Thread Irfaan Peerun
New question #683388 on Yade:
https://answers.launchpad.net/yade/+question/683388

Hi everyone,

I am trying to create a surface obtained from an stl file, fill the surface 
with spheres and clump the surface (facet) and spheres as one particle.

This is very similar to this question: 
https://answers.launchpad.net/yade/+question/662544

>From yade doc, triangulated surfaces can be imported from gts and stl formats. 
I have imported the surface using the 'ymport.stl' function.
However, for generating spheres within the surface, there are no commands for 
stl format. The example below is for gts format. 
Appreciate if someone could help me with:
[1] similar commands for generating spheres in a surface (stl format) or any 
conversion method for stl to gts format.
[2] command for generating spheres with multiple sizes to fill the surface. 
This is to ensure the sphere clump is of the same volume as the surface.

#example for sphere packing in surface
if surf.is_closed():
 
O1=O.bodies.append(pack.gtsSurface2Facets(surf,fixed=False,noBound=True,material=m))
 
sp=pack.randomDensePack(pack.inGtsSurface(surf),radius=0.1,memoizeDb=memoizeDb,returnSpherePack=True)
 Otemp=sp.toSimulation()
 O3=O1+Otemp
 #O3=Otemp

Looking forward to any suggestion.
Irfaan

-- 
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 #683113]: Clarification required for Ques 402952: Using a gts surface as a shell and filling it using radius expansion method

2019-08-26 Thread Arun
Question #683113 on Yade changed:
https://answers.launchpad.net/yade/+question/683113

Status: Answered => Solved

Arun 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


Re: [Yade-users] [Question #683113]: Clarification required for Ques 402952: Using a gts surface as a shell and filling it using radius expansion method

2019-08-26 Thread Akm
Question #683113 on Yade changed:
https://answers.launchpad.net/yade/+question/683113

Description changed to:
Hi,

I looked into the answer for that question hoping that I would get
clarified but it seems that the author found out another way of doing
the work and the answer got deviated to polyhedral particles. Can you
please let me know how to prepare a sample with a cluster of spheres
having an irregular surface as a predicate? Is it possible to do with
the Triax engine? If so, kindly let me know the steps.

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 #683390]: Constant Normal Load for Direct Shear Test

2019-08-26 Thread Akm
New question #683390 on Yade:
https://answers.launchpad.net/yade/+question/683390

Hello,

I am a beginner in Yade trying to create the simulation for a direct shear 
test. I am using a faceted box to create the sample. 
But I am unclear on how to provide a constant load at the top plate to simulate 
the condition.

 I tried to use the triaxial stress controller but couldn't do it as the top 
box of the sample has to move horizontally and Triaxial stress controller 
doesn't work that way.  Kindly let me know your suggestions on how to achieve 
this. 

I can upload the code in launchpad if you need to take a look. If someone could 
upload an example code for direct shear, I would be more than happy. 

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