Releasing this as public, but is as is. This codebase is designed to take output from COMSOL models, specifically a swimmer device modelled with solid mechanics, CFD and ALE. My intention for uploading this is to provide reference for anyone else looking to process simulation output from similar experiments. The code is very 'I worked on it for 5 years on and off as part of my PhD', I intend to improve it at some point but it functioned at the time and my priorities are shifting.
It takes 4 column csv files (time, displacement, velocity, curvature), parameter csv files (tables of COMSOL model parameter values) and a data_2_plot.json that outlines the data to plot (to be further explained WIP). COMSOL data extracted with a matlab livelink script (upload WIP)
To run:
- vscode properties run as admin
- use gpedit or regedit to remove path length limit of 256 (new max 4000)
- install texlive, update and install missing packages with tlmgr cmd
- install python 3.9.X
- make a venv
- install requirements.txt
- python run.py
- configure flags.py, paths.py and run.py as needed -- You will need to specify the folder paths and decide which flags to enable
Features:
- Support for Mac and Windows (I don't see why it wouldn't work on linux, but I never tried)
- Custom dataframes that reliably store metadata (column datatypes, headers, other dataset metadata), saves/loads to json or csv.
- Parallelized for data processing and plotting
- Dynamically evaluates parameter correllation to dataset and co-correllation to minimise parameter space -- Fuzzy logic for indentifying parameter names incase of a sprawling project with subtle name changes.
- Automatic file name generation with abbreviations and dynamic shortening
- Custom plotting scripts for 4 axis (x, y, colour and symbol) 2D scatter and line plots
- Archiving and restoring scripts for restoring all data
- Email notification of script status
WIP:
- Multi-dataset handling, currently limited to contents of a folder -- There is 3 methods of multiple folder processing, historically functional but currently nonfunctional. --- Subfolder: explores folders below the current and combines --- Listed folders: combines listed folders --- Combination: combines each folder with every other folder in the list as pairs
- Testing the various functions