yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #21056
Re: [Question #685223]: what are the input variables to get the micro-stress firled
Question #685223 on Yade changed:
https://answers.launchpad.net/yade/+question/685223
Status: Answered => Open
nobody is still having a problem:
Hi Jan, Robert,
thank you guys give me the suggestions.
right now I can export the position, radius, and the nine components per particle stress. I named these variables as
(x,y,z,r,s11,s22,s33,s44,s55,s66,s77,s88,s99)
as reference [1] mentioned that we can use export.VTKExporter to export
the stress.
exportSpheres(ids='all', what={}, comment='comment', numLabel=None,
useRef=False)
in this command, we need to set the what ={},
I wrote the code like this :
from yade import ymport, export
import numpy as np
vtk = export.VTKExporter("stress")
i = 0
number_of_txtfiles = 100
while i < number_of_txtfiles:
O.bodies.append(ymport.text("./num"+str(i)+".txt"))
TW = TesselationWrapper()
TW.triangulate()
TW.computeVolumes()
TW.setState
vtk.exportSpheres(ids='all',what=[('stress',"numpy.array([s11,s22,s33],[s44,s55,s66],[s77,s88,s99])")],useRef=False) ##### this line
i = i +1
###################
I know there are some problems with (##### this line). Because the
command mentioned that, for the" what " parameter we need to do as this
reference[2] said.
what=dict(particleVelocity='b.state.vel',dist='b.state.pos.norm()', ...
)
since I already output the particle information. how can I relate this information to this command (vtk.exportSpheres)
Because in the "what" parameter, I need to set the b attribute.
thanks in advance.
best,
yong
but right now how can I input the nine components in the vtk.exportSpheres command, especially in the
[1]https://yade-dem.org/doc/user.html#microstressandmicrostrain
[2]https://yade-dem.org/doc/yade.export.html?highlight=exportspheres#yade.export.VTKExporter.exportSpheres
--
You received this question notification because your team yade-users is
an answer contact for Yade.