Re: [Yade-users] [Question #640093]: PFV compressibility, not truly compressible?

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

Status: Answered => Solved

Robert Caulk confirmed that the question is solved:
Dear Bruno,

Thank you for the detailed response. At the pore scale of geomaterials,
I believe the assumption of local linearity vs pressure gradient in the
pore throat is a safe one since the pore throat is so short compared to
the pores themselves.

Let's say we really want to incorporate compressibility into the pore
throat without going full 3D Navier-Stokes. I believe one option is to
discretize the pore throat and linearize the pressure gradient at each
point along the discretization. The irony is palpable here, as per your
post, this is essentially what we are already doing at a larger scale of
fluid movement through the porous medium. But in my experience, the only
way to approach a non-linear problem numerically is to linearize it in
one way or another.


Cheers,

Robert

-- 
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 #641624]: Two phase flow

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

Status: Open => Answered

Jérôme Duriez proposed the following answer:
Do you mean your problem is solved ?

If not, and even though your script is too long for me to grasp a clear
idea, I would recommend you do not call O.run() functions through a
PyRunner engine i.e. from "within" the DEM cycle loop.

Certainly this capillary() function could/should be launched directly
from an idle state of the model and not during the computation cycle
(which is the case here since it is called by some engine of O.engines)

-- 
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 #641624]: Two phase flow

2017-06-06 Thread Amiya Prakash Das
Question #641624 on Yade changed:
https://answers.launchpad.net/yade/+question/641624

Status: Answered => Open

Amiya Prakash Das is still having a problem:
Hi

If i remove PyRunner(command='capillary()',iterPeriod=1), it runs.

Thanks
Amiya

-- 
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 #641624]: Two phase flow

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

Status: Open => Answered

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

If YADE does nothing, are you sure you asked it to do something ? From
your description, it looks like YADE came to the end of the script
without nothing left to do (e.g. no further O.run(..) command)

Jerome

-- 
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 #641624]: Two phase flow

2017-06-06 Thread Amiya Prakash Das
New question #641624 on Yade:
https://answers.launchpad.net/yade/+question/641624

Hi

I am using this two phase flow engine to simulate the behaviour of unsaturated 
soils. So, i am running a simple script in which , for the first objective i am 
desaturating my sample to say some 80% and then applying an axial loading. What 
i am interested is to simulate something very similar to 1 d loading of 
unsaturated soil, under constant suction.

I reached my first objective, but for the next step i.e., loading...my program 
just stalls without doing anything (i neither get any kind of error message nor 
my prog terminates just the virtual time stops and the real time is still 
running). I appreciate some further help in this regard.



import matplotlib; matplotlib.rc('axes',grid=True)
from yade import pack, qt
import pylab
from numpy import *

targetPorosity=0.40
friction=0.6
angle=atan(friction)

sp=pack.SpherePack()
mn,mx=Vector3(0,0,0),Vector3(0.5,0.5,0.5)
sp.makeCloud(minCorner=mn,maxCorner=mx,rMean=0.0005,num=1,seed=1)

## create material #0, which will be used as default
O.materials.append(FrictMat(young=15e7,poisson=.4,frictionAngle=angle,density=2600,label='spheres'))
O.materials.append(FrictMat(young=15e7,poisson=.4,frictionAngle=0,density=0,label='frictionless'))

## create walls around the packing
walls=aabbWalls((mn,mx),thickness=0,material='frictionless')
wallIds=O.bodies.append(walls)

O.bodies.append([utils.sphere(center,rad,material='spheres') for center,rad in 
sp])

triax=TriaxialStressController(
internalCompaction=True,
goal1=-1,
goal2=-1,
goal3=-1,
max_vel=10,
label="triax"
)

newton=NewtonIntegrator(damping=0.4)

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),

GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
triax,
newton
]

while 1:
  O.run(1000,True)
  unb=unbalancedForce()
  print triax.meanStress
  if unb<0.01 and abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.001:
break

print "out"

import sys #this is only for the flush() below
while triax.porosity>targetPorosity:
## we decrease friction value and apply it to all the bodies and 
contacts
friction = 0.95*friction
setContactFriction(friction)
print "\r Friction: ",friction," porosity:",triax.porosity,
sys.stdout.flush()
O.run(500,1)

#
##   REACH NEW EQU. STATE ###
#
triax.internalCompaction=False
setContactFriction(0.5)

while 1:
  O.run(1000,True)
  unb=unbalancedForce()
  if unb<0.001 and abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.001:
break  

print "out of loop"

triax.depth0=triax.depth
triax.height0=triax.height
triax.width0=triax.width
O.save('1kPacking.yade') #save the packing, which can be reloaded later.

print "package saved"

O.run(1000,True)
ei0=-triax.strain[0];ei1=-triax.strain[1];ei2=-triax.strain[2]
si0=-triax.stress(0)[0];si1=-triax.stress(2)[1];si2=-triax.stress(4)[2]

from yade import plot
O.engines=O.engines+[PyRunner(iterPeriod=20,command='history()',dead=1,label='recorder')]

def history():
plot.addData(e11=-triax.strain[0]-ei0, e22=-triax.strain[1]-ei1, 
e33=-triax.strain[2]-ei2,
s11=-triax.stress(0)[0]-si0,
s22=-triax.stress(2)[1]-si1,
s33=-triax.stress(4)[2]-si2,
pc=-unsat.bndCondValue[2],
sw=unsat.getSaturation(True),
i=O.iter
)

plot.plots={'pc':('sw',None,'e22')}
plot.plot()

###
## Drainage Test under oedometer conditions ###
###
##oedometer conditions
triax.stressMask=2
triax.goal1=triax.goal3=0
goalTop=triax.stress(3)[1]
triax.goal2=goalTop
triax.wall_bottom_activated=0
recorder.dead=0

##Instantiate a two-phase engine
unsat=UnsaturatedEngine()

##set boundary conditions, the drainage is controlled by decreasing W-phase 
pressure and keeping NW-phase pressure constant
unsat.bndCondIsPressure=[0,0,1,1,0,0]
unsat.bndCondValue=[0,0,-5,5,0,0]
unsat.isPhaseTrapped=True #the W-phase can be disconnected from its reservoir
unsat.initialization()
unsat.surfaceTension = 74

##start invasion, the data of normalized pc-sw-strain will be written into 
pcSwStrain.txt
file=open('pcSwStrain.txt',"w")
for pg in arange(-5,-25000,1000):
  #increase gaz pressure at the top boundary
  unsat.bndCondValue=[0,0,(-1.0)*pg,5,0,0]
  #compute the evolution of interfaces
  unsat.invasion()
  #save the phases distribution in vtk 

[Yade-users] [Question #641619]: strain - stress curve of three point bending test

2017-06-06 Thread Tina Asia
New question #641619 on Yade:
https://answers.launchpad.net/yade/+question/641619

Hi,

How to calculate the strain-stress curve in a three-point bending test?  I have 
read some similar questions about strain-stress curve, but still have no idea 
to do this. 

I created my sample using jcfpmmat. I have got the strain-stress curve when my 
sample was compressed in a uniaxial compression using UniaxialStrainer 
(https://yade-dem.org/doc/yade.wrapper.html?highlight=strain#yade.wrapper.UniaxialStrainer).
 However, in a three-point bending test, I really have no any idea to work out 
it.

Can anyone give me some hints or tips to do this?

Thanks in advance,

Tina

-- 
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] Announcement: Symposium micro to MACRO

2017-06-06 Thread Bruno Chareyre

Dear Yade users,
The organizers wanted this announcement to be conveyed to Yade 
community. I hope you will enjoy it. :)

Bruno
__


 micro to MACRO
 Mathematical Modelling
 in Soil Mechanics


   May 29 - June 1, 2018
   University Mediterranea of Reggio Calabria -- DICEAM


   Poster of the Conference
   

http://www.microtomacro2018.unirc.it/poster.pdf

___
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 #641561]: Hinge constraint between facets

2017-06-06 Thread Alessandro Balzarotti
New question #641561 on Yade:
https://answers.launchpad.net/yade/+question/641561

Hello everybody,

I'm trying to simulate an harpoon for anchoring in microgravity in 2D (blocking 
xYZ degrees of freedom). I designed a basic harpoon made of a cylinder and a 
cone, but now I want to complicate the geometry. In particular I want to add 
two fins on the sides of the cylinder. 

1) Is it possible to add an hinge constraint between the lower edge of the fin 
and the side of the cylinder, such that the fin can passively open when the 
harpoon is re-tracted? 

2) Moreover, I created the geometry following some examples and answers I found 
here. Is the procedure I used, to generate a dynamic element made of facets, 
correct?



from yade import ymport,export,plot

import math as m

 INITIAL DATA 
g=-2.5e-4   # g acceleration
radius=0.0032   # max radius of the spheres
h=1.18  # soil height
ls=.8   # desired depth of the soil
hl=h-ls 
maxIt=7000  # max iterations


### MATERIAL ###
# Copper-Beryllium
ECo=130e9
rhoCo=8250
nuCo=.3
CoBe=FrictMat(density=rhoCo,young=ECo,poisson=nuCo,frictionAngle=.8,label="CoBe")
O.materials.append(CoBe)

 CYLINDER AND CONE 
# Cylinder and cone data
r=.008  # Cylinder radius
hcy=.09 # Cylinder length
hcon=.06# Cone length
htip=.15# Distance tip-soil

