Re: [Yade-users] [Question #700738]: create a 2d modle to get the data about stress and strain

2022-03-02 Thread Karol Brzezinski
Question #700738 on Yade changed:
https://answers.launchpad.net/yade/+question/700738

Status: Open => Answered

Karol Brzezinski proposed the following answer:
Hi,

if you are not familiar with Yade yet, I recommend such a learning path:
- go to this page [1],
- read section Guided Tour, and Yade for users (at least Dem formulation, and 
Users manual),
- next, try to focus on your specific task.

Cheers,
Karol



[1] https://yade-dem.org/doc/index-toctree.html

-- 
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 #700793]: About the "WallStresses_triax_base_" file in script-session1.py

2022-03-02 Thread CESAR FELIPE JIMENEZ SANTIAGO
New question #700793 on Yade:
https://answers.launchpad.net/yade/+question/700793

Hello everyone,

I am a new YADE user. I am using Yade 2020.01a. I ran the code 
script-session1.py from the triax-tutorial obtained in [1].

At the end of the simulation, the text file called "WallStresses_triax_base_" 
is obtained. This file saves the data for every 100 iterations. The file has 3 
"groups" of data with the following characteristics:

1. From row 2 to 192, Iteration from 0 to 19000. Its characteristic is that it 
has no deformations. I understand that it is the data of the "APPLYING 
CONFINING PRESSURE" process.

2. From row 193 to 420, Iteration 0 to 22700. Its characteristic is that it has 
the greatest number of Iterations and the volumetric deformation goes from 
negative to positive. I understand that it is the data of the "REACHING A 
SPECIFIED POROSITY PRECISELY" process.

3. From row 421 to 804, Iteration 0 to 21100. They have the characteristic that 
the volumetric deformation is always negative and the data is very similar 
(equal?) to the data in the graph in matplotlib obtained at the end of the 
script simulation -session1.py
 
I would like to know if the above mentioned by me for the 
"WallStresses_triax_base_" file is correct so that I can better understand the 
code. Thank you very much for the help.

[1] https://gitlab.com/yade-dev/trunk/-/tree/master/examples/triax-tutorial


Here is the code used:

from yade import pack

###   DEFINING VARIABLES AND MATERIALS   ###

nRead=readParamsFromTable(
num_spheres=1000,
compFricDegree = 30, 
key='_triax_base_',
unknownOk=True
)
from yade.params import table

num_spheres=table.num_spheres
key=table.key
targetPorosity = 0.43
compFricDegree = table.compFricDegree
finalFricDegree = 30
rate=-0.02
damp=0.2
stabilityThreshold=0.01
young=5e6
mn,mx=Vector3(0,0,0),Vector3(1,1,1)

O.materials.append(FrictMat(young=young,poisson=0.5,frictionAngle=radians(compFricDegree),density=2600,label='spheres'))
O.materials.append(FrictMat(young=young,poisson=0.5,frictionAngle=0,density=0,label='walls'))

walls=aabbWalls([mn,mx],thickness=0,material='walls')
wallIds=O.bodies.append(walls)

sp=pack.SpherePack()


clumps=False
if clumps:
 volume = (mx[0]-mn[0])*(mx[1]-mn[1])*(mx[2]-mn[2])
 mean_rad = pow(0.09*volume/num_spheres,0.)
 
c1=pack.SpherePack([((-0.2*mean_rad,0,0),0.5*mean_rad),((0.2*mean_rad,0,0),0.5*mean_rad)])
 sp.makeClumpCloud(mn,mx,[c1],periodic=False)
 sp.toSimulation(material='spheres')
 O.bodies.updateClumpProperties()
else:
 sp.makeCloud(mn,mx,-1,0.,num_spheres,False, 0.95,seed=1)
 O.bodies.append([sphere(center,rad,material='spheres') for center,rad in sp])

###   DEFINING ENGINES   ###

triax=TriaxialStressController(
maxMultiplier=1.+2e4/young,
finalMaxMultiplier=1.+2e3/young,
thickness = 0,
stressMask = 7,
internalCompaction=True,
)

newton=NewtonIntegrator(damping=damp)

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,
TriaxialStateRecorder(iterPeriod=100,file='WallStresses'+table.key),
newton
]

Gl1_Sphere.stripes=0
if nRead==0: yade.qt.Controller(), yade.qt.View()

###   APPLYING CONFINING PRESSURE   ###

triax.goal1=triax.goal2=triax.goal3=-1

while 1:
  O.run(1000, True)
  unb=unbalancedForce()
  print ('unbalanced force:',unb,' mean stress: ',triax.meanStress)
  if unbtargetPorosity:
compFricDegree = 0.95*compFricDegree
setContactFriction(radians(compFricDegree))
print ("\r Friction: ",compFricDegree," porosity:",triax.porosity,)
sys.stdout.flush()
O.run(500,1)

O.save('compactedState'+key+'.yade.gz')
print ("###Compacted state saved  ###")

###   DEVIATORIC LOADING   ###

triax.internalCompaction=False

setContactFriction(radians(finalFricDegree))

triax.stressMask = 5

triax.goal2=rate
triax.goal1=-1
triax.goal3=-1

newton.damping=0.1

O.saveTmp()

###Example of how to record and plot data ###

from yade import plot

def history():
plot.addData(e11=-triax.strain[0], e22=-triax.strain[1], 
e33=-triax.strain[2],
ev=-triax.strain[0]-triax.strain[1]-triax.strain[2],
s11=-triax.stress(triax.wall_right_id)[0],
s22=-triax.stress(triax.wall_top_id)[1],
s33=-triax.stress(triax.wall_front_id)[2],
i=O.iter)

