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

Facing issues in running the periodic triaxial test. The simulation is not 
working when the material properties (density, young's modulus, poisson's ratio 
& friction angle) are assigned. The simulation works with the default material 
properties. The particles do not make contact when the material properties are 
assigned. Please find below the code of the simulation.

**********************************************************
from yade import pack,qt, plot

sigmaIso = -5e5
density = 2660
frictionAngle = 0.577
young = 8.5e10
poisson = 0.2
porosity = 0.346
dilatancyAngle = radians(28.5)

O.periodic = True

O.materials.append(FrictMat(frictionAngle= frictionAngle, density= density, 
young= young, poisson= poisson))
psdSizes, psdCumm = [0.000006, 0.000146476744593, 0.000202222746783, 
0.000518678210948, 0.00101], [0, 0.0394, 0.0735, 0.867, 1]
sp = pack.SpherePack()

sp. makeCloud((0, 0, 0), (0.0025, 0.0025, 0.0075),periodic= True, num = 1000, 
psdSizes = psdSizes, psdCumm = psdCumm)
sp.toSimulation()


import sys

file_path = './final_radius.txt'
open(file_path, "w").close()


for radius in sp:
        sys.stdout = open(file_path, "a")
        print ('The radius of sphere is' , radius)

O.engines = [
        ForceResetter(),
        InsertionSortCollider([Bo1_Sphere_Aabb()]),
        InteractionLoop([Ig2_Sphere_Sphere_ScGeom()], 
[Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()]),
        PeriTriaxController(
                label='triax',
                # specify target values and whether they are strains or stresses
                goal=(sigmaIso, sigmaIso, sigmaIso),
                stressMask=7,
                # type of servo-control
                dynCell=True,
                maxStrainRate=(10, 10, 10),
                # wait until the unbalanced force goes below this value
                maxUnbalanced= .1,
                relStressTol=0.001,
                # call this function when goal is reached and the packing is 
stable
                doneHook='compactionFinished()'
        ),
        NewtonIntegrator(damping=.2),
        PyRunner(command='addPlotData()', iterPeriod=100),
]
O.dt = .5 * PWaveTimeStep()


def addPlotData():
        plot.addData(
                unbalanced=unbalancedForce(),
                i=O.iter,
                sxx=triax.stress[0],
                syy=triax.stress[1],
                szz=triax.stress[2],
                exx=triax.strain[0],
                eyy=triax.strain[1],
                ezz=triax.strain[2],
                # save all available energy data
                Etot=O.energy.total(),
                **O.energy
        )


# enable energy tracking in the code
O.trackEnergy = True

# define what to plot
plot.plots = {
        'i': ('unbalanced',),
        'i ': ('sxx', 'syy', 'szz'),
        ' i': ('exx', 'eyy', 'ezz'),
        # energy plot
        ' i ': (O.energy.keys, None, 'Etot'),
}
# show the plot
plot.plot()
# plot.saveDataTxt('./data_extracted.txt')


def compactionFinished():
        # set the current cell configuration to be the reference one
        O.cell.trsf = Matrix3.Identity
        # change control type: keep constant confinement in x,y, 20% 
compression in z
        triax.goal = (sigmaIso, sigmaIso, -.12)
        triax.stressMask = 3
        # allow faster deformation along x,y to better maintain stresses
        triax.maxStrainRate = (1, 1, 1)
        # next time, call triaxFinished instead of compactionFinished
        triax.doneHook = 'triaxFinished()'
        # do not wait for stabilization before calling triaxFinished
        triax.maxUnbalanced = 10


def triaxFinished():
        print('Finished')
        O.pause()

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

Reply via email to