# Cylinder position
zcy=h+htip+hcon+hcy/2   # Cylinder center z-position (needed by 
facetCylinder)
zcon=h+htip+hcon/2  # Cone center z-position (needed by 
facetCone)

# Cylinder and cone made of facets is created and added to the simulation
mcy=pi*r**2*hcy*rhoCo   # Cylinder mass
mcon=pi*r**2*hcon/3*rhoCo   # Cone mass
Acy=r*hcy
Acon=r*hcon/2
COM=(Acy*(hcon+hcy/2)+Acon*hcon*2/3)/(Acy+Acon) # harpoon COM wrt the tip
dcy=hcon+hcy/2-COM  # Distance cylinderCOM - 
harpoonCOM
dcon=COM-hcon*2/3   # Distance coneCOM - harpoonCOM
Izcy=mcy*r**2/2 # Cylinder moment of inertia 
wrt to z-axis, centered in the harpoon COM
Iycy=mcy/12*(3*r**2+hcy**2)+mcy*dcy**2  # Cylinder moment of inertia 
wrt to y-axis and x-axis, centered in the harpoon COM
# Huygens Steiner theorem has 
been used.
Izcon=3*mcon*r**2/10# Cone moment of inertia wrt to 
z-axis, centered in the harpoon COM
Iycon=3*mcon*(r**2+4*hcon**2)/20+mcon*dcon**2   # Cone moment of inertia wrt to 
y-azis and x axis, centered in the harpoon COM
# Huygens Steiner theorem has 
been used.
cyl=O.bodies.append(geom.facetCylinder((.016,.05,zcy),r,hcy, material="CoBe"))
con=O.bodies.append(geom.facetCone((.016,.05,zcon), r, 0, hcon, 
material="CoBe"))

# A small mass and small inertia are given to each facet
for kk in O.bodies:
if isinstance(kk.shape, Facet):
kk.state.mass=1e-6
kk.state.inertia=(1e-6,1e-6,1e-6)

# Facets are colored and clumped together
myList1=[]

for x in range(len(O.bodies)):
 if (O.bodies[x]):
  if isinstance(O.bodies[x].shape,Facet):
   myList1.append(x)

for x in myList1:
 O.bodies[x].shape.color=(0,1,0)

idClump1=O.bodies.clump(myList1)

# Inertia and mass are removed from the facets
for kk in O.bodies:
if isinstance(kk.shape, Facet):
kk.state.mass=0
kk.state.inertia=(0,0,0)

# Inertia, mass and velocity are added to the harpoon
har=O.bodies[idClump1].state
har.mass=pi*r**2*(hcy+hcon/3)*rhoCo
har.inertia=(Iycon+Iycy,Iycon+Iycy,Izcon+Izcy)
har.vel=(0,0,-90)
har.blockedDOFs='xYZ'


 FIN 
finFacet=O.bodies.append(geom.facetParallelepiped((.016,.0585,1.415), 
(0.008,0.0005,0.025), orientation=Quaternion((0, 0, 1), 0), height= .025, 
wallMask=63, material="CoBe"))

# A small mass and small inertia are given to each facet
for yy in finFacet:
if isinstance(O.bodies[yy].shape, Facet):
O.bodies[yy].state.mass=1e-6
O.bodies[yy].state.inertia=(1e-6,1e-6,1e-6)

# Facets are colored and clumped together
myList2=[]
for jj in finFacet:
if isinstance(O.bodies[jj].shape,Facet):
myList2.append(jj)
O.bodies[jj].shape.color=(0,0,1)

idClump2=O.bodies.clump(myList2)

# Inertia and mass are removed from the facets
for xx in finFacet:
if isinstance(O.bodies[xx].shape, Facet):
O.bodies[xx].state.mass=0
O.bodies[xx].state.inertia=(0,0,0)

# Inertia, mass and velocity are added to the fin
fin=O.bodies[idClump2].state
fin.mass=(.016*.001*.05)*rhoCo
fin.inertia=(1,1,1)
fin.vel=(0,0,-90)
fin.blockedDOFs='xYZ'




Re: [Yade-users] [Question #632960]: How to erase GridConnection

2017-06-06 Thread Loic Dugelas
Question #632960 on Yade changed:
https://answers.launchpad.net/yade/+question/632960

Loic Dugelas confirmed that the question is solved:
Thanks Klaus Thoeni, 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 #632960]: How to erase GridConnection

2017-06-06 Thread Loic Dugelas
Question #632960 on Yade changed:
https://answers.launchpad.net/yade/+question/632960

Status: Answered => Solved

Loic Dugelas confirmed that the question is solved:
Hi Klaus,

This is working nicely and solving my problem,

Thank you for your time,

Loïc

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