Trouble generating/visualizing vtkrecorder cracks files
Hello,
I am trying to visualize jcfpm bond break information in paraview using the cracks vtkrecorder. Yade generates a cracks file filled with the correct information as well as cracks.vtu files that appear to be empty. My vtkrecorder is active with the argument recorders=
Distribution: Ubuntu xenial 16.04 LTS
Yade versions tried: yadedaily and master branch of yade/trunk
Here is an MWE, assuming there is an 'out' folder in the working directory for the vtk files. Any help is appreciated.
#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import division
from yade import plot,pack,timing
import time, sys, os, copy
import numpy as np
import matplotlib.pyplot as plt
young=65e9
poisson=0.3
sigmaT=6e6
frictionAngle=
epsCrackOnset=1e-4
relDuctility=30
finalFricDegree = 19
density=5000
doModes=2
output=
intRadius=1.329
dtSafety=.8
damping=0.4
strainRateTensi
strainRateCompr
setSpeeds=True
# 1=tension, 2=compression (ANDed; 3=both)
iterper=100
specimenLength=.077
sphereRadius=0.0015
R = specimenLength / 4
numSpheres=10000
# isotropic confinement (should be negative)
isoPrestress=0
cohesion=50e6
jCFmat = O.materials.
sps=SpherePack()
sp = pack.randomDens
sp.toSimulation
bb=uniaxialTest
negIds,
O.dt=dtSafety*
print 'Timestep',O.dt
mm,mx=[pt[axis] for pt in aabbExtrema()]
coord_25,
area_25,
O.engines=[
ForceResett
InsertionSo
Interaction
),
NewtonInteg
#CpmStateUp
UniaxialStr
PyRunner(
PyRunner(
VTKRecorder
]
plot.plots=
O.saveTmp(
O.timingEnabled
global mode
mode='tension' if doModes & 1 else 'compression'
def initTest():
global mode
print "init"
if O.iter>0:
O.wait();
print "Reversing plot data"; plot.reverseData()
else: plot.plot(
strainer.
try:
from yade import qt
except ImportError: pass
print "init done, will now run."
O.step(); # to create initial contacts
# now reset the interaction radius and go ahead
ss2sc.
is2aabb.
O.run()
def stopIfDamaged():
global mode
if O.iter<2 or not plot.data.
sigma,
extremum=
minMaxRatio=0.5 if mode=='tension' else 0.5
if extremum==0: return
# uncomment to get graph for the very first time stopIfDamaged() is called
#eudoxos.
import sys; sys.stdout.flush()
if abs(sigma[
if mode=='tension' and doModes & 2: # only if compression is enabled
print "Saved /tmp/uniax-
print "Damaged, switching to compression... "; O.pause()
# important! initTest must be launched in a separate thread;
# otherwise O.load would wait for the iteration to finish,
# but it would wait for initTest to return and deadlock would result
import thread; thread.
return
else:
print "Damaged, stopping."
#print 'Strengths fc=%g, ft=%g, |fc/ft|
#print 'gnuplot'
print 'Bye.'
def addPlotData():
yade.
plot.plot(
#O.run()
initTest()
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jérôme Duriez
- Solved:
- Last query:
- Last reply: