Full-stack development for WEIS input/output visualization. This application provides a web-based graphical user interface to visualize input/output from WEIS. The app provides three types of output visualization - OpenFAST, Optimization with DLC Analysis, and WISDEM (blade, cost).
visualization └──appServer └──app/ ├── assets/ ├── mainApp.py └── pages/ ├── home.py ├── visualize_openfast.py ├── visualize_opt.py ├── visualize_wisdem_blade.py └── visualize_wisdem_cost.py └──share/ ├── auto_launch_DashApp.sh ├── sbatch_DashApp.sh └── vizFileGen.py └──utils.py
We offer two types of installation: (1) for users who wants to leverage HPC and (2) for users working on their local machines. The HPC set up is in steps 1--3. Users on local machines can skip to step 4. From our preliminary study, the app was able to successfully visualize the example optimization case which has around 430GB of information included.
- Get an interactive node
salloc --time=60:00 --account=weis --partition=debug
- Go to preferred directory
cd WEIS-Demo
- Install WEIS and dependencies
We created a bash script which installs all of the related libraries with a single command. We recommend downloading that file first and then running the script.
wget https://raw.githubusercontent.com/WISDEM/WEIS/main/share/kestrel_install.sh -O kestrel_install.sh
bash kestrel_install.sh -p [conda_env_path] -raft -wisdem
# For example: bash kestrel_install.sh -p env/weis-env -raft -wisdem
The whole installation process might take around 20 mins. Please check if the installation of weis, conda virtual environment, openfast, rosco, wisdem and raft are successful.
- Generate visualization input yaml file
module load conda
conda activate env/weis-env
(.weis-env) $ cd weis/weis/visualization/appServer/share/
(.weis-env) $ python vizFileGen.py --modeling_options [path_to_modeling_options] --analysis_options [path_to_analysis_options] --wt_input [path_to_final_wind_io] --output vizInput.yaml
Note that you can use the modeling and analysis options generated within the output folder of the WEIS run.
- Run the server
cd ../app
(.weis-env) $ python mainApp.py --input [path_to_viz_input] --host [host_number] --port [port_number]
Now, you are able to see the hosting url with defined port number where your app server is running.
- Connect the app with local machine
After finishing the set up from the hpc, open a new terminal from your local machine and run:
ssh -L [port_number]:[host_name from \#1]:[port_number] kl1.hpc.nrel.gov
# For example, if you have not assigned specific port number to app: ssh -L 8050:[host_name from \#1]:8050 kl1.hpc.nrel.gov
Open a web browser, preferably Safari or Chrome, and go to the hosting url that shows from step #5.
- Go to preferred directory
cd WEIS-Demo
- Install WEIS and dependencies
Please use the installation instructions here: https://github.com/WISDEM/WEIS
- Generate visualization input yaml file
module load conda
conda activate env/weis-env
(.weis-env) $ cd weis/weis/visualization/appServer/share/
(.weis-env) $ python vizFileGen.py --modeling_options [path_to_modeling_options] --analysis_options [path_to_analysis_options] --wt_input [path_to_final_wind_io] --output vizInput.yaml
Note that you can use the modeling and analysis options generated within the output folder of the WEIS run.
- Run the server
cd ../app
(.weis-env) $ python mainApp.py --input [path_to_viz_input] --host [host_number] --port [port_number]
Now, you are able to see the hosting url with defined port number where your app server is running. Open a web browser, preferably Safari or Chrome, and enter the hosting url to start.
All of the graphical objects has been generated via Plotly library, which it easy to interact, zoom, and download the plots. The selected channels should be saved between runs, which help users to resume their previous work. Channels from the OpenFAST page will be saved once save button has been clicked.
Read OpenFAST related variables from the input yaml file, including OpenFAST output file paths and graph x,y axis settings, and visualize the graphs based on them. Note that we allow maximum 5 files to visualize and please keep 5 rows. If you have only three files to visualize, keep file4 and file5 values as 'None' and don't delete them. We recommend the file paths to be absolute path.
First, we need to check if the optimization type is correct. For OpenFAST Optimization, please check if status is true and type is 3 from the userOptions/optimization. Then, we read design constraints and variables from userPreferences/optimization.
Optimization convergence trend data will be first shown on the left layout from the analyzed log_opt.sql file. Then, user can click on a specific iteration, and then the corresponding DLC visualization will be shown on the right. The specific OpenFAST time-series plots can be visualized as well via clicking specific data points.
First, we need to check if the optimization type is correct. For RAFT Optimization, please check if status is true and type is 1 from the userOptions/optimization. Then, we read platform design variables from userPreferences/optimization/convergence/channels.
Once clicking specific iteration, the corresponding 3D platform design plot appears from the right layout.
Read blade related properties and WISDEM output file path from the input yaml file, and visualize the relevant information.
Cost-related variables are an output of WISDEM and WEIS. The tool reads the WISDEM output file path from the input yaml file, and visualizes the cost-breakdown. Note that cost calculation is based on NREL CSM model (https://wisdem.readthedocs.io/en/master/wisdem/nrelcsm/theory.html#blades).