memory leaks when instantiating an engine
Hi,
I'm also doing some work related to the removal of particles, and I have a problem similar to Question #452277.
https:/
I tried to set the flowEngine.dead=1 and then set it to 0 after few steps, which didn't work. I tried to slice the list of engines to instantiate the flowEngine, which led to memory leak. Do anyone have a way to release the memory effectively?
Can anyone give me some suggestion? Thanks a lot.
I'm running Yade 2018.02b, Ubuntu 18.04.
My code is shown as follow:
=======
from yade import pack,qt,plot
num_spheres=1000# number of spheres
young=1e6
compFricDegree = 3 # initial contact friction during the confining phase
finalFricDegree = 30 # contact friction during the deviatoric loading
mn,mx=Vector3(
flag=1
flag2=0
O.materials.
O.materials.
walls=aabbWalls
wallIds=
sp=pack.
sp.makeCloud(
sp.makeCloud(
sp.toSimulation
triax=TriaxialS
thickness = 0,
stressMask = 7,
max_vel = 0.005,
internalCompac
# wall_bottom_
)
newton=
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
FlowEngine(
GlobalStiffnes
triax,
newton,
]
triax.goal1=
while 1:
O.run(1000,1)
unb=unbalance
if unb<0.001 and abs(-10000-
break
setContactFrict
## ______________ Oedometer section _________________
triax.stressMask=7
triax.goal1=
#B. Activate flow engine and set boundary conditions in order to get permeability
flow.dead=0
flow.defToleran
flow.meshUpdate
flow.useSolver=3
flow.permeabili
flow.viscosity=10
flow.bndCondIsP
flow.bndCondVal
flow.boundaryUs
O.dt=0.1e-4
O.dynDt=False
newton.damping=0
triax.wall_
O.engines=
O.engines=
def erosion():
global flag
global flag2
k=0
if flag:
for i in O.interactions:
if i.id1==5:
if i.id2>5 and O.bodies[
if i.id2==5:
if i.id1>5 and O.bodies[
if flag2:
flag=0
O.dt = 0.1e-4
O.dynDt = False
flag=1
O.run()
=======
Best,
Zhang Wenyue
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Zhang Wenyue for more information if necessary.