facet disappear when modifying examples/concrete/triax.py
Hi,everyone!
Due to the actual demand, the triaxial compression of rock I conducted was based on the cylinder shape and the simulation of triaxial compression under different confining pressures is successfully carried out.However,when I try to add flowengine to try fluid-solid coupling, an error occurs.(My code is attached at the end)
According to my purpose, I applied 30MPa confining pressure and 2MPa osmotic pressure. However, the stress-strain curve I obtained was close to the uniaxial compression result. When I opened the Show 3D interface, I found that the facet added in the script disappeared.(Maybe the cause of uniaxial compression results I guess?)
Thanks for help!
My code as follows:
#######
from yade import pack, ymport, plot, utils, export, timing
import numpy as np
import sys
young=66.2e9
name='JCFPM_triax'
compFricDegree=30
poisson=0.522
name='cylinder'
preStress=-30e6
strainRate = -0.1
OUT=str(
r1=0.005
r2=0.008
nw=24
nh=15
rParticle=
bcCoeff = 5
width = 0.025
height = 0.05
allx,ally,
mnx=min(allx)*1.01
mny=min(ally)*1.01
mnz=min(allz)*0.99
mxx=max(allx)*1.01
mxy=max(ally)*1.01
mxz=max(allz)*1.01
Sy=2e6
O.materials.
O.materials.
O.materials.
mn,mx=Vector3(
walls=aabbWalls
wallIds=
bottom,
radius=0.0125
sp=pack.
pred=pack.
sp=pack.
spheres=
bot = [O.bodies[s] for s in spheres if O.bodies[
top = [O.bodies[s] for s in spheres if O.bodies[
vel = strainRate*
for s in bot:
s.shape.color = (1,0,0)
s.state.
s.state.vel = (0,0,-vel)
for s in top:
s.shape.color = Vector3(0,1,0)
s.state.
s.state.vel = (0,0,vel)
facets = []
rCyl2 = .5*width / cos(pi/float(nw))
for r in range(nw):
for h in range(nh):
v1 = Vector3( rCyl2*cos(
v2 = Vector3( rCyl2*cos(
v3 = Vector3( rCyl2*cos(
v4 = Vector3( rCyl2*cos(
f1 = facet((
f2 = facet((
facets.
O.bodies.
mass = O.bodies[
for f in facets:
f.state.mass = mass
f.state.
def lateral():
elatTot=0.0
nTot=0
for b in O.bodies:
x=b.state.
y=b.state.
d=sqrt(
if d > r1 and d < r2:
b.shape.
xnew=
ynew=
dnew=
elat=(dnew-d)/d
elatTot+=elat
nTot+=1
elat_avg=
return elat_avg
def addForces():
for f in facets:
n = f.shape.normal
a = f.shape.area
O.forces.
def stopIfDamaged(
extremum = max(abs(s) for s in plot.data['s'])
s = abs(plot.
e = abs(plot.
if O.iter < 1000 or e < maxEps:
return
if abs(s)/
print('Simulation finished')
presentcohesi
for i in O.interactions:
if hasattr(i.phys, 'isCohesive'):
if i.phys.isCohesive == True:
print('the number of cohesive bond now is:',presentcoh
print('Max stress and strain:
O.pause()
O.dt=.5*
newton=
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
PyRunner(
FlowEngine(
newton,
PyRunner(
PyRunner(
]
def plotAddData():
elat_avg=lateral()
f1 = sum(O.forces.
f2 = sum(O.forces.
f = .5*(f2-f1)
s = f/(pi*.
e = (top[0]
plot.addData(
elateral = elat_avg,
i = O.iter,
s = -s,
e = -e,
tc = interactionLaw.
sc = interactionLaw.
flux1=
flux2=
)
plot.saveDataT
O.step()
ss2sc.interacti
is2aabb.
flow.debug=False
flow.permeabili
flow.meshUpdate
flow.fluidBulkM
flow.useSolver=4
flow.permeabili
flow.viscosity= 0.001
flow.decoupleForces = False
flow.boundaryUs
flow.bndCondIsP
flow.bndCondVal
flow.bndCondIsT
flow.thermalEng
flow.thermalBnd
flow.dead=0
flow.emulateAct
plot.plots = { 'e':('s',), 'elateral':('s'),}
plot.plot()
O.run()
#######
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Karol Brzezinski
- Solved:
- Last query:
- Last reply: