This repository contains the code for the MFLR_Demo2 web application. The app is a demonstration of the multi-fidelity linear regression methods presented in this work. Due to the fast inference capability of the underlying linear regression based methodologies, we can enable live visualizations of the surface pressure field upon a hypersonic vehicle. When a user changes the parameters, the surface pressure field is updated live, and the rendering reflects the changes. One can change between the multi-fidelity (multi-step) and single-fidelity methods to see the differences based on flight conditions.
This guide provides instructions to set up and run the MFLR_Demo2 web application locally. The app utilizes a Flask backend and a Trame-based frontend, requiring two virtual environments. The backend serves the frontend and provides the ParaView server with the necessary data to render the visualizations. The frontend allows users to interact with the visualizations.
-
ParaView Installation:
- Download and install ParaView 5.12.0 or higher.
-
Python Virtual Environment Installation:
- Ensure Python 3.8+ is installed. If not, download from Python's official website.
Clone this repository to your local machine:
git clone https://github.com/VigneshSella/MFLR_Demo2
cd MFLR_Demo2
python -m venv .venv
python -m venv .flaskvenv
For the flask server:
source .flaskvenv/bin/activate
pip install -r backend_reqs.txt
For the trame frontend:
source .venv/bin/activate
pip install -r requirements.txt
NOTE: If on Windows, replace source
and /
with .\
and \
in the above commands.
Open a terminal and run:
source .flaskvenv/bin/activate
python app.py
Leave the first terminal open and open a new terminal to run:
source .venv/bin/activate
"C:\Program Files\ParaView 5.12.0\bin\pvpython.exe" main.py --venv .venv
NOTE: On MacOS, replace "C:\Program Files\ParaView 5.12.0\bin\pvpython.exe"
with the path to the pvpython
executable.
One can also easily make a shell or bash script to run the above commands.