Porosity cylinder compacts
Hi,
Has anyone experience in measuring the porosity of particle compacts in cylinder? I tried voxel porosity and I can only define domain size in boxes, it is affected by the boundary and "air" on the compact edge. Also is it possible define the domain size in cylinder for calculation of voxel porosity?
Here is my code:
#!/usr/bin/env python
#encoding: ascii
# Testing of the Deformation Enginge with Luding Contact Law
# Modified Oedometric Test
# The reference paper [Haustein2017]
from __future__ import print_function
from yade import utils, plot, timing
from yade import pack
import pandas as pd
o = Omega()
# Physical parameters
fr = 0.54
rho = 1050
Diameter = 0.0079
D=Diameter
r1 = Diameter
r2 = Diameter
k1 = 126000
kp = 12.0*k1
kc = k1 * 0.1
ks = k1 * 0.1
DeltaPMax = Diameter/3.0
Chi1 = 0.34
o.dt = 1.0e-5
particleMass = 4.0/3.0*
Vi1 = math.sqrt(
PhiF1=0.999
#PhiF1 = DeltaPMax*
#surf_a=
#comp_stress=
#******
# Add material
mat1 = O.materials.
# Spheres for compression
sp=pack.
sp.makeCloud(
cyl = pack.inCylinder
sp = pack.filterSphe
sp.toSimulation
##No of particles
count = 0
for b in O.bodies:
if isinstance(b.shape, Sphere):
count +=1
#######
walls=O.
df = pd.DataFrame(
df.to_csv(
from csv import writer
def append_
# Open file in append mode
with open(file_name, 'a+', newline='') as write_obj:
# Create a writer object from csv module
csv_writer = writer(write_obj)
# Add contents of list as last row in the csv file
# Add engines
o.engines = [
ForceResetter(),
InsertionSort
InteractionLoop(
[Ig2_
Ig2_
Ig2_
[Ip2_
[Law2_
),
NewtonIntegra
#VTKRecorder(
PyRunner(
DeformControl
]
def checkForce():
# at the very start, unbalanced force can be low as there is only few
# contacts, but it does not mean the packing is stable
if O.iter < 20000:
return
# the rest will be run only if unbalanced is < .1 (stabilized packing)
timing.reset()
if unbalancedForce() > 0.4:
return
# add plate at upper box side
highSphere = 0.0
for b in O.bodies:
if highSphere < b.state.pos[2] and isinstance(b.shape, Sphere):
else:
pass
O.bodies.
# without this line, the plate variable would only exist inside this
# function
global plate
plate = O.bodies[-1] # the last particles is the plate
# Wall objects are "fixed" by default, i.e. not subject to forces
# prescribing a velocity will therefore make it move at constant velocity
# (downwards)
plate.state.vel = (0, 0, -0.1)
# start plotting the data now, it was not interesting before
O.engines = O.engines + [PyRunner(
# next time, do not call this function anymore, but the next one
# (unloadPlate) instead
fCheck.command = 'unloadPlate()'
def unloadPlate():
# if the force on plate exceeds maximum load, start unloading
# if abs(O.forces.
if abs(O.forces.
# next time, do not call this function anymore, but the next one
# (stopUnloading) instead
def stopUnloading():
if abs(O.forces.
# O.tags can be used to retrieve unique identifiers of the simulation
# if running in batch, subsequent simulation would overwrite each other's output files otherwise
# d (or description) is simulation description (composed of parameter values)
# while the id is composed of time and process number
# plot.saveDataTx
O.pause()
D=Diameter
for i in range (0,len(
def addPlotData():
if not isinstance(
return
Fz = O.forces.
plot.addData(
Fz=Fz,
i=O.iter
)
def defVisualizer():
with open("data.
for b in O.bodies:
if isinstance(b.shape, Sphere):
O.timingEnabled
O.run(1, True)
plot.plots=
plot.plot()
Best,
Mithushan
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: