← Back to team overview

yade-users team mailing list archive

[Question #703055]: imposible to reach specific porosity

 

New question #703055 on Yade:
https://answers.launchpad.net/yade/+question/703055

Hello, 
I cannot reach the target porosity. The script based on periodical triaxial test tutorial example. After isotropic stage finished, the simulation stopped as well so that the porosity condition could not be satisfied. Maybe I am wrong with O.run command. Could you please help me?

from __future__ import print_function

import time
import datetime
import os

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


#FIXED PARAMETERS

poisson=0.2
R=1e-3 
rate=1e-2
dimcell = 0.03
density= 1e9
young=1e9
frictionAngle=radians(30)
targetPorosity=0.43

#SETTINGS
O.periodic = True
O.cell.hSize = Matrix3(dimcell , 0, 0, 0, dimcell , 0, 0, 0, dimcell )



sp = pack.SpherePack()
sp.makeCloud((0, 0, 0), (dimcell, dimcell, dimcell), rMean=R, rRelFuzz=.1, periodic=True)


pp = O.materials.append(CohFrictMat(
	young=young,
	poisson=poisson,
	frictionAngle=frictionAngle,
	density=density,
	isCohesive=False,
	momentRotationLaw=True,
	etaRoll=.1,label='spheres'
	))


sp.toSimulation(material='spheres')

O.engines = [
        ForceResetter(
               ),
        InsertionSortCollider([Bo1_Sphere_Aabb()]),
        InteractionLoop([Ig2_Sphere_Sphere_ScGeom6D()], [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys()],[Law2_ScGeom6D_CohFrictPhys_CohesionMoment(useIncrementalForm=True,always_use_moment_law=True)]),
	PeriTriaxController(goal=(-1e4,-1e4,-1e4),
				relStressTol=1e-3,
				stressMask=7, 
				maxStrainRate=(rate, rate, rate), 
				dynCell=True,
				maxUnbalanced=.1, 
				label='triax', 
				doneHook = 'triaxDone()'
				),
	NewtonIntegrator(damping=.2),
        PyRunner(command='addPlotData()', iterPeriod=500),
	]

O.dt = .5 * PWaveTimeStep()
print('time step',O.dt)



def triaxDone():
	frictionAngle=radians(30)
	while utils.porosity>targetPorosity:
		frictionAngle = 0.7*frictionAngle
		setContactFriction(frictionAngle)
		print (frictionAngle," porosity:",utils.porosity())
                O.run(500000,1)

def addPlotData():
	plot.addData(
	        i=O.iter,
	        Ezz=log(O.cell.trsf[2,2]),
		Eyy=log(O.cell.trsf[1,1]),
		Exx=log(O.cell.trsf[0,0]),
		szz=utils.getStress()[2,2],
		syy=utils.getStress()[1,1],
		sxx=utils.getStress()[0,0],
	        u=utils.porosity()
	)






# define what to plot
plot.plots = {
        'i ': ('sxx', 'syy', 'szz'),
        ' i': ('Exx', 'Eyy', 'Ezz'),
	' i ':('u')
        # energy plot
        
}
# show the plot
plot.plot()




   







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