DFNFlowEngine
Hello
I am investigating the effect of the presence of water on the fracture of the slope, but I have encountered the following error
negative volume for an ordinary pore (temp warning, should still be safe)
*** stack smashing detected ***: /usr/bin/python3.5 terminated
Aborted (core dumped)
#######
from yade import ymport, utils, plot
import math
import random
from pylab import *
#### controling parameters
packing='slopegts'
smoothContact=True
output='out'
maxIter=10000
### Fluid properties ###
KFluid=2.e9 # bulk modulus do fluid (1/compressibility)
visc=1.e-3 # viscosity of the fluid
pFactor=1.8e-11 # to scale the permeability of the rock matrix: useless if lines 133-136 are not commented (impermeable matrix) -> cf. permeametre.py: 1.8e-11 gives a permeability of 1e-16 m2 for 111_10k
slotAperture=1e-3 # initial aperture of pre-existing fracture where the injection is done
DENS_FLUID=1000 # water density
flowRate=0
### Simulation Control ###
saveData=10 # data record interval
iterMax=10 # numero maximo de iteracoes da simulacao (passos de tempo)
saveVTK=10 # number of Vtk files
OUT=packing+
O.bodies.
## preprocessing to get dimensions of the packing
dim=utils.
dim=utils.
xinf=dim[0][0]
xsup=dim[1][0]
X=xsup-xinf
yinf=dim[0][1]
ysup=dim[1][1]
Y=ysup-yinf
zinf=dim[0][2]
zsup=dim[1][2]
Z=zsup-zinf
## preprocessing to get spheres dimensions
R=0
Rmax=0
numSpheres=0.
for o in O.bodies:
if isinstance(
numSpheres+=1
R+=o.shape.radius
if o.shape.
Rmax=
Rmean=R/numSpheres
O.reset()
### material definition
def sphereMat(): return JCFpmMat(
jointNorma
## Rq: density needs to be adapted as porosity of real rock is different to granular assembly due to difference in porosity (utils.
### packing ###
O.bodies.
#### Identification of the spheres on joint (some DIY here!) -> work to do on import function textExt to directly load material properties from the ascii file
inFile=
for line in inFile:
if '#' in line : continue
id = int(line.
onJ = int(line.
nj = int(line.
j11 = float(line.
j12 = float(line.
j13 = float(line.
j21 = float(line.
j22 = float(line.
j23 = float(line.
j31 = float(line.
j32 = float(line.
j33 = float(line.
O.bodies[
O.bodies[
O.bodies[
O.bodies[
O.bodies[
inFile.close
#### Boundary conditions
e=4
Xmax=0
Ymax=0
baseBodies=[]
for o in O.bodies:
if isinstance(
o.shape.
## to fix boundary particles on ground
if o.state.pos[2]<(4) or o.state.pos[0]<(4) or o.state.
o.state.
o.shape.
## to identify indicator on top
if o.state.pos[0]>(71) and o.state.pos[0]<(72) and o.state.pos[1]>(16) and o.state.pos[1]<(17) and o.state.pos[2]>(86) and o.state.pos[2]<(88) : #single
refPoint=o.id
o.shape.
p0=o.state.pos[0]
p2=o.state.pos[2]
flow=DFNFlowEngine(
# ,bndCondValue=
### DFN related
)
#### Engines definition
interactionRadi
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
flow,
NewtonIntegrat
VTKRecorder(
PyRunner(
PyRunner(
]
def crackCheck():
flow.updateTri
def saveFlowVTK():
flow.saveVtk(
from yade import export
vtkExporter = export.
def saveAperture():
vtkExporter.
#### displacement
f = open("displacem
f.write('O.iter O.time Vhorizental Vvertical Xhorizental Zvertical'+ '\n')
def displacement():
x=O.bodies[
str8=str(O.iter)+' '+str(O.time)+' '+str(x)+' '
f.write(str8+'\n')
#### joint strength degradation
stableIter=2000
stableVel=0.001
degrade=True
def jointStrengthDe
for i in O.interactions:
if i.phys.isOnJoint :
if i.phys.isCohesive:
i.phys.
i.phys.FnMax=0.
i.phys.FsMax=0.
# Simulation starts here
### manage interaction detection factor during the first timestep (near neighbour bonds are created at first timestep)
O.step()
## initializes the interaction detection factor to default value (new contacts, frictional, between strictly contacting particles)
ss2d3dg.
is2aabb.
### hydraulic loading
flow.isActivated=1
O.step()
#flow.imposeFlu
#### RUN!!!
O.run(maxIter)
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 Roshan for more information if necessary.