---
title: TSA-PINN-CylinderWake
canonical_url: "https://www.modelscope.cn/models/OneScience/TSA-PINN-CylinderWake"
md_url: "https://www.modelscope.cn/models/OneScience/TSA-PINN-CylinderWake.md"
repository: OneScience/TSA-PINN-CylinderWake
last_updated: 2026-10-26
license: other
library_name:
  - pytorch
frameworks:
  - PyTorch
language:
  - en
  - zh
downloads: 2
stars: 0
tags:
  - OneScience
  - "流体力学"
  - "圆柱尾流"
---

# TSA-PINN-CylinderWake

> TSA-PINN-CylinderWake - OneScience 在 ModelScope 开源的模型。TSA-PINN-CylinderWake

OneScience/TSA-PINN-CylinderWake 是 ModelScope 魔搭社区上的机器学习模型，采用 other 许可。

- **Repository**: OneScience/TSA-PINN-CylinderWake
- **License**: other
- **Tags**: OneScience, 流体力学, 圆柱尾流
- **Downloads**: 2
- **Stars**: 0
- **Last updated**: 2026-10-26

Source: https://www.modelscope.cn/models/OneScience/TSA-PINN-CylinderWake

---

<p align="center">
  <strong>
    <span style="font-size: 30px;">TSA-PINN-CylinderWake</span>
  </strong>
</p>

# 模型介绍

TSA-PINN-CylinderWake 复现二维 Re=100 圆柱尾流实验，用可训练正弦激活的物理信息神经网络预测速度和压力。

论文：[Physics-informed neural networks with trainable sinusoidal activation functions for approximating the solutions of the Navier-Stokes equations](https://publications.polymtl.ca/65937/1/2025_Khademi_Physics-informed_neural_networks_trainable.pdf)

# 模型描述

模型包含 4 个宽度为 50 的隐藏层，初始频率为 1.0。训练使用 Navier-Stokes 方程残差和边界条件，完成论文中的 4000 次参数更新，并与作者公开的 DNS 场比较。

## 适用场景

| 场景 | 说明 |
| :--- | :--- |
| 圆柱绕流 | 预测非定常尾流的速度和压力 |
| 工业仿真加速 | 对二维不可压缩流动进行物理约束近似求解 |

# 使用说明

## 1. OneCode 使用

可通过 OneCode 在线环境体验智能化一键式 AI4S 编程：

[点击体验智能化一键式 AI4S 编程](https://web-2069360198568017922-iaaj.ksai.scnet.cn:58043/home)

## 2. 手动安装使用

**硬件要求**

- 推荐使用 GPU 或 DCU 训练；CPU 可用于导入和数据检查。
- 本次正式训练使用 1 张 DCU，4000 次参数更新。

### 下载模型包

```bash
modelscope download --model OneScience/TSA-PINN-CylinderWake --local_dir ./TSA-PINN-CylinderWake
cd TSA-PINN-CylinderWake
```

### 安装运行环境

**DCU环境**

```bash
# 请首先激活DTK及CONDA
conda create -n onescience311 python=3.11 -y
conda activate onescience311
# 支持uv安装
pip install onescience[cfd-dcu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
pip install -r requirements.txt
```

**GPU环境**

```bash
# 请首先激活CONDA
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
# 支持uv安装
pip install onescience[cfd-gpu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
pip install -r requirements.txt
```

### 训练数据介绍

使用[作者仓库](https://github.com/AmirhosseinnnKhademi/TSA-PINN)公开的 `cylinder_nektar_wake.mat`。文件包含 5000 个空间点和 200 个时间点，字段为 `X_star`、`t`、`U_star`、`p_star`。从 OneScience 魔搭数据集下载到默认的 `data/` 目录：

```bash
modelscope download --dataset OneScience/TSA-PINN-CylinderWake --local_dir ./data
```

### 训练

```bash
python scripts/train.py
```

默认完成 4000 次更新，按训练目标值保存最佳 checkpoint 至 `weight/best_model.pt`。

### 训练权重

`weight/best_model.pt` 来自第 3956 次更新，大小 219,298 bytes，SHA256 为 `5fadc91405b4741288750c775c09d043c205a625e630d1ee2a9e8b5022712e0f`。

### 推理

```bash
python scripts/inference.py
```

### 评估和可视化

```bash
python scripts/result.py
```

本次在原始 DNS 的 `t=10` 时刻，速度 `u/v` 相对 L2 分别为 0.02198/0.08349；论文 Table 3 为 0.01960/0.06630。本次分别高约 0.00238/0.01719，但论文表格未明确给出完全相同的时空汇总口径，所以这里只作参考比较。完整时空指标和图表见 `results/`。

# OneScience 官方信息

| 平台 | OneScience 主仓库 | Skills 仓库 |
| --- | --- | --- |
| Gitee | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |
| GitHub | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |

# 引用与许可证

- 论文：[Physics-informed neural networks with trainable sinusoidal activation functions for approximating the solutions of the Navier-Stokes equations](https://publications.polymtl.ca/65937/1/2025_Khademi_Physics-informed_neural_networks_trainable.pdf)。
- DNS 数据由作者仓库公开；数据再分发条件应以原始来源说明为准。本模型包未附带训练数据。
