GP_for_TO

Model Overview

GP_for_TO (Physics-informed GP-TO) is a physics-informed Gaussian-process framework for topology optimization developed by researchers at Northwestern University. It jointly optimizes material distributions and physical state variables in complex design domains without requiring an explicit mesh discretization.

Paper: Simultaneous and Meshfree Topology Optimization with Physics-informed Gaussian Processes https://arxiv.org/abs/2408.03490

Model Description

GP_for_TO uses a Gaussian-process architecture whose mean function is parameterized by a deep neural network. It provides a mesh-free approach to fluid topology optimization problems such as minimizing dissipated power in Stokes flow.

Usage

1. OneCode

Use the online OneCode environment for an intelligent, one-click AI for Science (AI4S) programming experience:

Launch OneCode for one-click AI4S programming

2. Manual Setup

Hardware Requirements

  • A GPU or DCU is recommended.
  • A CPU can be used for import checks and small-scale pipeline validation, but full training and inference will be slow.
  • DCU users must install DTK in advance. DTK 25.04.2 or later, or the OneScience-recommended version for the target cluster, is recommended.

Download the Model Package

hf download OneScience-Group/GP_for_TO --local-dir ./GP_for_TO
cd GP_for_TO

Set Up the Runtime Environment

DCU Environment

# Activate DTK and Conda first
conda create -n onescience311 python=3.11 -y
conda activate onescience311
# Installation with uv is also supported
pip install onescience[cfd-dcu] -i http://mirrors.onescience.ai:3141/pypi/simple/  --trusted-host mirrors.onescience.ai

GPU Environment

# Activate Conda first
conda create -n onescience311 python=3.11 -y libstdcxx-ng=12 libgcc-ng=12 gcc_linux-64=12 gxx_linux-64=12
conda activate onescience311
# Installation with uv is also supported
pip install onescience[cfd-gpu] -i http://mirrors.onescience.ai:3141/pypi/simple/  --trusted-host mirrors.onescience.ai

Training Data

The method does not rely on pregenerated topology structures or labeled physical fields. Instead, it samples spatial points within the design domain and constructs physics-informed training signals from the governing Stokes-flow equations, boundary conditions, dissipated-power objective, and material volume-fraction constraint. The paper evaluates four fluid topology optimization cases—Rugby, Pipe Bend, Diffuser, and Double Pipe—and compares the results against COMSOL solutions obtained with the SIMP method.

Training

The default training configuration retains the original settings: N_col_domain=10000, N_train_per_BC=25, num_iter=50000, and diff_method=Numerical.

python scripts/train.py

Model Weights

This repository will provide GP_for_TO model weights in the weights/ directory. The weights will be uploaded soon.

Inference

python scripts/inference.py

By default, inference loads weight/gp_for_to.pt and produces:

result/inference/predictions.npz
result/inference/inference_summary.json

predictions.npz contains five arrays: x, u, v, p, and ro.

Result Visualization

python scripts/result.py

Official OneScience Resources

Citations and License


中文说明

模型概览

GP_for_TO(Physics-informed GP-TO)是由西北大学研究人员开发的物理信息高斯过程拓扑优化框架。该框架可在复杂设计域内联合优化材料分布及物理状态变量,无需显式网格离散化。

论文《基于物理信息高斯过程的同步无网格拓扑优化》 https://arxiv.org/abs/2408.03490

模型描述

GP_for_TO 采用高斯过程架构,其均值函数由深度神经网络参数化(parameterization)。它为 Stokes 流耗散功率最小化等流体拓扑优化问题提供无网格方法。

使用方法

1. OneCode

在 OneCode 在线环境中体验智能一键 AI for Science(AI4S)编程。

启动 OneCode,体验一键 AI4S 编程

2. 手动设置

硬件要求

  • 建议使用 GPU 或 DCU。
  • 可使用 CPU 检查导入和验证小规模流程,完整训练和推理(inference)的速度会较慢。
  • DCU 用户须提前安装 DTK。建议使用 DTK 25.04.2 或更高版本,或使用 OneScience 为目标集群推荐的版本。

下载模型包

hf download OneScience-Group/GP_for_TO --local-dir ./GP_for_TO
cd GP_for_TO

配置运行环境

DCU 环境

# Activate DTK and Conda first
conda create -n onescience311 python=3.11 -y
conda activate onescience311
# Installation with uv is also supported
pip install onescience[cfd-dcu] -i http://mirrors.onescience.ai:3141/pypi/simple/  --trusted-host mirrors.onescience.ai

GPU 环境

# Activate Conda first
conda create -n onescience311 python=3.11 -y libstdcxx-ng=12 libgcc-ng=12 gcc_linux-64=12 gxx_linux-64=12
conda activate onescience311
# Installation with uv is also supported
pip install onescience[cfd-gpu] -i http://mirrors.onescience.ai:3141/pypi/simple/  --trusted-host mirrors.onescience.ai

训练数据

该方法不依赖预生成的拓扑结构或带标签的物理场。它在设计域内采样空间点,利用 Stokes 流动控制方程、边界条件、耗散功率目标以及材料体积分数约束构建包含物理信息的训练信号。论文评估了 Rugby、Pipe Bend、Diffuser 和 Double Pipe 四个流体拓扑优化算例,并将结果与使用 SIMP 方法取得的 COMSOL 解进行比较。

训练

默认训练配置保留原始设置,包括 N_col_domain=10000、N_train_per_BC=25、num_iter=50000 和 diff_method=Numerical。

python scripts/train.py

模型权重

本仓库将在 weights/ 目录中提供 GP_for_TO 模型权重。权重文件将于近期上传。

推理

python scripts/inference.py

推理默认加载 weight/gp_for_to.pt 并生成以下结果。

result/inference/predictions.npz
result/inference/inference_summary.json

predictions.npz 包含五个数组,分别是 x、u、v、p 和 ro。

结果可视化

python scripts/result.py

OneScience 官方资源

引用与许可证

Downloads last month
13
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Paper for OneScience-Group/GP_for_TO