Error using unsat.getCellPorosity
Hi
I am using following code to calculate porosity of compacts (sphere packed in a cylinder):
I am getting the error message:
“WARNING rmin>rmax. Rmin=5.0e-05 ,rmax=1e-10”
“negative volume for an ordinary pore (temp warning, should still be safe”
Best,
Mithu
Here is my code:
from __future__ import print_function
from yade import utils, plot, timing
from yade import pack
import pandas as pd
o = Omega()
o.dt = 1.0e-8
Tab_rad=0.0017
Tab_height=0.0075
Comp_press=3e8
cross_area=
Comp_force=
#******
# Add material
mat1 = O.materials.
# Spheres for compression
sp=pack.
sp.makeCloud(
#cyl = pack.inCylinder
#sp = pack.filterSphe
sp.toSimulation
#######
#O.bodies.
walls=O.
# 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 < 1000:
return
# the rest will be run only if unbalanced is < .1 (stabilized packing)
timing.reset()
#if unbalancedForce() > 0.2:
# 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, -30)
# 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()
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: