[Paraview] Subdomain

Cory Quammen cory.quammen at kitware.com
Thu Sep 7 10:46:41 EDT 2017


Muhammad ,

You can try the Clip filter to generate box-shaped subdomains.
Counting the number of particles in each cell is a little more
complicated. Off the top of my head, I can't think of a filter that
does that for you. But, you could write a Programmable Filter that
does this. Briefly, the Programmable Filter would:

1. Set up a vtkCellLocator and give it the input to the Programmable
Filter (which is assumed to be a subdomain you've created with the
Clip filter)

2. Create a cell vtkDataArray (e.g., vtkIntArray) to store the counts
of particles falling inside each cell. The array should have the same
number of tuples as cells in the subdomain.

3. Iterate through all the points in a second input given to the
Programmable Filter. For each point, find the cell containing the
point using vtkCellLocator::FindCell(). Increment the count in the
cell array you created in step 2 given the cell ID returned by the
vtkCellLocator::FindCell() method.

There is a lot of information about the Programmable Filter in the
ParaView Guide and at
https://www.paraview.org/Wiki/Python_Programmable_Filter.

Hope that helps,
Cory

On Tue, Sep 5, 2017 at 2:04 AM, Muhammad Kashif Saeed
<kashifsaeed38 at gmail.com> wrote:
>
> Hi everyone,
>
> I have posted this question some days ago but could not get any answer. Now
> I am trying to explain it more.
>
> I am using open source software LIGGGHTS, which uses DEM (discrete element
> method), My simulation contains a cylinder and 4 bladed impeller which
> rotates inside the cylinder. I have inserted 3 types of particles in the
> cylinder and rotate the impeller which causes mixing of particles that
> process is done using LIGGGHTS software.
>
> Now for post processing, i am using ParaView. In Paraview, I can see the
> particles mixed each other. but I want to find out the mixing status for
> that purpose I want to use Subdomain based mixing index (SMI).
>
> For SMI calculation, it requires dividing the domain into subdomains like 3D
> mesh and to find the total number of particles and number of particles of
> each type in each cell of mesh/subdomain.
>
> Please let me know how can I create these subdomains in ParaView?
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>



-- 
Cory Quammen
Staff R&D Engineer
Kitware, Inc.


More information about the ParaView mailing list