Trying to add Oedometric test
Hello,
I am confuse by the Oedometric test provided in the example:
https:/
I don't understand where the max and min load come. I was able to add the test to my experiment, but I decided to remove it first because after the compression the sphere would be directly bounce off through the plate.
Following is my current code:
import random
import math
from yade import geom, pack, utils, plot, ymport
import pandas as pd
# Define material properties
youngModulus = 1e7
poissonRatio = 0.25
density = 2000
# Create material
material = O.materials.
# Define cylinder with funnel parameters
center = (0, 0, 0)
diameter = 0.102
height = 0.18
# create cylindrical body with radius 0.102 m and height 0.064 m
cylinder = geom.facetCylin
# assign material to each body in the cylinder
for body in cylinder:
body.bodyMat = material
# add cylinder to simulation
O.bodies.
# Define cylinder with funnel parameters
center1 = (0,0,height/2)
dBunker = 0.4
dOutput = 0.102
hBunker = 0
hOutput = 0.15
hPipe = 0
# create funnel as a bunker with diameter 0.102 m, height 0.064 m
funnel = geom.facetBunke
# assign material to each body in the funnel
for body in funnel:
body.bodyMat = material
# add funnel to simulation
O.bodies.
# define sphere parameters and number of spheres
rMean1 = (0.0125+0.019)/4
rRelFuzz1 = (0.019-
num1 = 28
rMean2 = (0.0095+0.0125)/4
rRelFuzz2 = (0.0125-
num2 = 86
rMean3 = (0.00475+0.0095)/4
rRelFuzz3 = (0.0095-
num3 = 2071
rMean4 = (0.00236+0.00475)/4
rRelFuzz4 = (0.00475-
num4 = 18997
#create empty sphere packing
sp = pack.SpherePack()
# generate randomly sphere
sp.makeCloud(
sp.makeCloud(
sp.makeCloud(
sp.makeCloud(
# add the sphere pack to the simulation
sp.toSimulation
### Finding method to fix this color doesn't seems to work###
for body in O.bodies:
if not isinstance(
continue
if body.shape.radius == rMean1:
if body.shape.radius == rMean2:
if body.shape.radius == rMean3:
if body.shape.radius == rMean4:
if body.shape.radius == rRelFuzz1:
if body.shape.radius == rRelFuzz2:
if body.shape.radius == rRelFuzz3:
if body.shape.radius == rRelFuzz4:
### Finding method to fix this color doesn't seems to work###
O.engines = [
# handle sphere+sphere and facet+sphere collisions
),
# call the checkUnbalanced function (defined below) every 2 seconds
# call the addPlotData function every 200 steps
]
O.dt = .5 * PWaveTimeStep()
# enable energy tracking; any simulation parts supporting it
# can create and update arbitrary energy types, which can be
# accessed as O.energy[
O.trackEnergy = True
# if the unbalanced forces goes below .05, the packing
# is considered stabilized, therefore we stop collected
# data history and stop
def checkUnbalanced():
if unbalancedForce() < 1e-2:
O.pause()
plot.
# plot.saveGnuplo
# collect history of data which will be plotted
def addPlotData():
# each item is given a names, by which it can be the unsed in plot.plots
# the **O.energy converts dictionary-like O.energy to plot.addData arguments
plot.addData(
# define how to plot data: 'i' (step number) on the x-axis, unbalanced force
# on the left y-axis, all energies on the right y-axis
# (O.energy.keys is function which will be called to get all defined energies)
# None separates left and right y-axis
plot.plots = {'i': ('unbalanced', None, O.energy.keys)}
# show the plot on the screen, and update while the simulation runs
plot.plot()
O.saveTmp()
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Huan
- Solved:
- Last query:
- Last reply: