Scripts¶
pyCactus also includes a number of scripts for manipulating CACTUS run cases and output data.
pyCactusCloneCase.py¶
usage: pyCactusCloneCase.py [-h] [--clean] [--copy-output] [--no-field]
[--no-wakeelem] [--no-wall]
case_path output_path
Copy a CACTUS case directory without output data.
By default, no output data is copied (file matching the following patterns are
ignored).
'*.csv',
'*.pvd',
'*.vts',
'*.vtu',
'*.out',
'*.tp',
'output'
Flags may be used to copy output data (see help).
positional arguments:
case_path path to original case.
output_path path to copied case directory.
optional arguments:
-h, --help show this help message and exit
--clean delete existing directory if it exists!
--copy-output copy output data.
--no-field ignore field data (only used if --copy-output).
--no-wakeelem ignore wake element data (only used if --copy-output).
--no-wall ignore field data (only used if --copy-output).
pyCactusCsvToVtk.py¶
usage: pyCactusCsvToVtk.py [-h] [--delete]
[--wakeelem_fnames_pattern WAKEELEM_FNAMES_PATTERN]
[--field_fnames_pattern FIELD_FNAMES_PATTERN]
[--path_to_pyCactus PATH_TO_PYCACTUS]
case_path case_name output_path
Convert CACTUS wake node and grid data files from CSV to VTK using pyCactus and
pyCactusWake modules.
The wake node data is moved to '/WakeElemVTK' and the field data to '/FieldVTK'.
Recursive glob is used to find wake element data and field data matching the
default patterns specified in CactusRun.
However, alternate search patterns may also be specified using:
--field_fnames_pattern
--wakeelem_fnames_pattern
positional arguments:
case_path path to CSV files to be converted.
case_name prefix of output files, e.g.
[case_name]_WakeElemData_0001.csv
output_path desired output path for VTK files.
optional arguments:
-h, --help show this help message and exit
--delete delete original CSV files after converting.
--wakeelem_fnames_pattern WAKEELEM_FNAMES_PATTERN
glob pattern for wake element data files.
--field_fnames_pattern FIELD_FNAMES_PATTERN
glob pattern for wake field data files.
--path_to_pyCactus PATH_TO_PYCACTUS
path to pyCactus module directory (e.g., '~/Repos
/CACTUS-tools/'). This must be specified if pyCactus
is not installed (is not available in the Python path)
pyCactusPvdSubset.py¶
usage: pyCactusPvdSubset.py [-h] [--t_start T_START] [--t_end T_END]
pvd_filename pvd_filename_new
Extracts a time subset from a ParaView collection file (.pvd) given a range of
timesteps and writes it to a new .pvd file.
positional arguments:
pvd_filename path to *.pvd
pvd_filename_new path to new *.pvd file
optional arguments:
-h, --help show this help message and exit
--t_start T_START time before which to clip *.pvd file.
--t_end T_END time after which to clip *.pvd file.
pyCactusWPDataToVtk.py¶
usage: pyCactusWPDataToVtk.py [-h]
[--walldata_fnames_pattern WALLDATA_FNAMES_PATTERN]
case_path case_name output_path
Convert CACTUS wall data files in a given directory from TecPlot structured
to VTK format. The wall data is written to a folder called wallVTK.
By default, expects that the wall data filenames match the patterns:
[case_name]_WPData_*.tp
Another pattern may be specified using --walldata_fnames_pattern.
VTK does not support multi-block time-series data, so each block is written to a
separate data file. Also write accompanying .pvd collection files.
positional arguments:
case_path path to TP files to be converted.
case_name prefix of output files, e.g.
[case_name]_WakeElemData_0001.csv
output_path desired output path for VTK files.
optional arguments:
-h, --help show this help message and exit
--walldata_fnames_pattern WALLDATA_FNAMES_PATTERN
glob pattern for wall data files.