|
3 | 3 | Input Data Files |
4 | 4 | ===================== |
5 | 5 |
|
6 | | -This page describes the input file |
| 6 | +This page describes what constitutes a qualified velocity-field input for the current native |
| 7 | +solver. In both GUI and command-line workflows, the solver reads a folder of time-ordered |
| 8 | +legacy ``.vtk`` files given by ``vtk_folder`` in :ref:`inputdeck`. |
| 9 | +Each file represents one time frame of the same flow field, and the whole folder is interpreted as |
| 10 | +one temporal sequence. |
| 11 | + |
| 12 | + |
| 13 | +Supported File Type |
| 14 | +------------------- |
| 15 | + |
| 16 | +The current native solver scans only files whose extension is ``.vtk``. |
| 17 | +These files are loaded through VTK's legacy-data reader. As a consequence: |
| 18 | + |
| 19 | +- legacy VTK ``.vtk`` is the supported input container for the solver; |
| 20 | +- ASCII and binary legacy files are both acceptable as long as VTK can parse them; |
| 21 | +- XML VTK files such as ``.vts`` or ``.vti`` are not used as solver input in the current mainline, |
| 22 | + even though they may be viewable elsewhere. |
| 23 | + |
| 24 | + |
| 25 | +Folder-Based Time Sequence |
| 26 | +-------------------------- |
| 27 | + |
| 28 | +The solver treats the input as a folder-level sequence rather than a single file: |
| 29 | + |
| 30 | +- only regular ``.vtk`` files in ``vtk_folder`` are considered; |
| 31 | +- subfolders are not scanned recursively; |
| 32 | +- files are sorted by the last integer appearing in the filename; |
| 33 | +- this sorted order defines the frame index used by ``T_range``. |
| 34 | + |
| 35 | +For this reason, filenames such as |
| 36 | +``frame_00000.vtk``, ``frame_00001.vtk``, ``frame_00002.vtk`` are strongly recommended. |
| 37 | +Missing frame numbers are allowed, but the ordering still follows the extracted integer tags. |
| 38 | +If a filename contains more than one integer group, the last one is the one used for sorting. |
| 39 | + |
| 40 | + |
| 41 | +Structured Spatial Layout |
| 42 | +------------------------- |
| 43 | + |
| 44 | +The native solver assumes that every frame lies on one structured tensor-product lattice in |
| 45 | +:math:`x`, :math:`y`, and :math:`z`. |
| 46 | +In practice, the most reliable qualified inputs are legacy VTK files whose dataset is either |
| 47 | +``RECTILINEAR_GRID`` or ``STRUCTURED_GRID``. |
| 48 | + |
| 49 | +For a sequence to be qualified: |
| 50 | + |
| 51 | +- all frames must describe the same spatial grid; |
| 52 | +- the point count must remain identical across all frames; |
| 53 | +- the coordinate axes must be consistent from frame to frame; |
| 54 | +- each point must be mappable to one unique lattice index :math:`(i,j,k)`. |
| 55 | + |
| 56 | +For ``RECTILINEAR_GRID``, the solver takes the axes directly from |
| 57 | +``X_COORDINATES``, ``Y_COORDINATES``, and ``Z_COORDINATES``. |
| 58 | +For other structured datasets, the solver reconstructs the axes from the point coordinates. |
| 59 | +Therefore, even when ``STRUCTURED_GRID`` is used, the point coordinates should still lie on |
| 60 | +separable :math:`x`, :math:`y`, :math:`z` axes. |
| 61 | +General unstructured meshes are not qualified input for the present solver. |
| 62 | + |
| 63 | + |
| 64 | +Velocity Arrays |
| 65 | +--------------- |
| 66 | + |
| 67 | +Velocity must be stored in ``POINT_DATA``. |
| 68 | +Arrays provided only in ``CELL_DATA`` are not sufficient for the current solver. |
| 69 | + |
| 70 | +The parser currently accepts any of the following point-data conventions: |
| 71 | + |
| 72 | +- three scalar arrays named ``u``, ``v``, ``w``; |
| 73 | +- three scalar arrays named ``U``, ``V``, ``W``; |
| 74 | +- three scalar arrays named ``Ux``, ``Uy``, ``Uz``; |
| 75 | +- three scalar arrays named ``Vx``, ``Vy``, ``Vz``; |
| 76 | +- two scalar arrays named ``u`` and ``v``; |
| 77 | +- two scalar arrays named ``U`` and ``V``; |
| 78 | +- two scalar arrays named ``Ux`` and ``Uy``; |
| 79 | +- two scalar arrays named ``Vx`` and ``Vy``; |
| 80 | +- one vector array named ``U``, ``V``, ``Velocity``, ``velocity``, ``Vel``, ``vel``, ``data``, |
| 81 | + or ``Data`` with at least two components. |
| 82 | + |
| 83 | +If only two components are present, the solver fills the third component with zero and therefore |
| 84 | +treats the input as quasi-two-dimensional. |
| 85 | +All frames in the sequence should use the same array naming convention. |
| 86 | + |
| 87 | + |
| 88 | +Minimal Qualified Skeleton |
| 89 | +-------------------------- |
| 90 | + |
| 91 | +A minimal qualified legacy-VTK frame may look conceptually like this: |
| 92 | + |
| 93 | +.. code-block:: text |
| 94 | +
|
| 95 | + # vtk DataFile Version 5.1 |
| 96 | + velocity frame |
| 97 | + BINARY |
| 98 | + DATASET RECTILINEAR_GRID |
| 99 | + DIMENSIONS Nx Ny Nz |
| 100 | + X_COORDINATES Nx double |
| 101 | + ... |
| 102 | + Y_COORDINATES Ny double |
| 103 | + ... |
| 104 | + Z_COORDINATES Nz double |
| 105 | + ... |
| 106 | + POINT_DATA Nx*Ny*Nz |
| 107 | + VECTORS Velocity double |
| 108 | + ... |
| 109 | +
|
| 110 | +An equally acceptable scalar-array variant is: |
| 111 | + |
| 112 | +.. code-block:: text |
| 113 | +
|
| 114 | + POINT_DATA Nx*Ny*Nz |
| 115 | + SCALARS u double |
| 116 | + LOOKUP_TABLE default |
| 117 | + ... |
| 118 | + SCALARS v double |
| 119 | + LOOKUP_TABLE default |
| 120 | + ... |
| 121 | + SCALARS w double |
| 122 | + LOOKUP_TABLE default |
| 123 | + ... |
| 124 | +
|
| 125 | +The exact numeric precision is not prescribed here, but the data must be readable by VTK and the |
| 126 | +point-data array lengths must match the total number of grid points. |
| 127 | + |
| 128 | + |
| 129 | +Two-Dimensional and Thin-Slab Data |
| 130 | +---------------------------------- |
| 131 | + |
| 132 | +The current native solver can also work with quasi-two-dimensional inputs. |
| 133 | +In that case: |
| 134 | + |
| 135 | +- the :math:`x` and :math:`y` directions must still contain at least two grid points; |
| 136 | +- the :math:`z` direction may be a single layer or a very thin slab; |
| 137 | +- the third velocity component may be omitted if the input follows one of the accepted |
| 138 | + two-component conventions above. |
| 139 | + |
| 140 | +This is useful for planar velocity fields embedded in a three-dimensional file format. |
| 141 | + |
| 142 | + |
| 143 | +Practical Checklist |
| 144 | +------------------- |
| 145 | + |
| 146 | +Before launching the solver, it is recommended to confirm the following: |
| 147 | + |
| 148 | +- ``vtk_folder`` points to a directory, not to a single file; |
| 149 | +- the directory contains only the intended ``.vtk`` time frames, or at least no unrelated |
| 150 | + ``.vtk`` files whose filename numbers would disturb the ordering; |
| 151 | +- all frames share one structured grid and one consistent point-data layout; |
| 152 | +- velocity is stored in ``POINT_DATA``; |
| 153 | +- the sorted sequence is long enough for the requested ``T_range``. |
| 154 | + |
| 155 | +If ``auto_wall = 1``, the solver uses the outer coordinates of the input grid as the seeding bounds. |
| 156 | +If ``auto_wall = 0``, the wall ranges in the ``.par`` file must instead define the computational |
| 157 | +domain explicitly. |
0 commit comments