← Back to team overview

yade-users team mailing list archive

Re: [Question #701803]: Use of O.Step and O.Pause when saving Packing

 

Question #701803 on Yade changed:
https://answers.launchpad.net/yade/+question/701803

    Status: Answered => Open

Gianni Pellegrini is still having a problem:
Hello Robert,
thank you for your answer.
Yes, I meant that it occurs randomly so sometimes the file is created, other times not. Without the use of O.pause, it works just fine.
I maybe had understood your explanation. So O.pause will just stop the running of the O.engine but still, python will read the script and hence, it will execute the commands after O.pause. Is it?

Moreover, I wrote this simple example where I import the created packing and the dimension of the cell.
I assigned a new material and just use O.Step() in a loop. Please note I did not define any engine or apply any O.velgrad().
At each loop, I am printing the void ratio (obtaining a constant value) and the isotropic pressure (obtaining a different value every time).
I understand that this could be possible due to the original overlap of particles in the packing, but how O.Step can work if O.engine is not defined? And why the void ratio is not changing where the pressure is?

The code is below but I am not sure how to upload the input files for the cell and packing.
thanks


from __future__ import print_function


from yade import pack, plot, export, ymport
import numpy as np


frictionAngle =0.5
sigmaIso=-1e5
poisson=0.2
R=1e-3 
rate=1e-4
dimcell = 0.02
density= 1e12
alphaKr=2.0
alphaKtw=2.0
etaRoll=0.1
young=1e10

#SETTINGS
O.periodic = True
ac = np.load('T1.cellSizeCloud.npy')
O.cell.hSize=ac

pp = O.materials.append(CohFrictMat(
	young=young,
	poisson=poisson,
	frictionAngle=frictionAngle,
	density=density,
	isCohesive=False,
	alphaKr=alphaKr,
	alphaKtw=alphaKtw,
	momentRotationLaw=True,
	etaRoll=etaRoll,
	))

packing = ymport.text("T1.packing",color=(1,1,0),material=pp)
O.bodies.append(packing)

    
for i in range(0,100):    
    O.step()
    u=utils.porosity()
    ev=u/(1-u)
    print('Isotropic start at initial void-ratio', ev)
    print('Isotropic start at initial pressure:', getStress().trace() / 3.)

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.