I m trying to create a group based on the particle size, which will be used to postprocessing for mass fraction evaulation. Can anyone give me a guide.
Thanks in advance.
A project by DCS Computing and CFDEMresearch
This website uses cookies to ensure you get the best experience on our website. By continuing to browse the site you are agreeing to our use of cookies. This website uses cookies. By continuing to browse the site you are agreeing to our use of cookies. More info
richti83 | Mon, 06/20/2016 - 07:58
Do it directly in Postprozess
You could do this by assigning different groups in the particle/template/sphere part. But I would do this directly in Postprozessing with a ParaviewPythonProgrammableFilter, adapt this script which sums only all masses in a dumpfile per step.
import math
input = self.GetInputDataObject(0, 0)
output = self.GetOutputDataObject(0)
COUNT=input.GetNumberOfPoints()
pd=input.GetPointData()
m=0
v=0
v0=3.02
for i in xrange(COUNT):
m=m+pd.GetArray("Mass").GetValue(i)
r=round(pd.GetArray("radius").GetValue(i),4)
vp=math.pi*4.0/3.0*r*r*r
v=v+vp
p=v/v0
r=m/v
outputarray = vtk.vtkStringArray()
outputarray.SetName("Text")
outputarray.SetNumberOfTuples(1)
outputarray.SetValue(0,"%1.3fkg\n%1.3fm3\np=%1.3f" % (m,v,p))
output.GetRowData().AddArray(outputarray)