Hi again !!
I have one other target for the polymer chain animations (previous post) consider that I’m modelling a Box (very big compared with the polymer’s chain who is much smaller than one single cell) is to include into the animations the flow field (exported in different file .vtr ) from this big data file (256^3 cell) I have to consider only 121212 cell around the chain ! how can I do this with Paraview ? I never cut in such way a fluid domain ! may somebody give me help or advice ?
Thanks a lot
There are several filters in ParaView that can be used to extract some cells from a data set. The one you use depends on your needs. If I understand your use case, you have some known spatial region that you want to pull cells out of. I think one of the following two filters can do that.
Extract Subset - Given a structured-type of data set (which .vtr is), you can specify the extents of a Volume of Interest (VOI) to extract. This filter is very efficient, but you need to know the indices if the i, j, k region to extract.
Extract Cells By Region - You can define a 3D region using a plane, box, or sphere and extract only those cells within the region. (
Clip is a similar operation that also smoothly cuts away cells at the region boundary.)
thanks for your help ! onestly I don’t understand how Extract Subset works , may you give me an example ? consider that my domain a cube so the index i,j,k are available for each cell but I don’t find where I have to insert the center and the number of cell around
Extract Subset you specify a volume of interest by specifying the min and max index for the i, j, and k directions of your 3D grid.
So let’s say you have a structured-type data set that is 256^3 and you wanted to extract a region that was 12^3. If you wanted to extract the region in the “lower-left corner” (minimum x, y, and z), you would set the VOI to [0, 11, 0, 11, 0, 11]. If you wanted to extract the region in the “upper-right corner” (maximum x, y, z), you would set the VOI to [244, 255, 244, 255, 244, 255]. If you wanted to extract a region in the min x and y but max z, you would set the VOI to [0, 11, 0, 11, 244, 255]. If you wanted to extract a region in the topological center, you would set the VOI to [122, 133, 122, 133, 122, 133].
Note that the numbers I gave are probably correct. I have assumed that the original 256^3 grid has its first index at [0, 0, 0]. That is probably the case for data just loaded from a file, but could be different.
oh right now I got the point ! sorry ! it was so easy ! it is also possible see the flow field as stream line just in the VOI ?
Well, you could compute the stream lines from the extracted region of the flow field. That would constrain the streamlines to the region extracted. But that might not give you the streamlines that you want. If you need to create the streamlines from the whole flow field, then you will have to then extract the lines in the region you want with either
Extract Cells By Region or
and how to create the streamlines from the whole flow field ?
sorry but is a couple of years that I don’t use paraview
Regardless of whether you are creating streamlines from the whole flow field or only the extracted portion, you would use the
Stream Tracer filter.
from the whole flow field and than cut in the region of interests ! is this that you said is the better way right ?
I have an important question for you (thanks a lot for your precious support !) I have a set of data point which is inside a cell , it is possible know the i,j,k index ? if yes how ?
sorry I know that I’ve asked a lot of things … but you support is really precious for me