Change boundary condition from rigid wall to periodic boundary
Hi,
I'd like to ask is it possible that change model boundary from rigid wall to periodic boundary? My attempt is as follow:
I use script1 (from Bruno [1]) to generate a sample with rigid wall boundary, note that I set periodic=True in makeCloud. And then I save the sample as sample.yade.gz.
Then I import the sample.yade.gz into script2 (from periodic-triax example[2]), and I remove the rigid walls and give it a periodic boundary.
However, I failed in switching the boundary. The sample exploded immediately after one O.step() forward. I am not sure whether it is impossible to switch the boundary or I have not found out the correct way. Thereby, I'd like to ask for you advice for that:
-Is it possible that change model boundary from rigid wall to periodic boundary after I generate a sample under the condition of rigid wall?
-The reason why I want to switch the boundary is that using the example code[1] (which is rigid wall) is easy to make a sample with target confining presure and porosity by using radii expansion methods (by setting internalCompact
Below are the MWE:
#######
from yade import pack, plot
nRead=readParam
num_spheres=1000,
compFricDegree = 30,
key='_
unknownOk=True
)
from yade.params import table
num_spheres=
key=table.key
targetPorosity = 0.43
compFricDegree = table.compFricD
finalFricDegree = 30
rate=-0.02
damp=0.2
stabilityThresh
young=5e6
mn,mx=Vector3(
O.materials.
O.materials.
walls=aabbWalls
wallIds=
sp=pack.
sp.makeCloud(
O.bodies.
Gl1_Sphere.
### DEFINING ENGINES ###
triax=TriaxialS
maxMultiplier=
finalMaxMultip
thickness = 0,
stressMask = 7,
internalCompac
)
newton=
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
GlobalStiffnes
triax,
newton
]
Gl1_Sphere.
if nRead==0: yade.qt.
### APPLYING CONFINING PRESSURE ###
triax.goal1=
while 1:
O.run(1000, True)
unb=unbalanced
print 'unbalanced force:',unb,' mean stress: ',triax.meanStress
if unb<stabilityTh
break
print "### Isotropic state saved ###"
### REACHING A SPECIFIED POROSITY PRECISELY ###
import sys
while triax.porosity>
# we decrease friction value and apply it to all the bodies and contacts
compFricDegree = 0.95*compFricDegree
setContactFric
print "\r Friction: ",compFricDegree," porosity:
sys.stdout.flush()
O.run(500,1)
print "### Compacted state saved ###"
O.save(
#######
#######
from __future__ import print_function
sigmaIso = -10e3
from yade import pack, qt, plot
O.load(
for i in range(6):
O.bodies.
O.periodic = True
O.cell.
sp = pack.SpherePack()
sp.fromSimulation()
sp.toSimulation()
O.engines = [
# specify target values and whether they are strains or stresses
# type of servo-control
# wait until the unbalanced force goes below this value
# call this function when goal is reached and the packing is stable
),
# PyRunner(
]
O.dt = .5 * PWaveTimeStep()
O.trackEnergy = True
def compactionFinis
print('stage1 finished')
# set the current cell configuration to be the reference one
O.cell.trsf = Matrix3.Identity
# change control type: keep constant confinement in x,z, 20% compression in y
triax.goal = (sigmaIso,-0.4, sigmaIso)
triax.stressMask = 5
# allow faster deformation along x,z to better maintain stresses
triax.
# next time, call triaxFinished instead of compactionFinished
triax.doneHook = 'triaxFinished()'
# do not wait for stabilization before calling triaxFinished
triax.
def triaxFinished():
print('Finished')
O.pause()
#######
Thanks!
Leonard
[1]https:/
[2]https:/
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: