Code for the paper Simultaneous and Meshfree Topology Optimization with Physics-informed Gaussian Processes , where we develop a new class of Topology Optimization methods based on the framework of Gaussian processes (GPs) whose mean functions are parameterized via deep neural networks.
We place GP priors on all design and state variables to represent them via parameterized continuous functions. These GPs share a deep neural network as their mean function but have as many independent kernels as there are state and design variables. We estimate all the parameters of our model in a single for loop that optimizes a penalized version of the performance metric where the penalty terms correspond to the state equations and design constraints.
To set up the environment for this project, follow these steps:
-
Create a new virtual environment on Python 3.9.13:
python -m venv GP_for_TO
Activate the environment:
- On Windows:
GP_for_TO\Scripts\activate
- On macOS/Linux:
source GP_for_TO/bin/activate
- On Windows:
-
Install the required packages:
- PyTorch == 1.12.0 & CUDA >= 11.3:
pip install torch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0 --index-url https://download.pytorch.org/whl/cu113
- GPyTorch == 1.7.0:
pip install gpytorch==1.7.0
- Dill == 0.3.5.1:
pip install dill==0.3.5.1
- pandas:
pip install pandas
- Matplotlib == 3.5.3:
pip install matplotlib==3.5.3
- Tqdm >= 4.66.4:
pip install tqdm>=4.66.4
- PyTorch == 1.12.0 & CUDA >= 11.3:
Once these steps are completed, your environment will be ready to use.
After downloading the code from this GitHub repository and installing the required packages, you’re all set to get started. The primary script, main_TO.py
, located in the notebook
folder, provides a comprehensive demonstration of applying the proposed technique to the topology optimization problems discussed in the paper.
If you use this code or find our work interesting, please cite the following paper:
Yousefpour, Amin, et al. "Simultaneous and Meshfree Topology Optimization with Physics-informed Gaussian Processes." arXiv preprint arXiv:2408.03490 (2024).
Need help with the code? Feel free to open an issue on our GitHub page and label it according to the module or feature in question for quicker assistance.