Instantiating a new FlowEngine after removing does not work
Hi,
I'm also trying to remove some particles from the simulation while using FlowEngine engine to simulate a fluid flow. According to Questions #452277 and #670889, I used the simple method of instantiating a brand new FlowEngine after removing particles, however, segmentation faults still occurred.
For complex methods, reset functions need to be executed in C + + code. Can you give the relevant C + + source code link? Thanks a lot!
My code is shown as follow:
## ______________ First section, similar to triax-tutorial/
from __future__ import print_function
from yade import pack
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(
O.materials.
O.materials.
walls=aabbWalls
wallIds=
sp=pack.
sp.makeCloud(
sp.toSimulation
triax=TriaxialS
maxMultiplier=
finalMaxMultip
thickness = 0,
stressMask = 7,
max_vel = 0.005,
internalCompac
)
newton=
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
FlowEngine(
GlobalStiffnes
triax,
newton
]
triax.goal1=
while 1:
O.run(1000, True)
unb=
if unb<0.001 and abs(-10000-
break
setContactFrict
## ______________ Oedometer section _________________
#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-3
O.dynDt=False
O.run(1,1)
csdList=
print(len(
flow.dead=1
print(O.
for i in range(10,100):
O.bodies.
print(len(
del O.engines[3]
O.engines=
O.run(1000,True)
flow.dead=0
flow.defToleran
flow.meshUpdate
flow.useSolver=3
flow.permeabili
flow.viscosity=10
flow.bndCondIsP
flow.bndCondVal
flow.boundaryUs
O.run(1,1)
#flow.updateTri
csdList1=
print(len(
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Robert Caulk
- Solved:
- Last query:
- Last reply:
This question was reopened
- by Zhicheng Gao