From d37ac24af2ba5f9e508e3684564cff4bf3558e54 Mon Sep 17 00:00:00 2001 From: Bray Moll Date: Mon, 26 May 2025 00:58:46 -0700 Subject: [PATCH] Add some documenation files. --- .gitignore | 1 + docs/content/index.org | 34 ++++++++++++++++++- docs/content/inigenerator.org | 18 ----------- docs/content/vtu_2bin.org | 61 ++++++++++++++++++++++++++++++++++- 4 files changed, 94 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index 829d839..f318513 100644 --- a/.gitignore +++ b/.gitignore @@ -163,3 +163,4 @@ cython_debug/ *logs/ *scratch/ +ltximg/ diff --git a/docs/content/index.org b/docs/content/index.org index 83e9b53..2d750d8 100644 --- a/docs/content/index.org +++ b/docs/content/index.org @@ -1,4 +1,36 @@ #+SETUPFILE: ../org-themes/theme-readtheorg.setup #+INCLUDE: "./header.org" * Welcome -Welcome to the flowVC-utils documentation +Welcome to the flowVC-utils documentation this utility project provides documentation and tooling to assist in utilizing the flowVC software for computing Finite Time Lyoponove Exponents + +* Project Organization +It is recomended that before starting your project is organized into the following directory structure, with a subdirectory being created for each of the simulation cases. Note the trailing "_" in the subdirectory names, this is necissary for the code to to generate and identify file names throughout the process. + +└── project_root + ├── case1_ + │   ├── input_bin + │   ├── input_vtu + │   │   ├── case1_00000.vtu + │   │   ├── case1_00050.vtu + │   │   └── case2_00100.vtu + │   ├── output_bin + │   └── output_vtk + └── case2_ + ├── input_bin + ├── input_vtu + │   ├── case2_00000.vtu + │   ├── case2_00050.vtu + │   └── case2_00100.vtu + ├── output_bin + └── output_vtk + +The input_vtu stores the input data files in a ".vtu" file format. This would often be the velocity data from a CFD simulation that you wish to generate FTLE fields for. + +* Step 1: Create Binary Files using + FlowVC requires the velocity data be converted into binary files prior to exectution. These binary files contain the velocity data as well as the coordinate and connectivity information of your dataset. For more information regarding the anticipated file format, refer to the flowVC documentation [[https://bkm82.github.io/flowVC/][flowVC Documenation]]. + + To generate the binary files use the vtu2bin argument [[./vtu_2bin.org][vtu2bin]] + + + +* Step 2: Create the input settings (.in) file diff --git a/docs/content/inigenerator.org b/docs/content/inigenerator.org index 34c1684..4e6e979 100644 --- a/docs/content/inigenerator.org +++ b/docs/content/inigenerator.org @@ -28,24 +28,6 @@ The defaults for the .in settings can be found and changed in the flowVC_utils/s └── output_bin #+End_SRC -#+Begin_SRC text -Usage: python -m flowvcutils inigenerator [OPTIONS] - - Generate a .ini file for the flow vc. - -Options: - -d, --directory TEXT Directory to run program (default: current - dir) - --auto_range BOOLEAN Get data and FTLE range(min-max) using a - .vtu file?Ensure there is at least 1 .vtu - file in in a input_vtu dir - --cell_size FLOAT size of FTLE element, default 0.001 - --direction [forward|backward] forward or backward ftle - --batch run for each subdirectory - --manual_bounds FLOAT... Manually specify [min_x min_y min_z max_x - max_y max_z]. - -h, --help Show this message and exit. -#+End_SRC *** Options **** -d, --directory diff --git a/docs/content/vtu_2bin.org b/docs/content/vtu_2bin.org index fd26c49..a23fe3e 100644 --- a/docs/content/vtu_2bin.org +++ b/docs/content/vtu_2bin.org @@ -28,7 +28,6 @@ t_s \; \underbrace{u_0\; v_0\; w_0}_{\text{node 0}} \underbrace{u_1\; v_1 \; w_ | u,v,w | double | - ** Cartesian Mesh To define a cartesian mesh, the mesh bounds and resolution needs to be defined. @@ -98,3 +97,63 @@ The adjacency file contains the indices of the adacent elements that share a fac **** Data Type e(int): The number of elements in the data set $e_i^j$ (int): The index of the element that shares the j'th face for the ith element in the dataset. Note if the element face is not shared with another element (i.e. on the edge this is a -1) +* vtu2bin + +The vtu2bin utility can be utilized to generate the binary files from a +.vtu dataset. To use it run: +#+begin_src shell +python -m flowvcutils vtu2bin START STOP +#+end_src + +where START is the starting index of your velocity data and STOP is the stopping index of your velocity data + +** Project Organization +To utilize the flowVC-Utils + +The recomended way to use this utility is in --batch mode, which will create the binary files for multiple cases all at once. In order to do this structure your simulation results into the following format. The "project_root" can be any name, but + +project_root +├── case1 +│   ├── input_bin +│   ├── input_vtu +│   └── output_bin +└── case2 + ├── input_bin + ├── input_vtu + └── output_bin + + + +* Options +#+Begin_SRC text +python -m flowvcutils vtu2bin --help +Usage: python -m flowvcutils vtu2bin [OPTIONS] START STOP + + Convert .vtu files into .bin format for FlowVC. + + START: Starting index for the processing (positional argument). STOP : + Stopping index for the processing (positional argument). + +Options: + --root TEXT Directory with the VTU files (default: current + directory).In batch mode ensure vtu files are in + root/subdir/input_vtu/ + --output TEXT Output directory target to store bin files (default: + current directory).In batch mode this will be + root/subdir/input_bin/ + --file_name TEXT Base file name (e.g., steady_ for steady_00000.vtu) + (default: current directory name).Note: In batch + mode this will be the subdirectory namesensure files + are named + root/subdirname/input_vtu/subdirname_xxxxx.vtu + --batch Process subdirectories (directory mode) if set + otherwise process a single folder. + --extension TEXT File extension (default: '.vtu'). + --increment INTEGER Increment between each vtu file (default: 50). + --num_digits INTEGER Digits in file name (e.g., 5 for test_00100.vtu). + (default: 5). + --field_name TEXT Field name for velocity data within the .vtu files + (default: 'velocity'). + -h, --help Show this message and exit. + + #+End_SRC