if 1:
  
O.engines=O.engines[0:5]+[PyRunner(iterPeriod=20,command='history()',label='recorder')]+O.engines[5:7]
  

Re: [Yade-users] [Question #658938]: Modeling presence of water( a degree of saturation) in consolidation test

2022-03-02 Thread Lea French
Question #658938 on Yade changed:
https://answers.launchpad.net/yade/+question/658938

Lea French posted a new comment:
Hey,

For the classic stress mask question, looking in the previous answers
should help, see for example: https://printersinsider.com/

(2d) Yes, I guess zz strain ezz is actually a good measure of z-length
change ;-)

For other questions, I am not familiar with FlowEngine myself, I would
suggest that (as usual) look in the mailing list in addition to this
document, and if this does not solve your questions then another
(specific) question. Open up

-- 
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 #700536]: Intraction between wall and particles

2022-03-02 Thread Hossein
Question #700536 on Yade changed:
https://answers.launchpad.net/yade/+question/700536

Status: Answered => Solved

Hossein confirmed that the question is solved:
Thank you for your practical comment

-- 
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 #700788]: performing wetting condition on Twophaseflow engine

2022-03-02 Thread Hossein
New question #700788 on Yade:
https://answers.launchpad.net/yade/+question/700788


Hi every body,

I am going to simulate wetting condition after drying with employing 
Twophaseflow engine. I mention my code in below, at the 
stage two when the capillary pressure (PC)  decrease slightly it is expected 
that the degree of saturation increase slowly during the wetting, but degree of 
saturation was not changed and it is constant at the two stage !

would you please, give me the best way to simulate wetting condition? 
what should I do to simulate wetting exactly after the drying according to the 
below code ?



###
## Stage one (Drainage)###
###
triax.stressMask=7
triax.goal1=triax.goal3=confiningS
goalTop=triax.stress(3)[1]
triax.goal2=goalTop
triax.wall_bottom_activated=0
recorder.dead=0
VTK.dead=1

waterContentMatrix=[];suctionMatrix=[]

print ('voidratio=',(triax.porosity)/(1-triax.porosity))

unsat=TwoPhaseFlowEngine()
unsat.entryPressureMethod=1
meanDiameter=(O.bodies[-1].shape.radius + O.bodies[6].shape.radius) / 2.

print ('meanDiameter=',meanDiameter)

##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,-1e8,0,0,0]
unsat.isPhaseTrapped=True #the W-phase can be disconnected from its reservoir
unsat.initialization()
unsat.surfaceTension =10

file=open('pcSwStrain'+key+'.txt',"w")
for pg in arange(1e-5,25,5):
  unsat.bndCondValue=[0,0,(-1.0)*pg*unsat.surfaceTension/meanDiameter,0,0,0]

  unsat.invasion()
  
  
  VolumetricWaterContent=unsat.getSaturation(False)*(triax.porosity)
  waterContentMatrix.append(VolumetricWaterContent)
  suctionMatrix.append(-unsat.bndCondValue[2])

  unsat.computeCapillaryForce()
  for b in O.bodies:
O.forces.setPermF(b.id, unsat.fluidForce(b.id))
  while 1:
O.run(1000,True)
unb=unbalancedForce()
print ('e=', triax.porosity/(1-triax.porosity), 'suction=' , 
(-unsat.bndCondValue[2]*1e-3), 'w=', 
((unsat.getSaturation(False)*(triax.porosity/(1-triax.porosity)))/2.73), 's22=' 
,(-triax.stress(triax.wall_top_id)[1]), 'e11=' ,(-triax.strain[1]), 's33=' , 
(-triax.stress(triax.wall_front_id)[2]), 'Sr=', 
(unsat.getSaturation(False)),'v=' ,VolumetricWaterContent)
if unb<0.1:
  break
  
print("stage two") 
##
#stage two (wetting)
##
unsat.bndCondIsPressure=[0,0,1,1,0,0]
unsat.bndCondValue=[0,0,-1e8,0,0,0]

unsat.initialization()
unsat.surfaceTension = 10
unsat.isPhaseTrapped=True
unsat.isSideBoundaryIncluded=True
unsat.isInvadeBoundary=True
for pg2 in arange(20,1e-5,-5):
  unsat.bndCondValue=[0,0,(-1.0)*pg2*unsat.surfaceTension/meanDiameter,0,0,0]
  unsat.invasion()
  #Suction.append((-unsat.bndCondValue[2])*1e-3)
  unsat.computeCapillaryForce()
  for b in O.bodies:
O.forces.setPermF(b.id, unsat.fluidForce(b.id))
  while 1:
O.run(1000,True)
unb=unbalancedForce()
if unb<0.25:
  break
  print ('PC:',((-unsat.bndCondValue[2])*1e-3), 
'Sr:',(unsat.getSaturation(False)),'e:',(triax.porosity)/(1-triax.porosity), 
'e33=', (triax.strain[2]), 'e22=', (-triax.strain[1]), 's22=', 
(-triax.stress(3)[1]*1e-3)) 
  
  
   

-- 
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 #678523]: frictionAngle vs μ(interparticle friction coefficient)

2022-03-02 Thread Chien-Cheng Hung
Question #678523 on Yade changed:
https://answers.launchpad.net/yade/+question/678523

Chien-Cheng Hung requested more information:
Hi Luc,

Could you give some comments on the main difference between the internal 
friction angle of material and the interparticle friction angle?
I couldn't find this information on the Yade.
Or could you share some links with me for more detailed information?

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