Generate a sample with a porosity gradient; change sphere material in periodic simulation
Hello,
I'm trying to generate a random sample of porous material using Yade in the shape of a rectangular prism. I've used the spherePack function in the past to generate a spatially periodic REV like the one shown here: https:/
This time, I want to create samples with a uniform porosity gradient. My idea for the best way to do this is to have the material stiffness for the spheres to vary over one dimension, so that penetrations are deeper near one end of the sample and shallower towards the opposite end.
The problem is I can't insert spheres into a periodic simulation that weren't generated from the spherePack object, and there spherePack assigns the same material ID to each sphere it creates. What I have tried to do is to individually add the spheres to the simulation based on the spherePack.
FATAL /path/to/
PeriTriaxController run on aperiodic simulation.
How can I add spheres of differing material to a periodic simulation? Alternatively, is there any way to edit the material of spheres which have already been added to the simulation?
My (simplified) script:
from yade import pack,export,utils
import cPickle,
import pickle as pkl
import numpy as np
maxBadRun=5 #Maximum number of times the simulation is allowed to restart before exiting with failure
alMaxF=5e-2 #Divergence criteria: simulation stops and restarts if the average penetration force exceeds this value
alAvgF=5e-3 #Divergence criteria: simulation stops and restarts if the average penetration force exceeds this value
dtStart=8e-6 #Starting time step size (may be decreased if the simulation is in a bad state)
porCheckInterval = 5000 #How often the porosity is checked for convergence
checkPointInterval = 10000 #How often the simulation is checkpointed for potential restarts
r=3e-4 #Mean Radius (m)
s=1.5e-4 #Width of uniform distribution from which radii are selected (m)
N=100 #Number of spheres
t=0.065 #Surface tension coefficient (N/m)
p=0.8 #Desired porosity
c=0
utils.readParam
Row=0,
Por=p,
rMean=r,
rStd=s,
sig=t,
numSpheres=N,
Save=1
)
from yade.params.table import *
tPorosity=Por
REVL=math.
O.dt=dtStart
done=False
#Create the pack of spheres
REVX = 3*REVL
O.materials.
sp=pack.
tnum=sp.
sphVol=
tStrain=-10
REVl=0
smin = 0.05
smax = 0.2
sphList = []
for sph in sp:
st = sph[0][
matID = O.materials.
O.bodies.
#sp.fromList(
#sp.toSimulation()
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoo
NewtonIntegrat
PeriTriaxContr
GlobalStiffnes
]
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Bruno Chareyre
- Solved:
- Last query:
- Last reply: