Slicing 3D dataset
Closed this issue · 2 comments
To whom it may concern,
I am wondering, how to properly invoke the --slice postprocessing command. I have two installs, one for lmr and one for Eilmer(v4). The current dataset I am post processing is still in Eilmer(v4). In the documents, the structured grid postprocessing has the option of using this command, and states: "--slice-list="blk-range,i-range,j-range,k-range;..."" I am wondering, if I wish to output a mid-plane, assuming flow in the x-direction, would this be done by setting the blk range to include all blks in the flowfield, then specifying i=all, j=set midplane blk number (hoping that I had an odd number of blocks so I get the true midplane) and k = all?
I think in one example I saw i-range = $ to indicate that I want to output all blocks.
Please let me know! This feature will certainly save a lot of post-processing time.
HI jr,
The slice command syntax is resolved in postprocess.d, line 909. The bit you care about it as follows:
size_t[] decode_range_indices(string rangeStr, size_t first, size_t endplus1)
// Decode strings such as "0:$", ":", "0:3", "$"
// On input, first and endplus1 represent the largest, available range.
// Return the pair of numbers that can be used in a foreach loop range.
Note that $ stands for "the largest index", and : can be used to specific a range.
e.g., to slice all blocks at the final z index, outputting all of the i and j cells you would use
--slice-list=":,:,:,$"
That said, we mostly use slice in 2D to get a line of cells that we can plot in python. The output is just a .dat file, so it might be a bit hard to visualise in a 3D dataset. You might want to just slice the flow in Paraview instead, depending on what you need the data for.
Nick,
Thank you! This answers my question and I have a method to move forward now.