flow.saveVtk() error:reading ascii data. Possible mismatch of datasize with declaration.
Hi,
I'm trying to simulate the fluid-solid coupling of a cylinder and use flow.saveVtk() to save .vtk file to view relevant data in paraview.
However,when I open the .vtk files in paraview 5.9.1,I got the following error prompt:
###
Generic Warning: In /builds/
Error reading ascii data. Possible mismatch of datasize with declaration.
###
I do not know what happened..,thanks for help!
###my code###
from yade import pack, ymport, plot, utils, export, timing
import numpy as np
import sys
damp=0.4
young=66.2e9
name='JCFPM_triax'
poisson=0.522
name='cylinder'
preStress=-30e6
strainRate = -0.1
OUT=str(
r1=0.002
r2=0.01
nw=24
nh=15
rParticle=
bcCoeff = 5
width = 0.025
height = 0.05
allx,ally,
mnx=min(allx)*1.01 #same as aabbExtrema, get the xyz of the lowest corner, multiply by factor to reduce it to let the wall surround all the spheres.
mny=min(ally)*1.01
mnz=min(allz)*0.99
mxx=max(allx)*1.01 #same as aabbExtrema, get the xyz of the top corner, multiply by factor to increase it to let the wall surround all the spheres.
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,
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 addForces():
for f in facets:
n = f.shape.normal
a = f.shape.area
O.forces.
O.dt=.5*
newton=
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
PyRunner(
FlowEngine(
newton,
PyRunner(
PyRunner(
]
def plotAddData():
perme = permeability()
f1 = sum(O.forces.
f2 = sum(O.forces.
f = .5*(f2-f1)
s = f/(pi*.
e = (top[0]
plot.addData(
i = O.iter,
s = -s,
e = -e,
tc = interactionLaw.
sc = interactionLaw.
permeab = perme
)
plot.saveDataT
O.step()
ss2sc.interacti
is2aabb.
flow.debug=False
flow.permeabili
flow.fluidBulkM
flow.useSolver=4
flow.permeabili
flow.viscosity= 0.001
flow.decoupleForces = False
flow.boundaryUs
flow.bndCondIsP
flow.bndCondVal
flow.dead=0
flow.emulateAct
plot.plots = { 'e':('s',), 'elateral':('s'),}
plot.plot()
O.run()
###
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: